Convert SWF to MP4 — Free Online Tool
Convert SWF Flash animations and interactive content to MP4 video using H.264 encoding, making legacy Flash files playable on any modern device or browser. Since Flash Player was discontinued in 2020, this tool lets you rescue and preserve SWF content by encoding it into a universally supported MP4 container with AAC audio.
to
FFmpeg Command
Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg
Drop your SWF file here
or click to browse
Free — no uploads, no signups. Your files never leave your browser.
Settings
Note: Browser-based encoding uses approximate quality targets. For precise CRF compression, copy the FFmpeg command above and run it on your desktop.
Estimated output:
Conversion Complete!
DownloadHow It Works
SWF files typically contain video encoded with the FLV1 (Sorenson Spark) or MJPEG codec alongside MP3 audio. During conversion, FFmpeg decodes the SWF's rasterized video stream and re-encodes it using the H.264 (libx264) codec, which offers far superior compression efficiency and near-universal device support. The audio track — usually MP3 (libmp3lame) inside the SWF — is decoded and re-encoded to AAC, the standard audio codec for MP4 containers. Because SWF is an interactive vector-based format, only the rendered video and audio content is captured; interactive elements like clickable buttons, ActionScript logic, and vector animations are baked into the raster video output. The -movflags +faststart flag repositions the MP4 metadata to the beginning of the file, enabling progressive playback before the full file downloads.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg tool, which handles the entire SWF demuxing, decoding, re-encoding, and MP4 muxing pipeline locally in your browser via WebAssembly. |
-i input.swf
|
Specifies the input SWF file. FFmpeg uses its built-in SWF demuxer to parse the file and extract any embedded FLV1 or MJPEG video streams and MP3 audio tracks. |
-c:v libx264
|
Re-encodes the extracted SWF video stream (typically FLV1/Sorenson Spark) using the H.264 encoder, producing output that is compatible with virtually every modern device, browser, and platform — unlike FLV1 which has no native support anywhere today. |
-c:a aac
|
Transcodes the SWF's embedded MP3 audio to AAC, which is the standard audio codec for the MP4 container and required for reliable playback on iOS, Android, and most streaming platforms. |
-crf 23
|
Sets the H.264 Constant Rate Factor to 23, a perceptually balanced quality level. Given that SWF source video is typically encoded at low bitrates with FLV1, this CRF preserves the available quality without inflating file size unnecessarily. |
-b:a 128k
|
Sets the AAC audio bitrate to 128 kilobits per second, which matches the typical quality ceiling of MP3 audio embedded in SWF files and produces clean stereo audio in the MP4 output. |
-movflags +faststart
|
Moves the MP4 metadata (moov atom) to the beginning of the file after encoding completes, enabling the video to begin playing in a browser or media player before the entire file has finished downloading — essential for web-hosted MP4 files. |
output.mp4
|
Defines the output filename and tells FFmpeg to use the MP4 container format, which wraps the H.264 video and AAC audio into a widely compatible file ready for modern web playback, social media upload, or local archiving. |
Common Use Cases
- Preserving legacy Flash-based e-learning courses or training videos before the source SWF files become completely inaccessible due to Flash Player deprecation
- Archiving Flash animations, web cartoons, or promotional content created in the 2000s and 2010s that can no longer play in any modern browser
- Converting Flash-based product demos or explainer videos to MP4 so they can be re-uploaded to YouTube, Vimeo, or embedded in modern websites
- Recovering video content from SWF files embedded in old CD-ROMs or archived websites where the original source files are no longer available
- Converting Flash game cutscenes or cinematics to MP4 for use in game documentation, retrospectives, or fan preservation projects
- Preparing legacy SWF training materials for upload to modern LMS platforms like Moodle or Canvas, which no longer support Flash content
Frequently Asked Questions
No — MP4 is a passive video container and cannot store ActionScript logic, clickable elements, or vector-based interactivity from the SWF. FFmpeg reads only the rendered video and audio streams from the SWF file; what you get in the MP4 is essentially a 'recording' of the visual content. Interactive menus, branching scenarios, or scripted animations that depend on user input will not function in the output file.
Some SWF files contain primarily ActionScript-driven vector graphics that FFmpeg cannot fully render into a video stream, resulting in a blank output. FFmpeg can only decode pre-encoded video streams (FLV1 or MJPEG) embedded within the SWF — it is not a Flash runtime and cannot execute ActionScript or render vector paths dynamically. For complex interactive SWFs, you may need a tool like Ruffle (a Flash emulator) to play and screen-record the content instead.
Yes, this is a lossy-to-lossy conversion on both the video and audio tracks. The SWF's FLV1 video (already lossy) is decoded and re-encoded with H.264 at CRF 23, which introduces a second generation of compression artifacts. The audio is similarly transcoded from MP3 to AAC at 128k. Since the source quality is already limited by FLV1 and SWF's constraints, the H.264 output will generally look similar or better for the same file size, but pixel-perfect reproduction of the original is not possible.
Adjust the -crf value to control H.264 quality — lower numbers mean higher quality and larger file sizes. The default of 23 is a balanced midpoint; try -crf 18 for noticeably sharper output (closer to visually lossless) or -crf 28 for a smaller file with more compression. Given that SWF source video is often low resolution and already lossy, values below 18 rarely add visible benefit. You can also increase audio quality by changing -b:a 128k to -b:a 192k or -b:a 256k.
Yes. On Linux or macOS, use a shell loop: 'for f in *.swf; do ffmpeg -i "$f" -c:v libx264 -c:a aac -crf 23 -b:a 128k -movflags +faststart "${f%.swf}.mp4"; done'. On Windows Command Prompt, use: 'for %f in (*.swf) do ffmpeg -i "%f" -c:v libx264 -c:a aac -crf 23 -b:a 128k -movflags +faststart "%~nf.mp4"'. This processes every SWF in the current directory and outputs a matching MP4 file for each.
SWF files often contain looping animations or content whose total duration depends on ActionScript execution rather than a fixed encoded timeline. FFmpeg reads only the raw encoded video stream inside the SWF, which may represent just one loop cycle or a subset of the full interactive experience. If the SWF relies on user interaction to advance through scenes, those sections will be absent from the converted MP4 since FFmpeg has no way to simulate user input during conversion.
Technical Notes
SWF files are unique among video source formats because they are fundamentally an interactive multimedia runtime format, not a straightforward video container. FFmpeg's SWF demuxer extracts embedded FLV1 (Sorenson Spark H.263-derivative) or MJPEG video streams and libmp3lame-encoded audio, but it has no ability to execute ActionScript 2 or 3, render SVG-like vector paths, or simulate interactivity. The output quality is bounded by the source: FLV1 was a low-bitrate codec even by early-2000s standards, and SWF video streams were frequently encoded at sub-DVD resolutions (320x240 or 640x480 being common). The libx264 encoder with CRF 23 will faithfully reproduce this content without adding significant additional degradation. The -movflags +faststart flag is particularly valuable here because SWF-sourced content is often used in web contexts where streaming behavior matters. Metadata preservation is minimal — SWF does not carry rich metadata like title, author, or chapter markers, so the MP4 output will contain only basic container-level metadata. Transparency is not a concern for this conversion as neither SWF video streams nor MP4/H.264 support alpha channels. Files with only audio and no video stream (rare but possible in SWF) may require dropping the video codec flag or using -vn to extract audio-only output.