Grabbing Flash Video From Youtube

| 2 Comments | 1 TrackBack

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:

# by Crouse - Program name ytr = Ripper
clear; baseurl="";
mkdir -p ~/YouTube ; mkdir -p ~/YouTube/tmp ; cd ~/YouTube/tmp ; echo " ";
read -p "What is the 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 TrackBack

from stealing flash video - Irish Developer on April 15, 2007 12:28 AM

TITLE: URL: IP: BLOG NAME: stealing flash video - Irish Developer DATE: 04/15/2007 12:28:58 AM Read More


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 ?


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.

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.


OpenID accepted here Learn more about OpenID
Creative Commons License
This blog is licensed under a Creative Commons License.
Powered by Movable Type 5.02