New Youtube Player/Downloader..even For G3

Discussion in 'PowerPC Macs' started by Dronecatcher, Feb 7, 2017.

  1. Dronecatcher, Feb 7, 2017
    Last edited: Aug 14, 2018 at 1:26 PM

    Dronecatcher macrumors 68020

    Dronecatcher

    Joined:
    Jun 17, 2014
    Location:
    Lincolnshire, UK
    #1
    UPDATED 27/11/2017***UPDATED 27/11/2017***UPDATED 27/11/2017***

    I've put together some scripts, a TenFourFoxBox, youtube-dl and mplayer and come up with tools to let you watch and/or download Youtube videos at any quality on any Mac that runs Tiger or Leopard - and that includes G3s!

    All the components are in the dropbox link - the only other requirement is that Python 2.7 is installed, you can do this independently but the best way is to install PPC Media Center as this installs it for you (and keeps youtube-dl up to date also).

    Whilst not as refined as PPC Media Centre it does offer video streaming via mplayer which is far more efficient than Quicktime and fewer clicks to get there.
    It's not as slick as SMtube either but it works without installing xcode and macports and it works on Tiger too.

    How to install:

    On Leopard
    Drag TonVid, mView, mViewX, mplayer and streamer into Applications - streamer is actually mplayer too but renamed as this version works best for streaming, whilst the other is best for playback.
    You must have TenFourFoxBox already installed before using TonVid - drag it and mView/mViewX to the dock.

    Copy Source to any location - these are the various scripts for downloading and streaming Youtube.

    240, 360 & 720 will download videos at those respective resolutions.

    Grab... will download, play then delete a video at the indicated resolution - worst being the smallest possible size Youtube has.

    xGrab... is the same but with hard frame drop parameters applied to mplayer to reduce CPU.

    Stream... will stream and play a video at the indicated resolution and xStream...is the same with the hard frame drop options.

    Ideally choose the script(s) that suit your needs and copy out of the Source folder, rename and drag shortcuts to the dock (righthand side as they are scripts).

    Make a folder in Movies called Youtube - this is the default download folder but you can edit the scripts to point to any folder you wish.


    On Tiger
    Exactly as above but with one extra step.
    From Finder menu: Go/Go to Folder and type /usr/local/bin from the Finder window locate youtube-dl and copy it to the Desktop.
    From Finder menu: Go/Go to Folder and type /bin in the Finder window, drag youtube-dl from the Desktop into it - you will probably have to type your user password to do this.

    It is crucial to have the latest version of youtube-dl installed, this can be updated via Terminal with the command: youtube-dl -U
    If this fails, the file can be downloaded directly from the website:
    https://rg3.github.io/youtube-dl/download.html

    For G3s
    Use the included G3 mplayer version

    How to use:

    Streaming
    Launch TonVid and search for your chosen video and right click on it and copy link location. (Note, TonVid default background is white - scroll to the preferences to change colours and layout).
    To stream the video, click your chosen streaming shortcut in the dock.
    Note there is a delay while youtube-dl does it's stuff before launching mplayer - I'd personally only recommend streaming for long videos, for shorter clips downloading is quicker.

    Whilst the video is streaming mplayer can be controlled by keyboard shortcuts:

    9 - volume down
    0 - volume up
    command + 0 - half size
    command + 1 - original size
    command + 2 - double size
    space - pause/play
    cursor right - forward 10 seconds
    cursor up - forward 1 minute
    f - full screen
    esc - quit


    When the video finishes, mplayer and Terminal will quit.

    Downloading/Grabbing
    As before right click on a video and copy the link location, click on the Dock shortcut that corresponds with the quality of video you want to download.
    A Terminal window will open and start downloading - when complete, the download folder will open automatically so you can play your file.
    Grabbing downloads the video in similar fashion but plays it back on completion then deletes it - full credit goes to @TheMrKocour for this, as he came up with it.

    Customizing the scripts.

    All the scripts can be edited in TextEdit or similar - here you will see the command line options for youtube-dl and mplayer, anyone with experience of command line can then edit away to achieve the result they want.

    I've included the mplayer command list and the youtube-dl commands can be seen here:

    https://github.com/rg3/youtube-dl/blob/master/README.md

    mView and mViewX are droplets that facilitate playback in mplayer. To use, simply drag a video file onto them and mplayer will launch it - I've found this is essential for 360P video playback on my G3 iMac.
    mView plays the file at it's full quality while mViewX applies some hard frame dropping to make unplayable files work - particularly useful on G4s that struggle with 720P.

    Download here.

    1Ghz G4 Titanium Powerbook 360P streaming
    Picture 1.jpg
    1Ghz G4 Titanium Powerbook 240P streaming
    Picture 2.jpg
    1Ghz G4 Titanium Powerbook "worst" streaming
    Picture 3.jpg
    1Ghz G4 Titanium Powerbook 720P playback
    Picture 4.jpg
     
  2. dustinschings macrumors 6502

    dustinschings

    Joined:
    Sep 3, 2015
  3. CooperBox macrumors 6502a

    CooperBox

    Joined:
    Nov 28, 2010
    Location:
    France - between Ricard & Absinthe
    #3
    I too plan to try this. Just wondering whether I'll make home-base though......
     
  4. Lastic macrumors 6502a

    Joined:
    Mar 19, 2016
    Location:
    North of the HellHole
    #4
    Wow, impressive work, glad that something on Tiger is working but don't write off SMtube on Tiger yet, I just need more time to get it working :)
     
  5. Dronecatcher thread starter macrumors 68020

    Dronecatcher

    Joined:
    Jun 17, 2014
    Location:
    Lincolnshire, UK
    #5
    I'm sure it's only a matter of time..

    The bar for SMtube on Tiger for me is space - my Tiger machines have smaller disks so that extra 2.5Gb would be noticed!
     
  6. LightBulbFun macrumors 65816

    LightBulbFun

    Joined:
    Nov 17, 2013
    Location:
    London UK
    #6
    any idea how this will run on something like a 604? :)
     
  7. Dronecatcher thread starter macrumors 68020

    Dronecatcher

    Joined:
    Jun 17, 2014
    Location:
    Lincolnshire, UK
    #7
    If it's running Tiger it might work. On my G3 iMac it's not the video playback that's hard, it's youtube-dl doing it's thing that takes a while.
    The iMac plays 240P at 30% CPU but you can go to a lower resolution using "worst" parameter in the youtube-dl command line - your video is the size of a postage stamp however....
     
  8. sawpits macrumors member

    Joined:
    Feb 28, 2014
    #8
  9. Dronecatcher thread starter macrumors 68020

    Dronecatcher

    Joined:
    Jun 17, 2014
    Location:
    Lincolnshire, UK
    #9
    Yes, I've tried lots of extensions but the problem is browsing Youtube on TFF - even with most of the javascript blocked (NoScript) my 1.67Ghz Powerbook struggles and is often pushing 100% CPU.
    I wanted streaming, downloading and a browser that is speedy, for G4s mainly.
     
  10. Imixmuan macrumors 6502

    Joined:
    Dec 18, 2010
    #10
    Very, very impressive work Dronecatcher! PowerPC not dead, not dead even a little.
     
  11. bobesch macrumors 6502a

    bobesch

    Joined:
    Oct 21, 2015
    Location:
    Kiel, Germany
    #11
    Thanks for that big stuff - I will certainly need a weekend to try that.
    For my G4-Books I'm going to stay with "webkit plus ClickToPlugin / download / CorePlayer" - the way to enjoy YT-video I've also learned from You and other'S - bright people here in this forum.
    The latest webkit doesn't support webkit anymore, so I stick with a version 6.1... from December 2016 to keep ClickToPlugin-Support.

    I'm definitively looking forward to try out your current enhancements!
     
  12. Dronecatcher thread starter macrumors 68020

    Dronecatcher

    Joined:
    Jun 17, 2014
    Location:
    Lincolnshire, UK
    #12
    It would be great if some coder could wrap all this up into one app :)
     
  13. QSDP-User, Feb 7, 2017
    Last edited: Feb 7, 2017

    QSDP-User macrumors regular

    QSDP-User

    Joined:
    Jan 13, 2015
    Location:
    California, USA
    #13
    iBook G4 [1.07 GHz 512 RAM] Tiger 10.4.11

    This laptop is a bit banged up, missing a couple keys - Sister found it someplace outside abandoned.
    Got an $8 power adapter & found it booted up with Debian.
    Battery is a lost cause, the 99% icon must mean 99% defective ;)
    ...unplug the adapter & the charge lasts about 20 seconds.

    The downloaded 240p runs smooth. Quicktime opened it by default.
    MenuMeters CPU @ 45%

    Edit: A downloaded T-Raider walkthrough 360p ran smooth with mplayer.
    CPU average ~56%

    The 1 GHz cpu struggles with browser-based videos, even the 240p versions.
    RAM could be upgraded, but I'll pass on spending more for this iBook G4.

    Thanks for the work, Dronecatcher!


    Conan TR Gameplay.jpg
     
  14. Dronecatcher thread starter macrumors 68020

    Dronecatcher

    Joined:
    Jun 17, 2014
    Location:
    Lincolnshire, UK
    #14
    Glad you can use it and it's been helpful.

    Doesn't my mView app you've got in the dock open the 240P 3gp files - it should? It will open fullscreen but pressing f will return it to a window.
    VLC is also good for 3gp.
     
  15. QSDP-User, Feb 8, 2017
    Last edited: Feb 8, 2017

    QSDP-User macrumors regular

    QSDP-User

    Joined:
    Jan 13, 2015
    Location:
    California, USA
    #15
    Ah yes, it had been a while since I used your earlier scripting contributions & video app suggestions.
    I think for a G3 I'd changed the script so mView wouldn't automatically pop into play.
    I must have file transferred over the changed script.
    Any downloaded video when dragged on mView plays great.
    vlc also sits in the arsenal of goodies.

    Edit: For clarity regarding my 1st post about Quicktime opening the downloaded 240p 3gp file by default:
    When the 3gp file finished downloading it sat idle in the downloads folder.
    I double-clicked on it & Quicktime happened to open the file & then waited for me to click on the play button.
    Possibly a script change by me made that "downloaded idleness" happen
    (if it wasn't supposed to),
    but any further recalling of all this processing has made my brain implode.
     
  16. Dronecatcher thread starter macrumors 68020

    Dronecatcher

    Joined:
    Jun 17, 2014
    Location:
    Lincolnshire, UK
    #16
    Here we go....300Mhz iBook Clamshell streaming 240P Youtube - at 57% CPU.
    Can anyone go any lower?
    :)

    1.jpg
     
  17. LightBulbFun macrumors 65816

    LightBulbFun

    Joined:
    Nov 17, 2013
    Location:
    London UK
    #17
    its a shame my Kanga does not have any means of an internet connection :D (the PC Card slots dont work in tiger and it has the ethernet only ethernet card that does not work under any version of OS X)
     
  18. Dronecatcher, Feb 9, 2017
    Last edited: Feb 9, 2017

    Dronecatcher thread starter macrumors 68020

    Dronecatcher

    Joined:
    Jun 17, 2014
    Location:
    Lincolnshire, UK
    #18
    If it was connected I think the Kanga could manage it - I suspect 200Mhz might be the limit.
    --- Post Merged, Feb 9, 2017 ---
    Switching to thousands of colours and uninstalling Perian knocks 10% off CPU....

    1b.jpg
     
  19. LightBulbFun macrumors 65816

    LightBulbFun

    Joined:
    Nov 17, 2013
    Location:
    London UK
    #19
    CPU maybe but what are the min ram requirements? :D

    upload_2017-2-9_22-22-21.png
     
  20. philgxxd macrumors member

    philgxxd

    Joined:
    Feb 11, 2017
    Location:
    Malaga, Spain
    #20
    Thanks a lot.
    So far the streaming function is not working for me. Terminal just quits but i can not say what it is throwing out as error message as it closes so fast.
    How can i edit it so it doesn´t close the Terminal window?
     
  21. Dronecatcher thread starter macrumors 68020

    Dronecatcher

    Joined:
    Jun 17, 2014
    Location:
    Lincolnshire, UK
    #21
    You can edit YT in TextEdit - remove killall Terminal then it will remain open.

    Chances are your video isn't available at 240P resolution, if you look through the youtube-dl command line parameters it may be possible to write the script so it selects the next quality along - I never went that far, as I said, I'm not a coder :)
     
  22. philgxxd macrumors member

    philgxxd

    Joined:
    Feb 11, 2017
    Location:
    Malaga, Spain
    #22
    Thanks for the quick response. It is working. Possibly it was just the youtube channel I was trying to watch some episodes from. Some random tries and it started right away.
     
  23. Slix macrumors 6502a

    Slix

    Joined:
    Mar 24, 2010
    #23
    Tried this out today on my Power Mac G3 300 MHz running Tiger with 256 MB RAM. I didn't use the TenFourFoxBox, but after trying it a few times, it never seemed to progress the loading percentage in the terminal window... I'll try this later with my MDD or PowerBook G4 and see if it's just that the amount of RAM isn't enough for something like this.

    Looking through the documentation for the youtube-dl script, it seems it would be possible to use this to play fast loading audio clips too (for songs, or playlists of songs). Anyone up for the challenge? :) I'll try to look at that once I get the YouTube bit working. :p
     
  24. Slix macrumors 6502a

    Slix

    Joined:
    Mar 24, 2010
    #24
    Don't mean to double post, but since no one has replied, I figured I should so someone will see this.

    I just tried this out on my MDD running 10.5, and it seems to be having a different issue now. I'm getting an error:

    [youtube] vpAB1NjtGu0: Downloading webpage
    ERROR: Unable to download webpage: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)> (caused by URLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)'),))

    This happens after the MPlayer text shows up in the terminal, so it's making some progress, but for whatever reason, every video I've tried is doing this. Ideas?
     
  25. Dronecatcher thread starter macrumors 68020

    Dronecatcher

    Joined:
    Jun 17, 2014
    Location:
    Lincolnshire, UK
    #25
    I don't know whether this will make a difference but do you have the latest version of youtube-dl installed?
    If you also use the PPC Media Center that will update it for you, otherwise in Terminal type:

    youtube-dl -U
     

Share This Page