Register
It is currently Mon Dec 22, 2014 5:45 pm

need a script for youtube to convert and output a .flv url


All times are UTC - 6 hours


Post new topic Reply to topic  [ 3 posts ] 
Author Message
 PostPosted: Tue Dec 21, 2010 4:57 am   

Joined: Tue Dec 21, 2010 4:30 am
Posts: 2
I've seen a bunch of scripts that allow one to download or convert youtube videos, but I'm trying to convert a standard youtube url to a url that ends with .flv (something like http://www.youtube.com/get_video?video_id=TJhP6pyVu20.flv). can this be accomplished using the shell? ultimately this would be for a little streaming application I'm working on in Max/MSP, so i need to access the videos remotely

Any ideas?

Thanks,
Eddie


Top
 Profile  
 PostPosted: Thu Dec 23, 2010 9:29 am   
Moderator
User avatar

Joined: Wed May 03, 2006 2:05 pm
Posts: 242
Hi Eddie! How is that link generated? I'm seeing some posts that say that get_video doesn't work anymore... If you do have a link that works, and a way to reliably translate the standard URL, it should be fairly easy to script out :)


Top
 Profile YIM  
 PostPosted: Mon Dec 27, 2010 2:39 pm   

Joined: Tue Dec 21, 2010 4:30 am
Posts: 2
Hi Jeo,

Sorry for the delay in response...been busy with family for the holidays and such.

Actually I just made up the .flv extension as an example for what I was looking for.

As far as retrieving the youtube video id, I've been parsing an xml file of a youtube video retrieved using a web API from the music information company "the EchoNest" (they provide nice information related to bands...music video links, etc). Here is the page where I used the API to retrieve the xml file (I modified the example a bit): http://developer.echonest.com/docs/v4/artist.html#video

Here is the modified example: http://developer.echonest.com/api/v4/artist/video?api_key=N6E4NIOVYMTHNDM8J&name=radiohead&format=xml&results=1

The xml file returns the standard youtube url of a radiohead concert (http://www.youtube.com/watch?v=h_eBqlFpnNY) as well as the video id (81722f06b70922cb47fd424caae545a2).

Here are a couple of relatively recent stackoverflow links that might help to provide a solution...one uses curl, the other python. Youtube always seems to be one step ahead...

http://stackoverflow.com/questions/3850934/downloading-flv-from-youtube-using-curlpp-on-top-of-curl-video-not-playing

http://stackoverflow.com/questions/2678051/cant-download-youtube-video

Sorry I couldn't help much / for writing such a long post!

P.S. it would also be awesome to have a bash script for parsing Vimeo urls, as I've read that vimeo uses the .M4A format, and they are much more lenient than youtube...

Cheers,
Eddie


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP