Jun 26, 2011

Save Streamed Flash Video [Firefox-4] [Linux]

It cost me almost half an hour to find the location, where Firefox saves the streamed video. And I made a script for it as I often need it. Here's the script, hope it helps you:

file /proc/$(pidof npviewer.bin)/fd/* | grep -i "flash" | \
  cut -d':'  -f1 | xargs -i{} cp {} ./ 

Details of what the command will do:
Fifefox-4 uses an external process (npviewer.bin) to manage external plugins. So what I did was grabbed a copy of the deleted flash file (yea it deletes the file, but keeps a secret opening for itself) from npviewer.
Finally all the cached video are copied to current path named with some random numbers (technically, the number is file-descriptor).

Warning: Execute the command after complete streaming and before closing the firefox(-tab).

No comments: