Convert SWF to MKV — Free Online Tool

Convert SWF Flash animations and multimedia files to MKV using FFmpeg in your browser. This tool re-encodes the FLV1 or MJPEG video from the SWF container into H.264 (libx264) inside a Matroska container, producing a widely compatible video file that plays on modern devices without requiring a Flash plugin.

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 package Flash-specific video streams (typically encoded with the FLV1 codec, a variant of H.263) along with MP3 audio into a format that only Flash Player can natively interpret. During conversion, FFmpeg demuxes the SWF container to extract the raw video and audio streams, then fully re-encodes the video from FLV1 to H.264 using libx264 with a CRF of 23, and transcodes the audio from MP3 to AAC at 128k bitrate. The result is an MKV file — a flexible, open-standard Matroska container that supports chapters, subtitles, and multiple audio tracks — playable on virtually any modern media player without Flash.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg binary — the open-source multimedia processing engine that handles demuxing the SWF container, decoding FLV1/MP3 streams, re-encoding to H.264/AAC, and muxing the result into an MKV file.
-i input.swf Specifies the input SWF file. FFmpeg's SWF demuxer parses the Small Web Format container to locate and extract any embedded FLV1 video and MP3 audio streams for processing.
-c:v libx264 Re-encodes the video stream using libx264, the industry-standard H.264 encoder. This replaces the FLV1 (Sorenson Spark) codec from the SWF with a modern codec that is natively supported by virtually all video players, browsers, and devices without requiring Flash.
-c:a aac Transcodes the audio from MP3 (the typical SWF audio codec) to AAC, which is the default and recommended audio codec for MKV files produced by this tool. AAC offers slightly better compression efficiency than MP3 at equivalent bitrates.
-crf 23 Sets the Constant Rate Factor for libx264 to 23, the default quality level. This controls the quality-to-filesize tradeoff for the H.264 output — since FLV1 source quality from SWF is often already limited, CRF 23 is a sensible balanced setting that avoids inflating file size unnecessarily.
-b:a 128k Sets the AAC audio bitrate to 128 kilobits per second, which matches the typical quality of MP3 audio found in SWF files and keeps the output file size reasonable for the audio track.
output.mkv Specifies the output file as an MKV (Matroska) container. The .mkv extension tells FFmpeg to mux the re-encoded H.264 video and AAC audio into a Matroska file, an open-standard container that supports subtitles, chapters, and multiple tracks — features the original SWF format lacks.

Common Use Cases

  • Preserving old Flash animations or web games as watchable video files now that Flash Player has been end-of-lifed and removed from all major browsers
  • Archiving Flash-based educational content or e-learning modules that were created before HTML5 became standard
  • Converting SWF marketing or product demo animations into MKV for offline playback or import into video editing software
  • Extracting the video content from SWF advertisements or motion graphics for use in modern video production workflows
  • Backing up SWF-based animated shorts or web series into a durable, future-proof container format before the source files are lost
  • Converting SWF screensavers or interactive presentations into a standard video format for sharing with audiences who no longer have Flash installed

Frequently Asked Questions

No — interactivity is a fundamental limitation of this conversion. SWF files can contain ActionScript-driven interactivity, button logic, and branching animations that are not video frames but executable code. FFmpeg can only capture the rendered video output of the SWF's embedded video stream, not replicate its interactive behavior. What you get in the MKV is the linear video content that was encoded inside the SWF, not a playable recreation of the Flash experience.
SWF files often use vector graphics, which scale perfectly at any resolution because they are mathematically defined shapes rather than pixel data. When FFmpeg reads a SWF, it renders the embedded raster video stream (FLV1 or MJPEG), which may have been encoded at a low resolution — sometimes as small as 320x240. Re-encoding this to H.264 cannot recover detail that was never there. The perceived sharpness loss is usually inherited from the source SWF's video quality, not introduced by the conversion itself. You can try lowering the CRF value (e.g., -crf 18) to minimize further quality loss during re-encoding.
SWF as a format supports alpha transparency in its vector and bitmap graphics, but the embedded video streams (FLV1, MJPEG) that FFmpeg can extract do not carry an alpha channel. Additionally, the MKV container with libx264 video does not support transparency either. Any transparent elements in the original SWF will be composited against a background (typically black) during the rendering and extraction process, and the resulting MKV will have no transparency.
Adjust the -crf value to control H.264 quality. The default is 23 — lower numbers mean higher quality and larger file sizes, while higher numbers reduce quality and file size. For archival purposes, try -crf 18 for near-lossless quality. For a smaller file where some quality loss is acceptable, use -crf 28. The valid range for libx264 is 0 (lossless) to 51 (worst quality), though values between 18 and 28 are most practical for this type of conversion.
Not all SWF files contain traditional video streams. Many SWF files consist entirely of vector animations, ActionScript logic, and bitmap sequences without an embedded FLV1 or MJPEG video track. FFmpeg can only extract streams it can detect inside the SWF container — if the SWF relies on programmatic rendering, you may end up with only an audio track or an empty output. In these cases, a screen-capture approach while playing the SWF in a compatible Flash emulator like Ruffle would be necessary to capture the visual content.
Yes — on your local desktop you can use a shell loop to process multiple files. On Linux or macOS, run: for f in *.swf; do ffmpeg -i "$f" -c:v libx264 -c:a aac -crf 23 -b:a 128k "${f%.swf}.mkv"; 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 "%~nf.mkv". The browser-based tool processes one file at a time, but the displayed FFmpeg command is designed to be portable for exactly this kind of local batch use.

Technical Notes

FFmpeg's SWF demuxer is capable of reading FLV1-encoded video and MP3 audio embedded in SWF containers, but its support for SWF is inherently limited compared to a full Flash runtime. The FLV1 codec (also known as Sorenson Spark) is an older H.263-derived codec with lower compression efficiency than H.264, so re-encoding to libx264 at CRF 23 will typically produce a smaller MKV file at comparable or better perceptual quality. The audio transcode from MP3 (libmp3lame) to AAC is a lossy-to-lossy step, which introduces a small additional generation loss — if preserving audio fidelity is critical, consider using -b:a 192k or higher. SWF files do not contain chapter markers, subtitle tracks, or multiple audio streams, so none of these MKV features will be populated from the source. Metadata from SWF files is minimal and may not carry over meaningfully into MKV container metadata. Files with purely vector-based or ActionScript-rendered content will not convert correctly, as FFmpeg has no Flash interpreter and cannot render ActionScript.

Related Tools