Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

aandreyy

macrumors newbie
Original poster
May 1, 2019
12
50
I like to watch and collect educational videos on YouTube. As we all know, doing this in browser is not a pleasant experience: it is slow, overloaded with ads and doesn't let download videos easily. After unlucky attempts to find a good application or some alternative way to consume YouTube content, I decided to build my own application.

The application must satisfy following requirements:

— Be at least slightly faster than web experience on hardware I own (Powerbook G4, 1.5GHz);
— Be and feel like a good native application, smooth and well designed;
— Be able to bookmark and store videos locally;
— Be able to play only audio track for music or podcasts.

This weekend I started to build first pieces. Think the project may interest someone on this forum, going to keep log of development process and share test versions here.

May 3, 2019:
— Made a mockup of the app. It's quite minimalist: a toolbar with search field and grid of search results with thumbnails;
— NSCollectionView from 10.5 Cocoa is slow and inefficient, built simpler and faster alternative.

03-05-2019.png


May 4, 2019:
— Optimization and final touches. Now we have smoothly scrolling collection view with reusable cells;
— Sub-classed NSOperation to perform various API requests asynchronously.

04-05-2019.png


May 5, 2019:
— Added and wired toolbar and search field. Got first results from YouTube API;
— Implemented asynchronous image downloading, memory and disk caching.
05-05-2019-iceland.png
 
Last edited:

redheeler

macrumors G3
Oct 17, 2014
8,583
9,180
Colorado, USA
A successor to YouView for old Macs would be great (it was a fast native client with PPC / Intel Leopard support but relied on the old YouTube API which hasn't functioned for years now). I assume this client would be able to play video in Quicktime Player or possibly VLC, but limited to the 720p / H.264 with embedded audio as the max quality option?
 
  • Like
Reactions: tevion5

Dronecatcher

macrumors 603
Jun 17, 2014
5,244
7,880
Lincolnshire, UK
Look forward to completion on this.

Did you not look at the alternatives provided on the forum? Plenty of methods to watch Youtube with relatively little CPU overhead?
 

aandreyy

macrumors newbie
Original poster
May 1, 2019
12
50
Did you not look at the alternatives provided on the forum?

I did, none of them really worked out for me. Tried everything from SMTube to mpsyt and they all not quite native and could be more efficient. Hopefully I'll end up with something better.
[doublepost=1557129102][/doublepost]
A successor to YouView for old Macs would be great

Exactly, something like modernized version of YouView is my goal.

I assume this client would be able to play video in Quicktime Player or possibly VLC, but limited to the 720p / H.264 with embedded audio as the max quality option?

I want to make it modular and adaptive to current multimedia stack. On empty system it will use QuickTime to play H.264 or MP4 depending on content availability (Google not always has H.264 variants for videos, but decoding of it is too CPU intensive anyway). This is the least efficient combination, on my machine 720p@30FPS kind of plays, but drops frames and eats 100% of CPU. Next level is if MPV or MPlayer installed, with one of them as playback backend I can watch 720p OGV smoothly at ~40-60% CPU. VLC is slightly "slower" than both M's. These benchmarks are not scientifically accurate though.
 

aandreyy

macrumors newbie
Original poster
May 1, 2019
12
50
It will use the best decoder available on computer. Selection of decoder, its configuration and picking the most suitable media format for playback is the way to break though CPU bottleneck.

In other words it won’t be just an interface for video search, but a tool that finds optimal way to play each given video.

Must carefully add that these promises may turn out to be false. My expectations of what can be achieved are based on a very limited amount of experiments.
 
Last edited:
  • Like
Reactions: Dronecatcher

Dronecatcher

macrumors 603
Jun 17, 2014
5,244
7,880
Lincolnshire, UK
It will use the best decoder available on computer. Selection of decoder, its configuration and picking the most suitable media format for playback is the way to break though CPU bottleneck.

In other words it won’t be just an interface for video search, but a tool that finds optimal way to play each given video.

Must carefully add that these promises may turn out to be false. My expectations of what can be achieved are based on a very limited amount of experiments.

I understand. Good luck with the project - will be a great addition when complete.
 

redheeler

macrumors G3
Oct 17, 2014
8,583
9,180
Colorado, USA
I want to make it modular and adaptive to current multimedia stack. On empty system it will use QuickTime to play H.264 or MP4 depending on content availability (Google not always has H.264 variants for videos, but decoding of it is too CPU intensive anyway). This is the least efficient combination, on my machine 720p@30FPS kind of plays, but drops frames and eats 100% of CPU. Next level is if MPV or MPlayer installed, with one of them as playback backend I can watch 720p OGV smoothly at ~40-60% CPU. VLC is slightly "slower" than both M's. These benchmarks are not scientifically accurate though.
A dual-core Power Mac G5 or Intel Mac can play 720p without issue. My Late 2006 24" iMac running Mountain Lion can even handle 1080p playback in VLC, so I'm hoping you're able to implement that as well (yes, I know about the separate video / audio streams issue). This is the reason I only use TenFiveTube for livestreams, because it does not support 1080p for regular videos.
 

aandreyy

macrumors newbie
Original poster
May 1, 2019
12
50
TenFiveTube and YewTube are native and pretty efficient.

Both have particular qualities that I subjectively consider as downsides. For navigation TenFiveTube uses YouTube website wrapped in web view, which doesn't animate or scroll smoothly on my computer. When I say native I also mean that the app must use Cocoa components to render interface in order to perform and look consistently with applications. Also, judging by delayed playback, they run youtube-dl locally which means they have to unpack heavy zipped python script every time. I'm going to solve this by setting up a secure web-service that would run lazy-extractor self-updating version of ytdl.
 
  • Like
Reactions: z970
TenFiveTube and YewTube are native and pretty efficient. However I never got around to implementing download functions. I like your idea. Good luck on the project. :)

