Extract embedded Flash (SWF) files from a PowerPoint presentation

Filed Under IT Tipz & Trix

I was recently asked by my boss if I could dump all of the Adobe Flash videos out of our corporate PowerPoint presentation so that we can convert them to .mp4/.mov so we can put some of the animations on iPhone so our reps can show them to the customer.

It really is not as easy as it looks!

I googled a fair few sites looking for answers and there really isn’t much out there that will do this auto-magically for you. So I rolled my own 🙂

The procedure is very simple.

  • 1. Open PowerPoint file and ensure that it is saved as .pptx (the new XML Office format)
  • 2. Rename the .pptx as a .zip file (we all know that the new format is already zipped up right?)
  • 3. Open the .zip file in winrar/winzip or your preferred utility
  • 4. Navigate to the .\ppt\activeX directory in the archive
  • 5. Extract all the .bin files to another directory
  • 6. Run the php script below on it

All the script does is scan the files in the current directoy to see if they are .BIN files (which is where PowerPoint stores SWF files, as well as other embedded file types), search through that file for the beginning of the SWF file header (denoted by FWS), read the file length as defined in the header and save that section out to a new file with a .swf file extension.

Simples really 🙂

As always, hope it helps someone. Script follows :

  Read more