FLV Files: Flash Video Format — History, Conversion, and Rescue
FLV (Flash Video) was the dominant online video format from approximately 2005 to 2015. Built on Adobe Flash Player, FLV powered YouTube's early years, Vimeo, Hulu, Dailymotion, and thousands of other video-sharing platforms. The death of Flash — officially retired by Adobe on December 31, 2020, and blocked by all major browsers — left enormous archives of FLV content that can no longer play in modern browsers. Understanding FLV's structure and knowing how to convert it is essential for digital preservation, media archival, and recovering old video content.
Why FLV Was Dominant
When FLV emerged around 2003, it solved a genuine problem: there was no universal web video format. QuickTime required an Apple plugin, Windows Media Video required Microsoft's plugin, and RealVideo required RealPlayer. Flash Player was already installed on 95%+ of desktop web browsers as the dominant plugin for games and animations. Adding video support to Flash made FLV the de facto web video standard with no additional installation required.
YouTube launched in 2005 using FLV exclusively. When Google acquired YouTube in 2006, the library was already millions of FLV files. The format held for several more years until HTML5's <video> element and H.264/WebM support in browsers made Flash unnecessary — a transition that took until around 2010-2015.
FLV Technical Structure
FLV is a container format. The .flv extension contains multiplexed audio and video streams:
File header (9 bytes):
- Signature:
FLV(3 bytes) - Version:
01(1 byte) - Flags: bit field indicating audio/video presence
- Data offset:
00 00 00 09(points to first tag)
Tag structure: FLV consists of sequential tags, each with:
- Tag type (1 byte): 8=audio, 9=video, 18=script/metadata
- Data size (3 bytes)
- Timestamp (3 bytes) + timestamp extension (1 byte) = effective 32-bit ms timestamp
- Stream ID (3 bytes, always 0)
- Tag data
Preceding each tag is a 4-byte previous tag size field (for backward seeking).
Video Codecs in FLV
- Sorenson H.263 (codec ID 2) — the original FLV codec, used by early YouTube. Low quality by modern standards.
- Screen Video (codec ID 3/5) — screen capture codec, lossless, high compression for desktop captures
- On2 VP6 (codec ID 4/5) — better quality than Sorenson, supported alpha channel. Used by YouTube 2007–2010.
- H.264/AVC (codec ID 7) — the highest quality option; added when Flash Player 9 Update 3 shipped in 2007. Most FLV files from 2008+ use H.264.
Audio Codecs in FLV
- ADPCM — 8 or 16-bit differential PCM
- MP3 — the most common early FLV audio codec
- Linear PCM — uncompressed PCM audio
- Nellymoser — low-bitrate speech codec for Flash phone calls and voice chat
- AAC (codec ID 10) — added alongside H.264; high quality, used in later FLV files
- Speex (codec ID 11) — voice codec for real-time streaming
Converting FLV Files
Checking FLV Contents First
Before converting, identify what codecs are inside:
ffprobe input.flv
Look for Video: h264, flv1 (Sorenson), or vp6f (VP6), and Audio: mp3 or aac.
FLV to MP4 (Most Common Conversion)
If the FLV contains H.264 video and AAC/MP3 audio, it can often be re-wrapped without transcoding:
# Stream copy (fast, no quality loss — only works if codecs are compatible)
ffmpeg -i input.flv -c copy output.mp4
# Full transcode (needed for Sorenson H.263 or VP6 video)
ffmpeg -i input.flv -c:v libx264 -crf 22 -c:a aac -b:a 192k output.mp4
FLV to WebM
ffmpeg -i input.flv -c:v libvpx-vp9 -b:v 0 -crf 30 -c:a libopus -b:a 128k output.webm
FLV to GIF (for short clips)
ffmpeg -i input.flv -vf "fps=12,scale=640:-1" -t 10 output.gif
Batch FLV Conversion
# Linux/macOS — convert all FLV files to MP4
for f in *.flv; do
ffmpeg -i "$f" -c:v libx264 -crf 22 -c:a aac "${f%.flv}.mp4"
done
# Windows Command Prompt
for %f in (*.flv) do ffmpeg -i "%f" -c:v libx264 -crf 22 -c:a aac "%~nf.mp4"
Preserving Metadata
FLV files may contain a metadata onMetaData script tag with duration, width, height, frame rate, and creation time. Extract metadata:
ffprobe -v quiet -print_format json -show_format -show_streams input.flv
To preserve metadata in the MP4 output:
ffmpeg -i input.flv -c:v libx264 -c:a aac -movflags +faststart output.mp4
The -movflags +faststart flag moves the MP4 moov atom to the beginning of the file for web streaming (progressive download).
FLV from the Web: Downloading Old Flash Video
Many old FLV files exist only in web archives. Tools for recovering them:
yt-dlp (successor to youtube-dl): Downloads FLV content from archived URLs and YouTube's legacy format:
yt-dlp --format flv "https://www.youtube.com/watch?v=OLD_VIDEO_ID"
# Or download best available format
yt-dlp "URL"
Wayback Machine: The Internet Archive (web.archive.org) has archived Flash content including FLV files. Use their Wayback CDX API to locate cached versions.
Browser cache recovery: FLV files downloaded by Flash Player were sometimes cached in the browser's temporary directory. On Windows XP/Vista/7, Flash cached to %APPDATA%\Macromedia\Flash Player\#SharedObjects\ and %LOCALAPPDATA%\Microsoft\Windows\Temporary Internet Files\.
FLV Parsing Quirks
-
Sorenson H.263 in FLV (codec ID 2) is a modified variant of H.263 — not exactly standard H.263, with some proprietary extensions. Most decoders handle it, but some may have issues with non-standard resolution constraints.
-
VP6 alpha (codec ID 5): VP6-F is used for video without alpha; VP6-A is used for video with alpha. The alpha channel was used for compositing in Flash animations.
-
Timestamp wraparound: 32-bit millisecond timestamps support up to ~49.7 days of continuous video. Long recordings may exhibit timestamp wraparound bugs in some players.
-
Seekability: FLV files without a keyframe index in the metadata tag are not seekable efficiently. Many FLV rippers and downloaders produce files without proper keyframe indexes.
FLV in 2025
No modern browser plays FLV natively. Flash Player is dead. FLV files require either:
- A standalone player (VLC, MPC-HC) with FLV support
- Conversion to MP4, WebM, or another modern format
For digital archivists, FLV conversion is triage work: converting millions of files before they become completely inaccessible as software support for the old codecs erodes. FFmpeg's FLV support, including Sorenson and VP6, is likely to remain robust for many years, making it the key tool for FLV preservation.
Related conversions
Common video conversions that pair well with this guide: