New application for YouTube

Discussion in 'PowerPC Macs' started by aandreyy, May 5, 2019.

  1. aandreyy, May 5, 2019
    Last edited: May 6, 2019

    aandreyy macrumors newbie

    Joined:
    May 1, 2019
    #1
    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.

    [​IMG]

    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.

    [​IMG]

    May 5, 2019:
    — Added and wired toolbar and search field. Got first results from YouTube API;
    — Implemented asynchronous image downloading, memory and disk caching.
    [​IMG]
     
  2. redheeler macrumors 604

    redheeler

    Joined:
    Oct 17, 2014
    #2
    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?
     
  3. Dronecatcher macrumors 68030

    Dronecatcher

    Joined:
    Jun 17, 2014
    Location:
    Lincolnshire, UK
    #3
    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?
     
  4. aandreyy thread starter macrumors newbie

    Joined:
    May 1, 2019
    #4
    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.
    --- Post Merged, May 6, 2019 ---
    Exactly, something like modernized version of YouView is my goal.

    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.
     
  5. Dronecatcher macrumors 68030

    Dronecatcher

    Joined:
    Jun 17, 2014
    Location:
    Lincolnshire, UK
    #5
    Will playback be within the app or launch a selectable player? I ask because that's where the CPU bottleneck may lie?
     
  6. aandreyy, May 6, 2019
    Last edited: May 6, 2019

    aandreyy thread starter macrumors newbie

    Joined:
    May 1, 2019
    #6
    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.
     
  7. Dronecatcher macrumors 68030

    Dronecatcher

    Joined:
    Jun 17, 2014
    Location:
    Lincolnshire, UK
    #7
    I understand. Good luck with the project - will be a great addition when complete.
     
  8. wicknix macrumors 6502

    wicknix

    Joined:
    Jun 4, 2017
    Location:
    Wisconsin, USA
    #8
    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
     
  9. redheeler macrumors 604

    redheeler

    Joined:
    Oct 17, 2014
    #9
    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.
     
  10. aandreyy thread starter macrumors newbie

    Joined:
    May 1, 2019
    #10
    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.
     
  11. B S Magnet macrumors 6502

    B S Magnet

    Joined:
    Dec 5, 2018
    Location:
    don’t read my status message
    #11
    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.
     
  12. Slix macrumors 65816

    Slix

    Joined:
    Mar 24, 2010
    #12
    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.
     
  13. Dronecatcher macrumors 68030

    Dronecatcher

    Joined:
    Jun 17, 2014
    Location:
    Lincolnshire, UK
    #13
    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.
     
  14. aandreyy thread starter macrumors newbie

    Joined:
    May 1, 2019
    #14
    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.

    [​IMG]
     
  15. necreation macrumors newbie

    necreation

    Joined:
    Oct 15, 2006
    Location:
    Kuala Lumpur, Malaysia
    #15
    Looks awesome. Admire your spirit for making it as native as possible.

    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?
     
  16. ScreenSavers macrumors 6502

    ScreenSavers

    Joined:
    Feb 26, 2016
    Location:
    Bloomingdale, GA
    #16
    Looks great. This would sure be useful for a lot of us!
     
  17. tevion5 macrumors 68000

    tevion5

    Joined:
    Jul 12, 2011
    Location:
    Ireland
    #17
    Awesome dude, hope you succeed with this!
     
  18. aandreyy thread starter macrumors newbie

    Joined:
    May 1, 2019
    #18
    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.
     
  19. necreation macrumors newbie

    necreation

    Joined:
    Oct 15, 2006
    Location:
    Kuala Lumpur, Malaysia
    #19
    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?
     
  20. CooperBox macrumors 65816

    CooperBox

    Joined:
    Nov 28, 2010
    Location:
    France - between Ricard & Absinthe
    #20
    It's great to see new members on here keen on improving our PPC experiences. Kudos to aandreyy! :)
     
  21. aandreyy, May 15, 2019
    Last edited: May 15, 2019

    aandreyy thread starter macrumors newbie

    Joined:
    May 1, 2019
    #21
    An update about things that were built last weekend.

    [​IMG]

    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.

    [​IMG]

    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;

    [​IMG]

    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!
    --- Post Merged, May 15, 2019 ---
    Will definitely open-source it, although not sure about platform yet.
     
  22. Dronecatcher macrumors 68030

    Dronecatcher

    Joined:
    Jun 17, 2014
    Location:
    Lincolnshire, UK
  23. Dronecatcher macrumors 68030

    Dronecatcher

    Joined:
    Jun 17, 2014
    Location:
    Lincolnshire, UK
    #23
    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?
     
  24. skinniezinho macrumors 65816

    Joined:
    Jan 1, 2009
    Location:
    Portugal
    #24
    Wow awesome project, looking forward to see it it in the light :D
     
  25. sawpits macrumors regular

    Joined:
    Feb 28, 2014
    #25

    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.
     

Share This Page

30 May 5, 2019