Convert MPG to SWF — Free Online Tool

Convert MPG video files (MPEG-1/2 format used in VCD, DVD, and broadcast) to SWF (Shockwave Flash) using FFmpeg in your browser. The MPEG-2 video stream is re-encoded to FLV1 (Sorenson Spark) — the native Flash video codec — making the output embeddable in legacy Flash-based web players and authoring tools.

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

MPG files typically carry MPEG-2 video and MP2 audio, codecs designed for broadcast and optical disc playback. Since SWF supports neither of these, a full re-encode is required. FFmpeg decodes the MPEG-2 video stream and re-encodes it using the FLV1 (Sorenson Spark H.263-based) codec, which is the native video codec for the SWF container. The MP2 audio is simultaneously transcoded to MP3 using the LAME encoder, as SWF requires either MP3 or AAC audio. The result is a self-contained SWF file that legacy Flash players and Flash-era web embeds can parse and play directly. Because both stages involve lossy-to-lossy transcoding, some generation loss is inherent — the MPEG-2 source quality and the chosen FLV1 quantizer setting directly determine output fidelity.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg binary. In the browser-based version of this tool, FFmpeg runs via WebAssembly (FFmpeg.wasm) entirely client-side — no data leaves your machine.
-i input.mpg Specifies the input MPG file. FFmpeg will detect the container as MPEG program stream or MPEG-2 transport stream and identify the enclosed video (mpeg2video or mpeg1video) and audio (typically mp2) streams for decoding.
-c:v flv1 Re-encodes the video stream using the FLV1 codec (Sorenson Spark, based on H.263), which is the primary video codec supported by the SWF container and required for Flash Player compatibility. The MPEG-2 source cannot be copied directly because SWF does not support MPEG-2.
-c:a libmp3lame Transcodes the audio using the LAME MP3 encoder. Since SWF does not support MP2 (the typical audio codec in MPG/broadcast files), the audio must be converted to MP3, which is one of only two audio codecs the SWF container accepts.
-q:v 5 Sets the FLV1 video quantizer on a scale of 1 (highest quality, largest file) to 10 (lowest quality, smallest file). A value of 5 is the default for SWF output, offering a balanced tradeoff between file size and visual fidelity for web-embedded Flash content.
-b:a 128k Sets the MP3 audio bitrate to 128 kilobits per second. This is the SWF default and is sufficient for speech and general audio; increase to 192k or 256k if the source MPG contains high-quality music or broadcast audio that warrants better fidelity.
output.swf Defines the output filename and tells FFmpeg to wrap the FLV1 video and MP3 audio streams in the SWF container format, producing a file playable by Adobe Flash Player or importable into Flash authoring tools.

Common Use Cases

  • Repurpose broadcast or VCD-sourced MPG footage for embedding in a legacy Flash-based website or e-learning course built in Adobe Flash/Animate
  • Convert archived MPEG-2 training videos into SWF format for playback in older Flash-dependent LMS platforms that do not support modern HTML5 video
  • Prepare MPG clips for import into Flash Professional or Adobe Animate timelines that expect SWF-wrapped video rather than raw MPEG streams
  • Migrate MPG content from DVD rips into SWF for use in Flash-based kiosk or point-of-sale interactive display systems that require the SWF container
  • Convert MPEG-2 broadcast recordings to SWF for archival in digital collections that catalogued Flash content alongside original broadcast material
  • Test FLV1 codec output quality and file size by converting a known MPG source before committing to a batch conversion pipeline targeting SWF delivery

Frequently Asked Questions

MPG files use MPEG-1 or MPEG-2 video and typically MP2 audio — none of which are valid codec options inside the SWF container. SWF only supports FLV1 (Sorenson Spark) or MJPEG for video, and MP3 or AAC for audio. Because there is no codec overlap between the two formats, FFmpeg must fully decode the MPEG-2 stream and re-encode it to FLV1, and separately transcode the MP2 audio to MP3. This makes the conversion slower and involves some quality loss compared to a remux.
FLV1 is based on H.263, an older and less efficient codec than MPEG-2, so at the same bitrate it will generally produce lower visual quality. The default quantizer setting of -q:v 5 produces a reasonable mid-quality result, but for higher-fidelity output you should lower the value toward 1 (best quality, larger file). If your source MPG is already heavily compressed MPEG-2 from a VCD rip, the generational loss will be more noticeable than if you are starting from a high-bitrate broadcast MPG.
No. All major browsers removed Flash Player support at the end of 2020, and Adobe officially ended Flash support on December 31, 2020. The SWF output from this conversion will only play in standalone Adobe Flash Player (versions still available for local use), legacy projectors, or software that bundles its own Flash runtime such as certain archived kiosk systems. If your goal is modern web playback, consider converting your MPG to MP4 (H.264) instead.
To improve video quality, lower the -q:v value — for example, use -q:v 2 for near-maximum FLV1 quality at the cost of a larger file, or -q:v 8 for a smaller, lower-quality file. The scale runs from 1 (best) to 10 (worst) for SWF/FLV1 output. For audio, replace -b:a 128k with a higher value like -b:a 192k or -b:a 256k to increase MP3 bitrate and preserve more audio detail from the original MP2 track.
By default, FFmpeg preserves the source frame rate and resolution during the re-encode, so a 720x576 PAL MPEG-2 source will produce a 720x576 FLV1 stream inside the SWF. However, Flash Player historically had practical limits around 640x480 for smooth FLV1 playback. If you need to scale down, add -vf scale=640:480 to the FFmpeg command before the output filename. Note that interlaced MPEG-2 sources (common in broadcast MPG files) may show combing artifacts in the SWF unless you also add a deinterlace filter such as -vf yadif.
Yes. On Linux or macOS, you can use a shell loop: for f in *.mpg; do ffmpeg -i "$f" -c:v flv1 -c:a libmp3lame -q:v 5 -b:a 128k "${f%.mpg}.swf"; done. On Windows Command Prompt, use: for %f in (*.mpg) do ffmpeg -i "%f" -c:v flv1 -c:a libmp3lame -q:v 5 -b:a 128k "%~nf.swf". The browser-based tool processes one file at a time, so batch conversion via the desktop FFmpeg command is the recommended approach for multiple files.

Technical Notes

The MPG-to-SWF conversion path is a two-codec transcode with no possibility of stream copying. MPEG-2 video (typical default in MPG containers) is decoded and re-encoded to FLV1, which uses an H.263-derived DCT block codec. FLV1 lacks B-frame support and has a simpler entropy coding scheme than MPEG-2, so it is less efficient — expect SWF file sizes to vary significantly based on the -q:v quantizer chosen. MP2 audio (the default MPG audio codec in broadcast and VCD sources) has no representation in SWF's codec list, so it is transcoded to MP3 via libmp3lame at 128k by default. SWF does not support subtitles, chapters, or multiple audio tracks, so any of these present in the MPG source are silently dropped. The SWF container also does not carry standard metadata fields like title or creation date from the MPG source. One known limitation: very high-resolution or high-frame-rate MPEG-2 sources can produce SWF files that exceed what classic Flash Player versions handle gracefully — scaling the video to 640x480 or below is advisable for Flash Player 8 and earlier targets. Files larger than 1GB should be converted using the displayed FFmpeg command locally rather than in the browser.

Related Tools