Wednesday, April 22, 2009

get_video, keepvid, and youtube videos

keepvid doesn't seem to be working anymore for grabbing videos from youtube. In the past, I needed a video from Metacafe and couldn't find a utility for getting the video, and the source in the page didn't reveal any obvious links.

As a reminder to myself, the tcpdump command is somewhat helpful in this situation:

tcpdump -A -i eth0 -s 10000 | grep -A6 -B6 "GET"

Using the above command (I think the -s 10000 is redundant), it is somewhat easy to find the command to grab a video. With you tube videos (be sure to set the fmt= parameter to whatever you want) and redirect your browser to the www.youtube.com/watch?... page). The tcpdump will show you the GET get_video?video_id... that you need to grab your video. I think with the newer formats, you may need to use the videoplayback?id GETs.

Still need to write a script to process that stuff for me.