Cheers

This has me thinking about the potential of a successor to the now-defunct Complete YouTube Saver, which was the only browser add-on which could download and mux/stitch together DASH video/audio on the fly — affording one with the means to grab whatever resolution, fidelity, and format one needed.

I loved that add-on/plug-in and am desperately hoping something like it will fill the vast vacuum left in its wake.
 

Slix

macrumors 68000
Mar 24, 2010
1,586
2,358
There are some decent options out there right now for YouTube on PowerPC, but your goal looks like it could make the options even better! Having a solution that doesn't require any extra downloads and minimal lag would be great, especially for those less willing to hack around. Best of luck!

Are you planning to include the video titles underneath the thumbnails in the grid? I think it would help discovery.
 

Dronecatcher

macrumors 603
Jun 17, 2014
5,244
7,880
Lincolnshire, UK
I'm still finding Omniweb with a mobile UA fastest and best browser Youtube option - instant playback and ad free browsing, 240P and 360P requiring 35% and 60% CPU respectively on my 1.33Ghz 12" Powerbook.
 
  • Like
Reactions: sawpits

aandreyy

macrumors newbie
Original poster
May 1, 2019
12
50
Are you planning to include the video titles underneath the thumbnails in the grid? I think it would help discovery

Sure, the screenshot attached is just to demonstrate WIP on grid. Final version will have iPhoto '07 style thumbnails with title, author, duration and "watch later" button. With more info and operations available in right click menu.

thumbnail.png
 

aandreyy

macrumors newbie
Original poster
May 1, 2019
12
50
Which version of Xcode are you using? You've mentioned 10.5 Cocoa so I assume that you are using Leopard. Do you plan to make it compatible with Tiger? Will the app support full screen playback?

I'm using Xcode 3.1.4 and 10.5 SDK with 10.5 set as target.

At this point it's not compatible with Tiger as it uses APIs that are not available before 10.5. This may change in future depending on availability of workarounds for missing parts and my ability to adequately test the app on 10.4.

Fullscreen playback is supported though native API if running on 10.5.
 

necreation

macrumors newbie
Oct 15, 2006
29
25
Kuala Lumpur, Malaysia
I'm using Xcode 3.1.4 and 10.5 SDK with 10.5 set as target.

At this point it's not compatible with Tiger as it uses APIs that are not available before 10.5. This may change in future depending on availability of workarounds for missing parts and my ability to adequately test the app on 10.4.

Fullscreen playback is supported though native API if running on 10.5.

Cool. Fair enough.

Do you run a developer discord server? Would love to provide help if you need any.

Also do you plan to opensource it in github?
 

aandreyy

macrumors newbie
Original poster
May 1, 2019
12
50
An update about things that were built last weekend.

next-page.png


May 10, 2019:
— Transformed thumbnail sketch into code. Still missing duration and status indication (played or not);
— Standard Cocoa buttons don't work well with dark background and I made this neat "Next Page" button;
— A click on the button appends next batch of search results to the grid, kind of like infinite scroll, but with manual control.

web-service.png


May 11, 2019
— Deployed a micro-service running youtube-dl to my web server (should have run it on Xserve G4);
— Started to implement download functionality. Right click on thumbnail opens a menu where download of a video can be requested. Once download enqueued, downloads window pops up;

download-menu.png


May 12, 2019
— The app now has "Downloads" window. It is similar to Safari's one: shows status and progress, can cancel and show item in Finder;
— By default it downloads the best compatible variant to ~/Videos folder.

Thank you for your support!
[doublepost=1557981835][/doublepost]
Also do you plan to opensource it in github?

Will definitely open-source it, although not sure about platform yet.
 
Last edited:

Dronecatcher

macrumors 603
Jun 17, 2014
5,244
7,880
Lincolnshire, UK
Have you noticed that youtube-dl can no longer access 3gp files but using the appropriate user agent a browser will reach and play them in Quicktime/Realplayer?
 

sawpits

macrumors regular
Feb 28, 2014
174
71
I'm still finding Omniweb with a mobile UA fastest and best browser Youtube option - instant playback and ad free browsing, 240P and 360P requiring 35% and 60% CPU respectively on my 1.33Ghz 12" Powerbook.


I have been using this UA recently: Mozilla/5.0 (iPhone; CPU iPhone OS 12_1_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/16D57 Safari/605.1.15

I go to Youtube, nothing plays (which is good), cut and paste the url to the video I want, paste that link into one of the online video downloaders, then watch in VLC. With only VLC running, plus Activity Monitor. CPU usage was bouncing between 34% and 45%. The video was 360P mp4. PowerBook G4 1.67.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.