Saturday, November 22, 2008

FLV video grabber for Linux

As I see, it is possible to grab the video cached by your browser. For example, flash video your watching using youtube or any other video streaming site is caching in your browser cache while playing. If the caching bar of the streaming player completes the task, from the browser cache it is possible to grab that video.

This method is very useful because we don't have to download the video twice for future watching and waste our limited quota of download or the bandwidth.

Note that if you restart the browser or start playing another video in same player, browser will automatically delete earlier video cache. Therefore you have to do it before the player releases the cached file.

Here I have created an example script to grab FLV files from firefox web browser in Linux

files=`file $( du -sh $cache/* | grep M | awk '{print $2}') | grep Flash | awk -F ':' '{print $1}'`
for video in $files
cp $video $videopath/$(date +%F_%H-%M-%S).flv

No comments:

Post a Comment