[vox] Streaming flash videos yourself (no YouTube or Google Video needed)

Bill Kendrick nbs at sonic.net
Tue Feb 13 21:26:24 PST 2007


On Tue, Feb 13, 2007 at 06:16:38PM -0800, Don Armstrong wrote:
> 
> Videodownloader (a firefox plugin) and a few other tools make ripping
> the video out of the flash containers fairly trivial.

Indeed.  Content you'd like to view later, or on a different device
(say your PSP?) need not be stuck forever within *Tube or G*video webpages. :)

Clever shell scripting, plus 'ffmpeg', are exactly what's called for.

Here's a shell script I call "youtube2mpg.sh" that I threw together
based on something I found over at kde-apps.org:


-- begin --

#!/bin/sh

FFMPEG_OPTIONS='-ab 56 -ar 22050 -b 500 -s 320x240'
you="http://youtube.com/get_video.php?"

if [ $1x = "x" ]; then
        echo Usage: youtube2mpg.sh URL FILE.mpg
        exit
fi

if [ $2x = "x" ]; then
        echo Usage: youtube2mpg.sh URL FILE.mpg
        exit
fi

wget "$1" -O /tmp/y1
youswf=${you}`grep player2.swf /tmp/y1 | cut -d? -f2 | cut -d\" -f1`;

echo "Downloading $youswf"
wget "${youswf}" -O /tmp/y.flv

ffmpeg  ${FFMPEG_OPTIONS} -i /tmp/y.flv "$2"

mplayer "$2"

-- end --

Note: I haven't actually had any USE for it since I wrote it, and can't
vouch that it still works as-is.


-bill!


More information about the vox mailing list