FLV

Also known as: Flash Video

On this page 7

FLV, short for Flash Video, is a lightweight container format that packages compressed audio, video and timed metadata into a simple sequence of tagged packets, originally designed for playback in Adobe Flash Player. Among the containers & formats used in video, FLV is notable for its minimal structure and streaming-friendly design, which made it the dominant format for web video in the late 2000s.

Although browsers no longer support Flash, the FLV packet model survives as the payload format of RTMP, the protocol that many encoders still use to send live streams to platforms and media servers. Understanding FLV therefore matters for anyone who works with live ingest pipelines, archive migration or legacy media libraries.

How the FLV file structure works

An FLV file consists of a short file header followed by a stream of tags, each tag holding one unit of audio, video or script data. The header is only 9 bytes long: the signature “FLV”, a version byte, flags that indicate whether audio and video are present, and an offset to the first tag.

After the header, the file alternates between tag bodies and 4-byte back-pointers called PreviousTagSize fields. Each back-pointer records the size of the preceding tag, which allows a player to walk the file backward without an index. Every tag carries a 24-bit payload size and a 32-bit timestamp in milliseconds, which is how the player keeps audio and video in sync.

The following table summarizes the three tag types defined by the specification and what each carries.

Tag typeType codeTypical contents
Audio tag8One frame or packet of AAC, MP3, Nellymoser or Speex audio
Video tag9One frame of H.264, Sorenson Spark, VP6 or Screen Video
Script data tag18AMF-encoded metadata such as onMetaData with duration and dimensions
FLV tag types and their contents

The onMetaData script tag, usually placed at the start, describes duration, frame rate, bitrate and resolution. Its values are serialized in Action Message Format (AMF0), the same encoding RTMP uses for commands, which explains why FLV and RTMP fit together so naturally.

Codecs supported inside FLV

FLV supports a fixed, closed list of codecs identified by small numeric IDs in each tag, rather than the open codec registries used by MP4 or MKV. This rigid design kept parsers simple, but it means modern codecs such as HEVC, VP9 or AV1 were not part of the original specification.

CodecMedia typeEra and status
Sorenson SparkVideoFlash Player 6, obsolete
On2 VP6VideoFlash Player 8, obsolete
H.264 (AVC)VideoFlash Player 9 update 3 onward, still common in RTMP
MP3AudioEarly FLV files, legacy
AACAudioPaired with H.264, still common in RTMP
Speex and NellymoserAudioVoice and webcam use, obsolete
Common codecs carried in FLV

In 2023, an industry effort known as Enhanced RTMP extended the FLV tag format with a FourCC-based signaling scheme so that HEVC, VP9 and AV1 can travel over RTMP. Support for this extension varies between encoders and servers, so it should be verified end to end before production use.

FLV compared with other video containers

Compared with modern containers, FLV trades flexibility and seekability for simplicity. It has no mandatory index, supports only one audio and one video track in practice, and cannot carry subtitles, chapters or multiple language tracks in a standard way.

The comparison below places FLV beside the containers most often discussed alongside it.

FormatStructureMultiple tracksMain use today
FLVFlat tag streamNo, one audio and one videoRTMP ingest, legacy archives
MP4Box hierarchy (ISOBMFF)YesUniversal delivery and storage
MKVEBML elementsYes, with subtitles and chaptersArchiving, enthusiast distribution
MPEG-TSFixed 188-byte packetsYesBroadcast, HLS segments
WebMEBML subset of MatroskaYesBrowser playback with VP9 or AV1
FLV versus related container formats

Because FLV has no central index like the MP4 moov atom, a player cannot seek precisely unless keyframe positions are stored in the metadata. Tools historically injected keyframe tables into onMetaData so that HTTP pseudo-streaming servers could jump to a requested time.

Where FLV is still used

FLV remains relevant mainly as the wire format of RTMP live ingest, not as a file that viewers download. When a streamer configures an encoder with an RTMP URL and stream key, the encoder packetizes H.264 and AAC into FLV tags and sends them over a persistent TCP connection.

The media server then remuxes or transcodes the incoming stream into HLS, DASH or CMAF segments for viewers. Recording an RTMP stream to disk often produces an FLV file directly, which is then remuxed to MP4 for editing or on-demand delivery.

SituationRecommended approachReason
Live ingest to a platformUse RTMP with FLV packagingBroad encoder and server support
Archived Flash-era libraryRemux to MP4 without re-encodingPreserves quality, restores playback
VP6 or Sorenson contentTranscode to H.264 or newerOld codecs lack modern decoders
New on-demand deliveryAvoid FLV entirelyNo browser support since 2020
Low-latency contributionConsider SRT or WebRTCBetter resilience and codec choice
Practical decisions involving FLV

Limitations and common mistakes

The most important limitation of FLV is that no current web browser plays it natively, because Adobe ended Flash Player support on 31 December 2020. Publishing FLV files for viewers today guarantees playback failures outside desktop media players.

  • Assuming FLV means low quality: the container is neutral, and an FLV with H.264 can match an MP4 bit for bit after remuxing.
  • Re-encoding when remuxing suffices: converting H.264 and AAC from FLV to MP4 needs only a stream copy, which is fast and lossless.
  • Ignoring timestamp limits: the 32-bit millisecond timestamp wraps after about 49.7 days, which can disrupt very long continuous recordings.
  • Expecting multitrack features: FLV does not reliably carry multiple audio languages, subtitles or chapters.
  • Missing metadata after recording: a truncated live recording may lack correct duration in onMetaData, so players show wrong lengths until the file is remuxed.

Explained without jargon

FLV is a kind of digital envelope for video. Inside it sit the picture and the sound, already compressed, plus a small note describing the length and size of the video. In the past, this envelope was what websites used to show clips through the Flash plug-in.

Flash is gone, so people rarely watch FLV files anymore. However, the same envelope is still used behind the scenes when someone streams live: their streaming software packs the video into FLV pieces and sends them to the platform, which then repackages them for viewers. The key idea is that FLV today is a delivery tool, not a viewing format.

A typical use case

A small church broadcasts its weekly service using a laptop running open-source streaming software. The operator sets the encoder to 1080p at 30 frames per second, H.264 video at 6,000 kbps and AAC audio at 160 kbps, then enters the RTMP server address and stream key provided by the video platform.

During the service, the encoder wraps every video frame and audio packet in FLV tags with millisecond timestamps and sends them over RTMP. The platform receives the stream, transcodes it into several resolutions and delivers HLS segments to viewers on phones and televisions.

The software also records a local copy as an FLV file for safety. After the service, the operator remuxes the file to MP4 with a stream copy in under a minute, without any quality loss, and uploads it to the parish website archive. The outcome is a reliable live broadcast and a ready-to-edit recording from a single workflow.