Copy Pepper flash videos from Chrome storage - lmmx/devnotes GitHub Wiki

No longer works? VLC won't play files anymore, lacks decoder for file type 'undf'. All files are suspiciously 4 bytes, 8.2kB, or 1.4MB.

Streaming video can be slow and it's difficult to skip ahead in certain players.

A recent conference streamed its videos online, but not within a service like YouTube which publicly available downloader sites will work with.

Streaming a video in Google Chrome generates flv files automatically on your local machine, which can be accessed simply. I read a blog post describing how Chrome's flash player (pepper) can be accessed from the command line on unix machines, from a store which is deliberately made to appear empty.

  • This wasn't the post, but describes how they're "almost deleted"

While completing other work, I left all videos from this conference streaming - note that they must be left uninterrupted, and set to the highest quality where available. Skipping will create fragmented flv cache files.

Find the PID of Chrome's flash plugin

ps ax | grep -i chrome | grep -i flash via

16452 ?        Sl    19:29 /opt/google/chrome/chrome --type=ppapi --channel=[not needed] --ppapi-flash-args --lang=en-GB

The flash plugin used to be libgcflashplayer but is now ppapi (Pepper Plugin API). In my case the process ID (pid) is 16452:

sudo ls -al /proc/16452/fd will show all symbolic links, including those 'deleted', so jump into sudo -i:

procnum=16452
ls -al /proc/"$procnum"/fd | grep Chrome | awk '{print $9}'

Each symlink here is a number (seemingly below 100), pointing at /run/shm/.com.google.Chrome.{6_character_alphanumeric_code}, all marked (deleted).

Automate the mass move to normal files with awk (sorry):

cpcommands=$(ls -al /proc/"$procnum"/fd | grep Chrome | awk -v procvar="$procnum" '{print "cp /proc/"procvar"/fd/"$9" /home/louis/Desktop/vid"$9".flv"}')
while read line; do eval "$line"; done < <(echo "$cpcommands")

NB awk won't take variables identically named to shell variables, so procvarprocnum

chmod 777 /home/louis/Desktop/vid*.flv afterwards.

⚠️ **GitHub.com Fallback** ⚠️