Convert MPEG to SWF — Free Online Tool

Convert MPEG video files to SWF (Shockwave Flash) format using FFmpeg in your browser. This tool re-encodes the MPEG-1/2 video stream using the FLV1 (Sorenson Spark) codec and transcodes the MP2 or AAC audio to MP3, producing a Flash-compatible SWF file for legacy web embedding or archival purposes.

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

MPEG files use MPEG-1 or MPEG-2 video compression paired with MP2 audio — a broadcast and DVD-era codec family that Flash Player cannot natively decode. During this conversion, FFmpeg fully re-encodes the video stream from MPEG-1/2 into FLV1 (also known as Sorenson Spark H.263), which was the dominant Flash video codec before H.264 became widespread. The audio is simultaneously transcoded from MP2 to MP3 using the LAME encoder. Both streams are then wrapped in the SWF container, which embeds the video and audio directly into the Flash file structure rather than referencing an external FLV file. Because both video and audio must be fully decoded and re-encoded (not remuxed), this is a computationally intensive two-pass transcode that will affect quality relative to the source.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg binary, the open-source multimedia processing engine that powers this conversion. In the browser tool, this runs via FFmpeg.wasm compiled to WebAssembly; on the desktop, it requires a local FFmpeg installation.
-i input.mpeg Specifies the input file — an MPEG container holding MPEG-1 or MPEG-2 video and typically MP2 audio. FFmpeg automatically detects the specific codec variant (mpeg1video or mpeg2video) and audio format from the file's stream headers.
-c:v flv1 Re-encodes the MPEG-1/2 video stream using the FLV1 codec (Sorenson Spark), which is the H.263-based video format required for SWF container compatibility. This is a full transcode — the MPEG-2 frames cannot be remuxed and must be completely decoded and re-encoded.
-c:a libmp3lame Transcodes the source audio (typically MP2 in MPEG files) to MP3 using the LAME encoder. This is necessary because SWF does not support MP2 audio, and LAME produces widely compatible MP3 audio that Flash Player can decode.
-q:v 5 Sets the FLV1 video quality level on a scale of 1 (best quality) to 10 (lowest quality). A value of 5 represents a mid-range tradeoff between visual fidelity and output file size; for higher-quality archival SWF output from an MPEG source, lowering this to 2 or 3 is recommended.
-b:a 128k Sets the MP3 audio bitrate to 128 kilobits per second, which is the default for SWF output. This is a step down from the typical 192k default used in MPEG encoding, so increasing this to 192k or 256k is advisable if audio quality is a priority.
output.swf Specifies the output filename and tells FFmpeg to write a SWF (Small Web Format) container. The .swf extension causes FFmpeg to use the SWF muxer, which packages the FLV1 video and MP3 audio streams into an Adobe Flash-compatible binary file structure.

Common Use Cases

  • Embedding legacy MPEG broadcast footage into an older Flash-based website or intranet portal that still relies on SWF playback infrastructure
  • Converting MPEG-1 video captured from VHS digitization into SWF format for archival in a Flash-era digital collection or museum exhibit system
  • Preparing MPEG-2 clips from DVD sources for use in a legacy Adobe Flash or Director multimedia presentation that cannot accept modern container formats
  • Generating SWF video files from MPEG news or training footage for playback in older Flash-based LMS (Learning Management Systems) that predate HTML5 video support
  • Converting MPEG recordings to SWF as part of a historical digital preservation workflow that requires format-accurate reproductions of early 2000s web multimedia content
  • Obtaining the exact FFmpeg command to batch-convert large MPEG video libraries to SWF locally, bypassing the 1GB browser limit for bulk archival processing

Frequently Asked Questions

Yes, quality loss is unavoidable and likely noticeable. The MPEG-2 source is already a lossy format, and re-encoding it into FLV1 (Sorenson Spark) introduces a second generation of lossy compression. FLV1 is a relatively primitive H.263-based codec with lower compression efficiency than MPEG-2, so at equivalent bitrates it tends to produce more blocking artifacts, particularly in high-motion scenes. Using a lower -q:v value (closer to 1) in the FFmpeg command will mitigate quality loss at the cost of a larger output file.
The SWF format supports MP3 (libmp3lame) and AAC as its audio codecs — it does not support MP2, which is the default audio codec in MPEG files. FFmpeg must therefore fully transcode the audio stream from MP2 to MP3 during this conversion. This is a lossy re-encoding step, so some audio fidelity is lost. If your MPEG source already uses AAC audio, you could modify the command to use -c:a aac instead to keep the same codec family.
No. All major browsers — Chrome, Firefox, Edge, and Safari — permanently removed Adobe Flash Player support by early 2021. SWF files can no longer be played natively in any current browser. To view the output SWF, you would need a standalone Flash Player executable, an older browser with Flash enabled, or an emulator such as Ruffle. This conversion is best suited for archival, legacy system compatibility, or historical preservation workflows.
The -q:v 5 flag controls FLV1 video quality using a scale from 1 (best quality, largest file) to 10 (lowest quality, smallest file). To improve output quality, lower the number — for example, replacing -q:v 5 with -q:v 2 will produce a noticeably sharper image at the cost of a larger SWF file. Similarly, you can change -b:a 128k to -b:a 192k or -b:a 256k to improve MP3 audio quality, though 128k is generally sufficient for speech and most music at this video quality level.
On Linux or macOS, you can run a loop in your terminal: for f in *.mpeg; do ffmpeg -i "$f" -c:v flv1 -c:a libmp3lame -q:v 5 -b:a 128k "${f%.mpeg}.swf"; done. On Windows Command Prompt, use: for %f in (*.mpeg) do ffmpeg -i "%f" -c:v flv1 -c:a libmp3lame -q:v 5 -b:a 128k "%~nf.swf". This is especially useful for collections larger than 1GB, which exceed the browser tool's processing limit.
No. The SWF container does not support metadata fields, chapter markers, or subtitle tracks. Any embedded metadata in the MPEG source — such as title, creation date, or program information from MPEG-2 transport streams — will be stripped during conversion. MPEG also does not support subtitle embedding natively in the same way as MKV or MP4, so no subtitle data is lost that would otherwise have been carried through. The SWF output contains only the re-encoded video and audio streams.

Technical Notes

The FLV1 codec (Sorenson Spark) used in SWF output is based on H.263 and was Flash Player's original video codec before FLV containers with H.264 became the standard around 2007. It has limited support for modern features: no B-frames, no high-profile encoding tools, and poor compression efficiency compared to MPEG-2 at equivalent bitrates — meaning SWF output files may actually be larger than the MPEG source for high-quality settings. The SWF container itself is a binary format that embeds video data as a DefineVideoStream tag and audio as sound tags; it is fundamentally different from FLV, which uses an external container referenced by an SWF wrapper. One important constraint is that SWF video must use frame rates supported by Flash's timeline model, so unusual MPEG frame rates (e.g., 23.976fps from film sources) should convert cleanly, but non-standard rates may require an explicit -r flag added to the command. Neither the MPEG input format nor the SWF output format supports transparency, multiple audio tracks, or embedded subtitles, so no data of those types will be lost or need to be handled separately.

Related Tools