I found a script on the internet that allows me to save cached flash files.
This would allow me to run the command
saveflash in a terminal to list flash videos and filesizes. And then I could run something like
saveflash -n 2 nameofvideo.mp4 to save it. I even added the capability to demux the audio out of the video.
I'm trying to do the same for non-flash videos that are cached by firefox. I would like a command, or set of commands that I can run to list the video files and then save them.
It's a little more convoluted. I have to use lsof to list open files, find ones that have a suitable filesize and then get the proc and fd to use for the copy command.
Right now, I do it manually, running a command like this:
lsof -c firefox | grep -i deleted
lsof command takes a few seconds to complete. And then I have to manually put together the copy command based on what the
lsof command says that the
fd of the file is, then I would do a command like:
cp /proc/3164/fd/55 "~/Videos/Name of Video.mp4"
What's the best way to speed up/simplify this process? I'd like to make it into a script eventually.