Convert SWF to MPG — Free Online Tool

Convert SWF Flash files to MPG video using MPEG-2 video and MP2 audio encoding — ideal for archiving legacy Flash animations and interactive content into a broadcast-compatible format. This tool runs entirely in your browser via FFmpeg.wasm, so your files never leave your device.

FFmpeg Command

Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg

Free — no uploads, no signups. Your files never leave your browser.

Estimated output:

Conversion Complete!

Download

How It Works

SWF files typically contain vector-based animations or video encoded with the FLV1 (Sorenson Spark) or MJPEG codec, along with MP3 or AAC audio. During conversion, FFmpeg decodes the SWF's video stream and re-encodes it using the MPEG-2 video codec (mpeg2video), which is a lossy process that trades the original vector or compressed frame data for a raster-based MPEG-2 bitstream. The audio — often MP3 in SWF — is transcoded to MP2, the standard audio codec for MPEG program streams. Because SWF can contain interactive ActionScript logic, vector paths, and layered timeline elements, only the rendered video and audio output is captured; interactivity and vector scalability are lost in the resulting MPG file. The output is a standard MPEG program stream (.mpg) broadly compatible with DVD players, broadcast systems, and legacy video software.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg tool, which handles all demuxing, decoding, re-encoding, and muxing for this SWF-to-MPG conversion pipeline.
-i input.swf Specifies the input SWF file. FFmpeg uses its SWF demuxer to extract the embedded video (typically FLV1-encoded) and audio (typically MP3) streams from the Flash container.
-c:v mpeg2video Re-encodes the video stream using the MPEG-2 video codec, which is required by the MPG container format and ensures compatibility with DVD players, broadcast systems, and VCD/DVD authoring tools.
-c:a mp2 Transcodes the audio — typically MP3 in the source SWF — to MP2 (MPEG-1 Audio Layer II), the standard audio codec for MPEG program streams and the default for MPG containers used in broadcast and DVD applications.
-q:v 2 Sets the MPEG-2 video quality using the variable quantizer scale, where 1 is the highest quality and 31 is the lowest. A value of 2 produces near-maximum visual fidelity, appropriate for archiving Flash animation content where detail preservation matters.
-b:a 192k Sets the MP2 audio output bitrate to 192 kilobits per second, which provides good audio quality for speech, music, and sound effects commonly found in Flash animations without producing unnecessarily large files.
output.mpg Defines the output filename and triggers FFmpeg to mux the MPEG-2 video and MP2 audio into an MPEG program stream (.mpg), the standard container format for MPEG-1/2 video used in VCD, DVD, and broadcast contexts.

Common Use Cases

  • Archiving old Flash-based web animations before they become completely inaccessible, converting them to MPG for long-term storage on DVD or video archives
  • Preparing Flash e-learning or training modules for playback on DVD players or broadcast kiosks that only support MPEG-2 video
  • Recovering video content from SWF files embedded in legacy CD-ROM or web presentations and converting it to a universally readable MPG format
  • Submitting Flash-origin video content to broadcast stations or post-production workflows that require MPEG-2 program streams
  • Converting SWF promotional animations created in Flash to MPG for inclusion in DVD menus or VCD compilations
  • Extracting the rendered video output of an SWF-based motion graphic or intro sequence for use in traditional non-linear video editors that do not support Flash

Frequently Asked Questions

No. MPG is a purely linear video format and cannot store ActionScript, interactive buttons, or vector timeline logic from SWF. FFmpeg renders only the visual and audio output of the SWF — essentially treating it like a video playback — and encodes that rendered stream into MPEG-2. Any interactivity, branching, or vector scalability from the original Flash file is permanently discarded.
SWF files are extremely compact because they store vector graphics and animation instructions rather than raw pixel data, and they use Flash's own compression. MPG files, even compressed with MPEG-2, store fully rasterized frame data at a fixed resolution. The shift from vector-plus-instruction storage to raster video encoding means the MPG will almost always be significantly larger, regardless of the quality setting used.
The '-q:v 2' flag sets MPEG-2 video quality on a scale of 1 (best) to 31 (worst), so a value of 2 produces near-maximum quality output. For archiving Flash animations where visual fidelity matters, this default is appropriate. If you need smaller file sizes and can tolerate some quality loss — for example, when burning to VCD with tight disc space — you can increase the value to something like '-q:v 6' or higher in the command.
Replace the '-b:a 192k' flag in the command with your desired bitrate. For example, use '-b:a 128k' for a smaller file or '-b:a 256k' for higher fidelity MP2 audio. Keep in mind that SWF files often contain MP3 audio at 128k or lower, so increasing the output bitrate beyond the source quality will not recover detail — it will only increase file size. A full example: 'ffmpeg -i input.swf -c:v mpeg2video -c:a mp2 -q:v 2 -b:a 256k output.mpg'.
Yes. On Linux or macOS you can use a shell loop: 'for f in *.swf; do ffmpeg -i "$f" -c:v mpeg2video -c:a mp2 -q:v 2 -b:a 192k "${f%.swf}.mpg"; done'. On Windows Command Prompt, use: 'for %f in (*.swf) do ffmpeg -i "%f" -c:v mpeg2video -c:a mp2 -q:v 2 -b:a 192k "%~nf.mpg"'. The browser-based tool processes one file at a time, so the desktop FFmpeg command is the recommended approach for batch jobs.
MPEG-2 video with MP2 audio in a program stream is the foundation of DVD video, so the codec combination is correct. However, for full DVD compatibility you also need to match specific resolution and frame rate requirements (e.g., 720x480 at 29.97fps for NTSC or 720x576 at 25fps for PAL) and package the streams in a DVD-compliant VOB structure using a tool like dvdauthor. The raw MPG output from this conversion will play on many devices but may not pass strict DVD authoring validation without additional processing.

Technical Notes

SWF is a uniquely challenging input format for FFmpeg because its content model differs fundamentally from traditional video containers. FFmpeg's SWF demuxer can extract embedded FLV1-encoded video frames and MP3 audio from SWF files, but purely vector-based SWF animations without an embedded video stream may not convert correctly or may produce a blank output — FFmpeg cannot natively render ActionScript or vector paths at runtime. The output MPEG-2 video stream uses intra-frame (I-frame) and inter-frame (P/B-frame) compression; at '-q:v 2', the quality is high but the format is inherently lossy and raster-based, meaning any scaling artifacts present in the decoded SWF frames will be encoded into the MPG. The MP2 audio codec used in the output is a standard for MPEG program streams and is broadly compatible with DVD and broadcast infrastructure, though it lacks the efficiency of AAC. SWF files do not carry standard metadata fields (like title or author tags in the video stream), so the MPG output will contain minimal embedded metadata. Transparency is not supported in either SWF-to-video extraction or the MPG container, so any alpha-channel compositing in the original SWF will be rendered against a default background (typically black).

Related Tools