Trim SWF — Free Online Tool
Trim SWF Flash files to a specific time range directly in your browser, preserving the original FLV1 video and MP3 audio streams without re-encoding. Ideal for cutting down legacy Flash animations or web content to extract only the segment you need.
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
This tool performs a stream-copy trim on your SWF file using FFmpeg's `-ss` (start time) and `-to` (end time) flags combined with `-c copy`. Because the video (FLV1/Sorenson Spark) and audio (MP3/AAC) streams are copied directly without re-encoding, the operation is nearly instantaneous and introduces zero additional quality loss — important for SWF files, which already use lossy compression. FFmpeg seeks to the specified start point, copies the raw encoded packets between the start and end timestamps, and wraps them into a new SWF container. Note that because SWF does not support keyframe-level seeking as precisely as modern containers, the actual cut point may align to the nearest preceding keyframe in the FLV1 stream, so the trimmed output may begin a fraction of a second earlier than specified.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg binary — the open-source multimedia processing engine that powers this tool via its WebAssembly (FFmpeg.wasm) build running entirely in your browser. |
-i input.swf
|
Specifies the input SWF file. FFmpeg will demux it to extract the embedded FLV1 video stream and MP3 (or AAC) audio stream for processing. |
-ss 00:00:00
|
Sets the trim start time to 0 seconds (the beginning of the file). Placed before `-i`, this uses fast keyframe-level seeking in the SWF/FLV1 stream, so FFmpeg jumps efficiently to the nearest keyframe at or before this timestamp. |
-to 00:00:10
|
Sets the trim end time to 10 seconds. FFmpeg will stop copying packets after this timestamp, producing a SWF output that contains only the content between the start and end points. |
-c copy
|
Instructs FFmpeg to copy both the FLV1 video and MP3/AAC audio streams without re-encoding. This is the most important flag for SWF trimming — it preserves the original lossy quality and makes the operation near-instantaneous regardless of file size. |
output.swf
|
The filename for the trimmed SWF output file. FFmpeg infers the SWF container format from the `.swf` extension and writes the copied video and audio streams into a new, valid SWF file. |
Common Use Cases
- Extract a specific animation loop or scene from a longer SWF Flash file for use as a standalone web asset in a legacy Flash-era project
- Trim a SWF-encoded promotional video or banner ad to a shorter duration to meet platform time restrictions without losing the original encoding quality
- Cut out a specific musical segment from a SWF file that contains embedded MP3 audio, such as isolating a jingle from a Flash game soundtrack
- Reduce the file size of a large SWF presentation or e-learning module by trimming unused intro or outro segments before redistribution
- Isolate a specific chapter or section from a longer SWF-based video lecture recorded in the Flash era for archival or educational repurposing
- Prepare a short clip from a SWF animation for conversion to a modern format in a subsequent step, by first trimming it to the exact segment needed
Frequently Asked Questions
No. The `-c copy` flag in the FFmpeg command tells FFmpeg to copy the existing FLV1 video and MP3 audio streams byte-for-byte without re-encoding them. Since SWF files already use lossy compression (Sorenson Spark/FLV1 for video and MP3 for audio), avoiding re-encoding is critical to preventing any further quality degradation. The only operation performed is extracting the packets within your specified time window.
SWF files using the FLV1 (Sorenson Spark) codec are compressed with inter-frame prediction, meaning only keyframes contain complete image data. When you specify a start time with `-ss`, FFmpeg can only begin the cut at the nearest preceding keyframe in the stream — it cannot split mid-GOP without re-encoding. As a result, your trimmed output may start a fraction of a second earlier than the exact timestamp you entered. If frame-accurate cutting is essential, you would need to re-encode the video, which will reduce quality.
Yes. FFmpeg will detect the audio codec in the SWF file automatically, and `-c copy` will copy whichever audio codec is present — MP3 (libmp3lame) or AAC — without re-encoding it. The default audio codec for SWF is MP3, but if your specific SWF file uses AAC, the stream-copy trim will work the same way with no changes needed to the command.
Modify the values after `-ss` and `-to` in the command. Both accept timestamps in `HH:MM:SS` or `HH:MM:SS.mmm` format, or plain seconds (e.g., `30.5`). For example, to trim from 1 minute 15 seconds to 2 minutes 30 seconds, use `-ss 00:01:15 -to 00:02:30`. Placing `-ss` before `-i` (as in this command) uses fast keyframe-based seeking, which is efficient but may land on the nearest keyframe rather than the exact frame.
The command as shown processes a single file, but you can batch process on your desktop using a shell loop. On Linux or macOS, use: `for f in *.swf; do ffmpeg -i "$f" -ss 00:00:00 -to 00:00:10 -c copy "trimmed_$f"; done`. On Windows Command Prompt: `for %f in (*.swf) do ffmpeg -i "%f" -ss 00:00:00 -to 00:00:10 -c copy "trimmed_%f"`. The browser-based tool processes one file at a time, making the desktop FFmpeg command especially valuable for bulk trimming jobs.
FFmpeg treats SWF as a media container for video and audio streams and does not parse or preserve Flash-specific interactive data such as ActionScript, button behaviors, or vector timeline scripting. Trimming with FFmpeg will retain only the video and audio streams within the specified time range. If your SWF relies on ActionScript interactivity or complex vector animation layers beyond rasterized video, those elements will not be preserved correctly in the output.
Technical Notes
SWF (Small Web Format) is an Adobe Flash container that typically encodes video using the FLV1 codec (Sorenson Spark, a variant of H.263) and audio using MP3 (libmp3lame) or occasionally AAC. Both are lossy formats, making stream-copy operations (no re-encoding) strongly preferable for trimming to avoid compounding quality loss. FFmpeg's SWF demuxer/muxer support is functional for media-bearing SWF files, but SWF is a complex binary format and files with heavy ActionScript, embedded font data, or layered vector content beyond rasterized video may not demux cleanly. The `-c copy` approach preserves both video and audio bitrates exactly as in the source, so output file size will be roughly proportional to the trimmed duration relative to the original. SWF does not support subtitles, chapters, or multiple audio tracks, so no metadata of those types is at risk of being lost. Since SWF's FLV1 video uses a GOP (Group of Pictures) structure, the precision of the trim is limited to keyframe boundaries; files with infrequent keyframes (e.g., every 5–10 seconds) may show noticeable drift from the specified trim point. For pixel-accurate trimming, re-encoding with explicit quality settings (`-q:v 1` through `10`, where 1 is highest quality) would be necessary, at the cost of additional lossy compression.