TenFiveTube - Yet another YouTube option

Discussion in 'PowerPC Macs' started by wicknix, Jan 31, 2018.

  1. wicknix, Jan 31, 2018
    Last edited: Mar 16, 2019

    wicknix macrumors 6502

    wicknix

    Joined:
    Jun 4, 2017
    Location:
    Wisconsin, USA
    #1
    We now have another option for Tiger, Leopard, and also Snow Leopard for YouTube.

    Bugs: Video may glitch for the first 2-5 seconds per clip before smoothing out.
    Fixed: Having to click the video thumbnail twice is resolved in both the Leopard and Tiger app.

    --------------------------------------------------------------------------------------------------------------

    For the Leopard and Tiger versions right clicking on the "whitespace" of background will bring up a forward/back/reload dialog. Leopard version has the ability to change from 720p/360p/240p. Click the Gear icon on the video screen and select 240p if you have playback issues. For Tiger click the HD logo to enable 240p. 360p is the default setting for both versions.

    I also built a similar version for Snow Leopard. One advantage to this version is it has the ability to run in full screen mode. Grab the TenFiveTube-SL.zip.

    Tiger users grab TenFourTube.zip / Leopard users TenFiveTube.zip

    NOTE: Leopard users will need QuickTime 7.7 for optimal performance.


    Cheers.

    EDIT: Added YewTube as another 360p option for 10.4/10.5.

    EDIT: TenFourTube is now broken. Recommend using YewTube.
    However if you don't mind cut and paste, tenfourtube can still get you 360p mp4 links that you can paste in to Core Player, QuickTime etc. Open tenfourtube, find a video, click HD, right click on "watch video" link, copy, then paste link in the "open url" menu of core player, quicktime, etc.


    TenFiveTube
    TFTube.png

    TenFiveTube
    TFT2.png

    YewTube
    Picture 1.png
     

    Attached Files:

  2. AphoticD macrumors 68000

    AphoticD

    Joined:
    Feb 17, 2017
    Location:
    Australia
    #2
    Well done Wicknix! Is this a branch from your PPCBrowser project?

    Just a thought, but have you tried adding this code to the WebView's custom class?
    Code:
    - (BOOL) acceptsFirstMouse: (NSEvent *) theEvent
    {
        return YES;
    }
    
    That may provide a solution to having to click twice to play (one click to make the window / webView key, then another to respond to the webView's HTML controls).
     
  3. wicknix thread starter macrumors 6502

    wicknix

    Joined:
    Jun 4, 2017
    Location:
    Wisconsin, USA
    #3
    Yep, still messing with the browser here and there. It's a big undertaking, so i just poke at it when i have nothing else to do.

    Nope, seems i missed that. Again, thanks for the code snippet!

    Cheers.
     
  4. AphoticD macrumors 68000

    AphoticD

    Joined:
    Feb 17, 2017
    Location:
    Australia
    #4
    Hey no problem, hope that does the trick! Learning Cocoa is a massive undertaking. Stackoverflow is your friend :)
     
  5. Dronecatcher macrumors 68030

    Dronecatcher

    Joined:
    Jun 17, 2014
    Location:
    Lincolnshire, UK
    #5
    85-95% CPU on my 1.5Ghz 12" and lots of frame skipping.
    I see Youtube-dl is in the package - what format are you instructing it to stream and what's used for playback?
     
  6. miksat macrumors member

    miksat

    Joined:
    Jan 27, 2018
    Location:
    Republic of Serbia
    #6
    CD 1.83Ghz Macbook Pro here. I know this app was made for PPC but still, it uses 70% of my CPU while playing the video at 2 frames per minute.
     
  7. ziggy29 macrumors 6502

    Joined:
    Oct 29, 2014
    Location:
    Oregon North Coast
    #7
    Nice to see more innovation and development for the PPC! I look forward to seeing a more polished product. It already works pretty well on my Quad G5, so when it is improved for G4s I'm sure it would "sing" here. :)
     
  8. XaPHER macrumors regular

    XaPHER

    Joined:
    Oct 13, 2010
    Location:
    Nowhere to be found
    #8
    As this is a tablet useragent-based strategy I expect this to be h.264. I'm not (yet) aware of youtube offering WebM VP8 on its mobile sites.

    @wicknix I'm not familliar that much with either WebKit shells or cocoa but, I'm unsure if the double-click sometimes needed to start video playback is a bug. The built-in html5 players from webkit versions close to leopard's system framework all do this in my case(sometimes it's worse).
    Just to point a (really) small overlook, the Picture 1.png buttons's X coordinates adjust to the right edge of the window, so resizing it will misplace the buttons. Just changing their autosizing options via interface builder fixes it.

    Although it's still under work, I like the concept. Thanks for sharing this.
     
  9. Dronecatcher macrumors 68030

    Dronecatcher

    Joined:
    Jun 17, 2014
    Location:
    Lincolnshire, UK
    #9
    Thanks, I guess I should have know that really. Just can't figure why the preformance is so bad compared with say playing Youtube in Safari/Roccat/Omniweb with an iPad UA.
     
  10. XaPHER macrumors regular

    XaPHER

    Joined:
    Oct 13, 2010
    Location:
    Nowhere to be found
    #10
    That happens a lot to me with my iBook when I forget to put it back to auto powersaving mode. ahaha.. But for real, if there's a big difference that's somewhat strange.
     
  11. wicknix thread starter macrumors 6502

    wicknix

    Joined:
    Jun 4, 2017
    Location:
    Wisconsin, USA
    #11
    @XaPHER : Thanks for finding the resize issue with the buttons. I hadn't thought about resizing in my testing.

    @Dronecatcher : Hmm, strange. For me it plays as well as Roccat with a mobile user agent, and its much smaller and simpler than safari and roccat. There should be no reason it doesn't play similar to those, or better. Currently i can only test on my 1.42ghz iBook as the HD in my PowerMac G5 died. I ordered a new drive, and i should receive it by this weekend. Then i'll be able to do a little more trouble shooting. As for youtube-dl my plan is to incorporate the ability to download videos. Right now it serves no purpose, and i could've left it out of the app to be honest.

    @ziggy29 : Thanks. Glad it's working decently for somebody other than myself! :)

    @miksat : Yeah i don't think Rosetta ppc emulation was really meant for streaming audio/video.

    At any rate, thanks for the input/feedback so far. I work at a slow pace, but i will keep plugging away at it and try to make it more polished, with a few more features.

    Cheers.
     
  12. wicknix thread starter macrumors 6502

    wicknix

    Joined:
    Jun 4, 2017
    Location:
    Wisconsin, USA
    #12
    Updated first post with a new version, and also added a snow leopard version.
     
  13. Dronecatcher macrumors 68030

    Dronecatcher

    Joined:
    Jun 17, 2014
    Location:
    Lincolnshire, UK
    #13
    The Snow Leopard version is terrific - works really, really well. Cheers :)
     
  14. wicknix thread starter macrumors 6502

    wicknix

    Joined:
    Jun 4, 2017
    Location:
    Wisconsin, USA
    #14
    Thanks. Glad at least one version works the way it's supposed to for you. :)
     
  15. SkyBell macrumors 604

    SkyBell

    Joined:
    Sep 7, 2006
    Location:
    Texas, unfortunately.
    #15
    Aww, no 10.4 support? :(

    ;)

    It's just neat that you're doing this PPC OS X at all. Good to see!
     
  16. wicknix thread starter macrumors 6502

    wicknix

    Joined:
    Jun 4, 2017
    Location:
    Wisconsin, USA
    #16
    No Tiger support, sorry. Tiger is too old for this to work sadly.

    Also updated top post again. Uploaded v1.2 with the ability to change playback modes from 720p/360p/240p. Default is 360p, but if you get massive frame drop try setting it to 240p. All should be smooth. Click the gear icon on the videos screen to switch modes.

    Cheers
     
  17. Dronecatcher macrumors 68030

    Dronecatcher

    Joined:
    Jun 17, 2014
    Location:
    Lincolnshire, UK
    #17
    You can get this by using Safari/Tiger Webkit. Go to the Develop menu (you have to enable that in prefs) and select iPad 3.2.2 in the user agents.
    Now when you go to Youtube it'll play in same fashion as this app - unclick the HQ button to reduce quality to 240P.
    You can set this user agent as the Safari default in Terminal:

    defaults write com.apple.Safari CustomUserAgent "\"Mozilla/5.0 (iPad; U; CPU OS 3_2_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B500 Safari/531.21.10\""
    --- Post Merged, Feb 3, 2018 ---
    What user agent are you using to allow the Youtube playback prerefences? It's a shame, that at 240P, Youtube is serving up the 180P 3gp file and on my Powerbook is still pushing 80%, in TonVid, the same file uses 18-22% CPU...what on Earth do Youtube do to shovel in all that extra overhead??
    --- Post Merged, Feb 3, 2018 ---
    It's OK, I've got it - iPhone 5 :)
     
  18. AphoticD, Feb 3, 2018
    Last edited: Feb 3, 2018

    AphoticD macrumors 68000

    AphoticD

    Joined:
    Feb 17, 2017
    Location:
    Australia
    #18
    Does it come down to the decoder software? I haven’t done any digging around, but doesn’t WebKit / WebView use QuickTime for playback? That would account for the CPU overhead. It would be great to see TenFiveTube operate as a wrapper / browser for playback via the most efficient decoder. (Mplayer/CorePlayer?)

    @wicknix might be able to find a way to package in the faster decoder option by intercepting the user’s click and forward the clicked URL through to the respective decoder software. Check the WebView delegate methods for catching clicks/URLs.

    @Dronecatcher do your Youtube scripts accept an URL for playback? Together you guys might finally create a GUI solution for those scripts.

    @wicknix in terms of Tiger support, I recall stumbling across the limitations of loading URLs in a Tiger WebView last year when I was trying to port sample code written for Snow Leopard to a Tiger environment. It was just a matter of supplying a different method for the NSURL loading and required 10.4.11 as a minimum. I’ll see if I can pull up my code for 10.4 which may solve this limitation for you... unless there were bigger pre-Leopard issues.
     
  19. Dronecatcher macrumors 68030

    Dronecatcher

    Joined:
    Jun 17, 2014
    Location:
    Lincolnshire, UK
    #19
    It's that and/or I think HTML5 is delivering the video - all of it's normal features are there.
    I'm not a programmer but clearly all the components are out there to have a player that can dig through the Youtube layers and serve up video from 1080 to 144P which gives effortless playback across all Macs.
     
  20. CooperBox macrumors 6502a

    CooperBox

    Joined:
    Nov 28, 2010
    Location:
    France - between Ricard & Absinthe
    #20
    An exciting thread. Thanks to all the contributors. :) I plan on giving it a try this weekend.
     
  21. Lastic macrumors 6502a

    Joined:
    Mar 19, 2016
    Location:
    North of the HellHole
    #21
    Thanks for this , and I just want to state what a great community this forum is , reading through this thread
     
  22. AphoticD macrumors 68000

    AphoticD

    Joined:
    Feb 17, 2017
    Location:
    Australia
    #22
    I have put together the source for this over at https://github.com/AphoticD/OneWindowBrowser

    For Tiger (and Panther+Jaguar), it was a matter of bypassing 10.5's [NSWebView mainFrameURL] convenience accessor and digging into the dataSourceProvider's request URL to get the absoluteString.
     
  23. wicknix thread starter macrumors 6502

    wicknix

    Joined:
    Jun 4, 2017
    Location:
    Wisconsin, USA
    #23
    Heh, great minds think alike. I just built a Tiger version thanks to @Dronecatcher 's user agent suggestion and top post edited with download for that added. @SkyBell give 'er a whirl. :)

    @AphoticD Thanks i'll look in to anything you find!

    Cheers.
     
  24. Dronecatcher macrumors 68030

    Dronecatcher

    Joined:
    Jun 17, 2014
    Location:
    Lincolnshire, UK
    #24
    Tiger version tested and working :) It's been a good day for PowerPC!
     
  25. wicknix thread starter macrumors 6502

    wicknix

    Joined:
    Jun 4, 2017
    Location:
    Wisconsin, USA
    #25
    Original post updated. Added a new tiger and leopard build. Changed the UI to be minimal and less distracting,and fixed the initial need to click the first video twice. Now i'm happy with it and will probably leave it alone other than maybe incorporate youtube-dl someday.

    Cheers
     

    Attached Files:

Share This Page