commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Alias to play flash videos with mplayer. You can replace mplayer with your favorite video player.
This alias supports Chrome & Firefox's way of handling the flash plugin. It will play all the videos in the cache. Note that certain videos might never make it to the cache, if the publisher ask for them not to: they will just be loaded in RAM.
A variant if you're just interested in playing the audio, for example for a music :
alias flashmusic="mplayer -vo null \$(find /proc/\$(pgrep -f 'libgcfl|libflashplayer')/fd/ -printf '%p %l\n' |grep FlashXX | cut -d\ -f1)"
There are 3 alternatives - vote for the best!
Certain Flash video players (e.g. Youtube) write their video streams to disk in /tmp/ , but the files are unlinked. i.e. the player creates the file and then immediately deletes the filename (unlinking files in this way makes it hard to find them, and/or ensures their cleanup if the browser or plugin should crash etc.) But as long as the flash plugin's process runs, a file descriptor remains in its /proc/ hierarchy, from which we (and the player) still have access to the file. The method above worked nicely for me when I had 50 tabs open with Youtube videos and didn't want to have to re-download them all with some tool.
If you can do better, submit your command here.
You must be signed in to comment.