View Single Post
gogol's Avatar
Posts: 177 | Thanked: 57 times | Joined on Aug 2007 @ Washington State, USA
#1
Edit: Scroll down to the bottom to get the newest perl script. You simply bookmark videos you're interested in and then run the script. It scans your bookmarks, downloads and properly names them - storing em in 770's .videos folder. Only requirement is wget ( link )
-------
Hi all, I'm new here
I was really disappointed that I couldn't get youtube rtsp links from http://m.youtube.com to work with mplayer... so after a bit of hacking and googling I came up with this instead, which is actually a bit nicer since you aren't limited to teh mobile collection of vids:

Basically it involves a bash script that wgets (through the goofy youtube redirection that tries to hide the direct link to) the video and then plays it out, optionally deleting the file afterwards.

To do it I had to install bash and wget, available here:

bash
wget

..then make a script that goes like so:
Code:
#!/usr/bin/bash
baseurl=’http://youtube.com/get_video.php?’
pageurl=$1
wget -O - $baseurl`wget -qO - $pageurl | grep player2.swf | cut -d? -f2 | cut -d\” -f1` > /home/user/tmptube.flv
mplayer /home/user/tmptube.flv
(taken with very little change from here )

chmod a+x your script and mv it to /usr/bin to make things easier later.

Obviously you'll also need the osso-xterm package installed, I'm assuming if you got this far you have it already.

Then you just copy the name of the vid you want to watch, paste it in to the terminal after the name of your script and away you go!

Now, is there any way to expediate this? Copy/open terminal/paste... Can mplayer stream the unmungled http link directly? Any ideas?

Last edited by gogol; 2007-08-18 at 05:38. Reason: to point to updated script
 

The Following 2 Users Say Thank You to gogol For This Useful Post: