Macromedia Flash cache

Revision as of 09:48, 23 October 2007 by Root (Talk | contribs) (Mac OSX)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Flash player cache fun

It's possible to copy the files from most video web sites that use Flash (YouTube). Flash will save all video data to a cache file. The native Flash video format is MPEG4, so any decent video player will have no trouble with it (VLC and Mplayer). You just have to know where the cache files are kept. It's a little easier on Linux, but it is not too hard to find them under Mac OSX too.

This will show what files the Macromedia Flash player is storing in the Mozilla cache on Linux:

 find ~/.mozilla -regex '.*Cache.*' -exec file {} \;

If you are looking for music or audio files you can further filter this through grep:

 find ~/.mozilla -regex '.*Cache.*' -exec file {} \; | grep ADTS


 find ~/.mozilla -regex '.*Cache.*' -exec file {} \; | grep Stereo

When you have located MPEG audio files you can simply rename them to FILENAME.mp3 and they should play in any MP3 player.

You can also find Flash Video files. Rename them to FILENAME.flv. Note that Flash streams to these files, so you want to make sure it has finished the entire song or video before you copy the file somewhere else.


The Mac version of Firefox puts Flash cache files here (the directory name, "29ba6v03.default", will vary):


The Mac OSX version of Flash seems to preallocate the entire file, so it can be a little harder to know when Flash is finished streaming data to the file because the file size never changes. Also, the Flash on the Mac will delete the file when it is finished downloading, but Flash keeps the file open, so it can still read the data (the filesystem doesn't reclaim the inodes until the last file descriptor to the file is closed). This makes getting the entire video very tricky...

The OSX version of `find` is not as good at identifying files. Most video files identify simply as "data", so it requires a little more guessing to figure out which files are video. Usually I look for the big files that identify as "data".