Grabbing Flash Video From Youtube

| | Comments (2) | TrackBacks (1)
Dave posted "stealing flash videos" in Windows, so I decided how simple it would be to do the same in Linux. A quick search found a bash script for doing exactly what I want. It also had the added bonus of converting it into an Mpeg video. The only requirements are bash, wget and ffmpeg. An application to play the mpeg might also be handy. The version of the script that I'm using is:
#!bin/bash # by Crouse - Program name ytr = YouTube.com Ripper clear; baseurl="http://youtube.com/get_video.php?"; mkdir -p ~/YouTube ; mkdir -p ~/YouTube/tmp ; cd ~/YouTube/tmp ; echo " "; read -p "What is the youtube.com url you want to rip ? " urltorip ; read -p "What would you like to name the video (no spaces in the name) ? " nameofvideo ; wget ${urltorip} -O urlsource.txt ; fullurl=${baseurl}`grep player2.swf urlsource.txt | cut -d? -f2 | cut -d\" -f1` ; rm * ; wget "${fullurl}" -O temp.flv ; ffmpeg -i temp.flv -ab 56 -ar 22050 -b 500 -s 320x240 ${nameofvideo}.mpg ; mv ${nameofvideo}.mpg ../ ; rm -Rf ~/YouTube/tmp ; exit

1 TrackBacks

Listed below are links to blogs that reference this entry: Grabbing Flash Video From Youtube.

TrackBack URL for this entry: http://blog.moybella.net/cgi-bin/mt-tb.cgi/52

» from stealing flash video - Irish Developer

2 Comments

braz said:

Nice little script, but to tell the truth I've recently got a shiny new MacBook pro and found these two tools - TubeSock ($15) and GetTube. As for the mpeg player, won't MPlayer work ?

Braz,

This was only a quick and dirty search to see how easy it would be to on Linux, unfortunately I don't own a MacBook :( Converting to Mpeg was just an added bonus, I hadn't known that ffmpeg could read flv files.

Of course Mplayer will work, although I tend to use Totem these days as MPlayer has audio sync issues on my laptop.

Leave a comment

About this Entry

This page contains a single entry by Niall Donegan published on April 15, 2007 12:15 AM.

My Humps was the previous entry in this blog.

Why Excel Ends Up Being Used As A Database is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.01