Convert SWF to Y4M — Free Online Tool

Convert SWF Flash animations to Y4M (YUV4MPEG2) uncompressed video directly in your browser. This tool decodes SWF's FLV1 or MJPEG video stream and outputs a fully uncompressed rawvideo Y4M file — ideal for lossless intermediate processing or piping into video encoding pipelines.

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

During this conversion, FFmpeg demuxes the SWF container and extracts the internal video stream — typically encoded with the FLV1 (Sorenson Spark) codec or MJPEG. That compressed video is fully decoded to raw YUV pixel data, then written into a Y4M (YUV4MPEG2) container using the rawvideo codec. No recompression occurs on the output side; every frame is stored as uncompressed planar YUV, meaning the pixel values from the decoded SWF frames are preserved exactly. Because Y4M carries no audio, the audio track from the SWF (typically MP3 via libmp3lame or AAC) is dropped entirely. The result is a frame-accurate, lossless representation of the SWF's video content, suitable for further processing without any generational quality loss.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg binary. In this browser-based tool, this runs via FFmpeg.wasm compiled to WebAssembly — the same command works identically on a local desktop FFmpeg installation.
-i input.swf Specifies the SWF input file. FFmpeg's SWF demuxer reads the file, identifies the embedded video stream (FLV1 or MJPEG) and any audio stream (MP3 or AAC), and makes them available for processing.
-c:v rawvideo Instructs FFmpeg to encode the output video stream using the rawvideo codec — meaning decoded YUV frames from the SWF are written directly to the Y4M file with no recompression, preserving every pixel value exactly as decoded.
output.y4m Sets the output filename with the .y4m extension, which causes FFmpeg to use the YUV4MPEG2 muxer. This container writes a plain-text header describing the resolution, frame rate, and color space, followed by the raw uncompressed video frames — a format widely supported by professional video tools and encoders.

Common Use Cases

  • Feeding decoded SWF animation frames into a lossless encoding pipeline (e.g., piping Y4M into x264 or x265 with full quality control) to archive Flash content in a modern codec
  • Extracting individual frames from a legacy SWF advertisement or animated banner for frame-by-frame inspection or compositing in video editing software
  • Using the uncompressed Y4M as a lossless intermediate when upscaling or applying filters to old Flash video content before re-encoding at higher quality
  • Preserving Flash-based tutorial or training video content from FLV1-encoded SWF files in a format that any professional video tool can read without codec dependencies
  • Running quality analysis or PSNR/SSIM comparisons on SWF video content by decoding to uncompressed Y4M as a reference source
  • Archiving SWF animations from defunct web applications before browser Flash support is completely removed, capturing the raw video in a non-proprietary format

Frequently Asked Questions

SWF files store video using lossy compressed codecs — most commonly FLV1 (Sorenson Spark) or MJPEG — which significantly reduce file size at the cost of some quality. Y4M stores every video frame as raw, uncompressed planar YUV data with no compression whatsoever. A single second of 720p video at 30fps can occupy over 100MB in Y4M format. This is expected and intentional — Y4M is designed as a lossless intermediate, not a delivery format.
The Y4M output is a lossless decode of whatever was stored in the SWF's video stream. If the SWF used FLV1 encoding, any compression artifacts from that original FLV1 encode will be present in the Y4M — they are faithfully preserved, not introduced by this conversion. The Y4M itself introduces zero additional quality loss, making it a perfect intermediate for further processing.
The Y4M (YUV4MPEG2) format is a video-only container — it has no capability to store audio streams. SWF files typically carry MP3 audio encoded with libmp3lame or AAC, but both are silently dropped during this conversion because Y4M simply cannot hold them. If you need the audio, you should extract it separately using FFmpeg with a command like 'ffmpeg -i input.swf -vn -c:a copy output.mp3' before or alongside this conversion.
FFmpeg can only decode the rasterized video stream embedded inside an SWF file. SWF's vector graphics, ActionScript interactivity, and timeline animations that are not pre-rendered into a video stream cannot be processed by FFmpeg — it will only capture the bitmap video component. SWF files that are purely vector-based with no embedded video track may produce no output or an error. For full Flash rendering, a dedicated SWF renderer would be required before piping to FFmpeg.
You can add time-based trimming flags to the command. To start at 10 seconds and take only 30 seconds of output, use: 'ffmpeg -ss 10 -i input.swf -t 30 -c:v rawvideo output.y4m'. Placing '-ss' before '-i' enables fast seeking on the input, which is efficient for SWF files. This is especially useful when archiving a specific segment of a long SWF-based video player file.
Yes. On Linux or macOS, you can loop over files with: 'for f in *.swf; do ffmpeg -i "$f" -c:v rawvideo "${f%.swf}.y4m"; done'. On Windows Command Prompt, use: 'for %f in (*.swf) do ffmpeg -i "%f" -c:v rawvideo "%~nf.y4m"'. Keep in mind that Y4M files are very large, so batch converting many SWF files will require substantial disk space — plan accordingly before running a bulk job.

Technical Notes

SWF files most commonly embed video using the FLV1 codec (also known as Sorenson Spark, a variant of H.263), with MP3 audio muxed alongside it. Less commonly, MJPEG is used for the video track. FFmpeg's SWF demuxer handles both cases, decoding the video stream to raw YUV frames. The output Y4M format uses the YUV4MPEG2 specification, storing frames in planar YUV 4:2:0 color space by default, which matches the chroma subsampling used by FLV1. The Y4M header encodes frame rate, resolution, and color space metadata, making it fully self-describing for downstream tools. One known limitation is that SWF files with only vector/ActionScript content and no rasterized video bitstream will not yield a usable Y4M output, as FFmpeg cannot render Flash's vector layer. Additionally, SWF files that use older or non-standard Flash compression schemes may cause demuxing errors. Because Y4M has no audio support, all audio metadata and streams from the SWF are discarded — there is no way to embed audio in a Y4M file regardless of flags used.

Related Tools