eHow launches Android app: Get the best of eHow on the go.

How To

How to Extract Video from SWF Files

Member
By Gitaagami
User-Submitted Article
(4 Ratings)
Swf to Flv
Swf to Flv

Shockwave files (swf) can contain video and audio as well as static and animated images. However, to use the audio or video it needs to be extracted first. Here's one fairly simple method that uses 2 freeware Windows apps.

Difficulty: Easy
Instructions

Things You'll Need:

  • Swifty Unlock
  • FFMpeg
  • Text editor (Notepad)
  1. Step 1

    Download and un-zip the apps to either the directory where the swf files are located or to their own folders for regular use. Unlock runs on a double click, FFMpeg can be run from a batch file.

  2. Step 2
    Swifty Unlock
     
    Swifty Unlock

    Get some information on your swf file. Open the file in Swifty Unlock. If the file is compressed (see #1 in the picture), un-check the "Save Compressed" box as in #2, then save (#3). I prefer to save to a new file, as a "just in case" but it's not required. Swf files must be un-compressed to use them with FFMpeg.

  3. Step 3

    Make a batch file for FFMpeg. Start your preferred text editor. Notepad or the like will do. To extract the video and audio to a single video file, enter this all on one line:

    ffmpeg -i your_swf_file.swf -vcodec copy -acodec copy -y your_new_file.flv

    with the input and output files named to your needs. If FFMpeg isn't in the same directory as the swf files, use something like this with full file paths in quotes:

    "C:\Path\to\ffmpeg.exe" -i "C:\Path\to\your_swf_file.swf" -vcodec copy -acodec copy -y "C:\Path\to\your_new_file.flv"

    Save the text file as "Extract.bat" or something similar and double-click to run. There'll shortly be an extracted flv video file in the working folder.

Tips & Warnings
  • Optionally, for just audio replace "-vcodec copy" with "-vn" and change flv to mp3. For just video, replace "-acodec copy" with "-an" and leave the extension as flv.
  • Also, replacing the whole input filename with "%1" and the output filename with "%1.flv" (or "%1.mp3") allows for the batch file to be saved and reused by simply dragging the swf file onto the batch file.
  • For those inclined, FFMpeg can be compiled from source code, which allows for the choice of options to meet your needs. However some knowledge of compiling apps, and an appropriate compiler, are required. For those using pre-compiled versions, there are several sources. It can be convenient to keep several builds on hand to handle different circumstances such as older formats dropped from more current FFMpeg builds.
  • Not all pre-compiled FFMpeg builds are created the same. This guide was written with FFMpeg rev9494 from http://ffdshow.faireal.net/mirror/ffmpeg/. The more current rev12665 didn't convert the video, but did work for the audio.
  • Extracting audio/video from a swf file is different from converting swf files to video. For that, Swf2Avi is a likely option.
  • Not all swf files are made equal either. Your mileage may vary...

Comments  

Gitaagami said

Flag This Comment

on 7/21/2008 Hey thanks! That's really encouraging.seeing as you've been at it for a while and I'm just leapin' in.

Kilogramm said

Flag This Comment

on 7/21/2008 Great break down on such a difficult topic!

Subscribe

Post a Comment

Post a Comment

Related Ads

  • Have you done this? Click here to let us know.
I Did This
Tags
Get Free Computers Newsletters

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy.   en-US Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.

eHow Computers
eHow_eHow Technology and Electronics