What Is FLV Format?
FLV files are video files saved in the Adobe Flash Video (FLV) container format. In this video format, each file consists of a short header, synchronized audio and video data streams (encoded like the standard .SWF format used in Adobe Flash), and metadata packets. FLV stands for Flash Video and has the extension “.flv”. The data in FLV files is encoded in the same way as SWF files, which were used in Adobe Flash.
Flash video used to be the standard video format for most leading video platforms on the Internet, including YouTube and Hulu. FLV files were a preferred choice for online video streaming platforms because they were relatively small in size, making them easy to download. However, after Adobe has officially deprecated Flash, streaming media services and software developers are moving to more modern formats such as HTML5 video or MP4. Individuals and companies creating video content are also encouraged to switch from FLV to MP4 or other modern video formats.
However, despite the growing popularity of HTML5, FLV files are still very common on video sharing platforms. On YouTube, FLV is still officially supported at the time of this writing.
In this article:
- Flash Player End of Life and Security Concerns
- FLV vs MP4: 5 Reasons MP4 Is Better than FLV
- FLV Format Deep Dive
- How Do You Convert FLV to MP4 Or WebM Format With Cloudinary?
Flash Player End of Life and Security Concerns
The FLV format requires the Adobe Flash Player to play. This player reached End of Life in 2021 and is no longer supported by Adobe. This means that installing it on end-user devices represents a security risk. In general, the retirement of the Flash Player should encourage anyone using the FLV format to switch to other formats that do not create a security risk for users.
However, if you must continue using FLV, you can still store videos in FLV format and convert them to another format before viewing or delivering them to end-users.
FLV vs MP4: 5 Reasons MP4 Is Better than FLV
MP4 is a video format developed by the Motion Picture Experts Group, which is a container for digitally encoded audio and video files. MP4 uses separate compression for audio and video tracks: video is compressed using MP4 video encoding and audio is compressed using AAC compression.
Here are several ways MP4 and other modern video formats are superior to FLV:
In general, MP4 provides higher quality than FLV because it uses the H.264 video compression codec. This allows for good compression while maintaining a high quality of the source video. FLV does not support H.264 encoding, using older encoding formats which are less advanced (see the FLV Encoding section above).
Related content: Read our guide to video codecs
MP4 is more compatible than FLV. Most devices and streaming platforms have MP4 decoding capabilities, so MP4 plays smoothly in almost any environment, including Windows, Android, and iOS devices. By contrast, FLV is compatible with most web browsers, but not mobile browsers.
- File size
MP4 files tend to be smaller than FLV files due to improved compression. This makes transferring, downloading, and uploading MP4 files faster. MP4 is also more responsive to compression and preserves video quality, while FLV files degrade significantly when compressed.
- Flash Player
A very important aspect of FLV is that it requires a Flash Player plugin to play FLV video files. This is inconvenient for viewers because it requires them to install a plugin, and introduces security issues because the Flash Player has been retired by Adobe. When playing MP4, viewers do not need a specialized plugin. Also, FLV files are not always hardware accelerated, which can slow down playback on certain devices.
- Video features
MP4 supports DVD-like menus and subtitles, while FLV does not. FLV files are encoded in their original form and cannot be modified to add these features.
In summary, MP4 is superior to FLV in almost every aspect, and due to the end of life of the Adobe Flash Player, it is a good idea to convert your FLV files to MP4 or another modern video format such as WebM. Learn more about WebM in our detailed guide (coming soon).
Related content: Read our guide to converting video formats (coming soon)
For those interested in understanding the inner workings of the FLV format, the following section explains encoding, file format structure, and FLV delivery options in more depth.
FLV Format Deep Dive
FLV files contain Sorenson Spark video bitstreams, a proprietary version of the H.263 video standard. This is the compression format used by Flash Player 6 and 7. Flash Player 8 supports the more advanced On2 TrueMotion VP6 video bitstream format, which is the recommended format for later versions.
FLV also supports audio from the Nellymoser Asao codec, the open source Speex codec, and MP3. It supports uncompressed audio and audio in ADPCM format. The latest Flash Player 9 versions support AAC audio, including AAC Main Profile, HE-AAC, AAC SBR, and AAC-LC.
FLV File Format Structure
An FLV file consists of a header and a packet. The header contains the following fields:
- Signature—the value is FLV
- Version—the default value is 1. Only 0x01 is valid.
- Flags—0x04 for audio, 0x01 for video, or 0x05 for both audio and video.
- Header size—the default is 9. This field can be used to deliver an extended file header.
Next come the packets—FLV files are split into multiple packets called “FLV tags” with 15-byte headers. Packets contain audio, video, script, encrypted information, and payload metadata.
The FLV packet has the following fields:
- Reserved—reserved for Flash Media Server (FMS) use, must be zero.
- Filter—set to 0 if no preprocessing is required and 1 if pre-processing, such as decryption, is required for the packet.
- Packet type—defines the content type of the packet.
- Data size—indicates the length of the message.
- Timestamp lower—stores the timestamp of the tag data in milliseconds. The first packet is set to NULL.
- Timestamp cap—extension used to generate a uint32_be value.
- Stream ID—the first stream is set to NULL, and subsequent streams have a sequential number.
- Payload data—video or audio data.
FLV Delivery Options
There are several ways to deliver Flash video files:
- Standalone FLV file—typically, a Flash video player delivers the Flash video files because only FLV players support FLV files. There are also third-party FLV players.
- Embedded—Flash Player versions 6 and up support embedded FLV in SWF files using Flash’s authoring tool. This method requires transferring the whole file before enabling playback. The content creator must rebuild the SWF when modifying the video.
- Progressive HTTP download—Flash Player versions 7 and up support progressive FLV downloads via HTTP, using ActionScript to include the externally hosted FLV Flash file on the client-side. This approach offers advantages for buffering, the ability to use a generic HTTP server and reuse the same SWF player for various Flash video sources. Flash Player 8 also supports random access to video files via HTTP’s partial download functionality, sometimes known as “streaming.” However, unlike RTMP-based streaming, HTTP doesn’t support live broadcasting. There must be a custom video player to stream video via HTTP, alongside an injection of the relevant Flash video metadata specifying every keyframe’s timecode and starting position (in bytes). This information allows the custom Flash video player to request all parts of the video file based on the specified keyframes. For example, YouTube, Google Video, and Bitgravity allow progressive downloads via HTTP, enabling the player to search any video part before the buffering completes.
- RTMP streaming—the Flash Media Server enables video streaming to Flash Player via RTMP.
iPad and iPhone streaming—Flash Media Server 4.5 supports video streaming to iPads and iPhones. It delivers the video content via a MPEG-2 stream with the HTTP Live Streaming video format.
How Do You Convert FLV to MP4 Or WebM Format With Cloudinary?
The FLV format is generally inferior to formats like MP4 and WebM. Cloudinary can help you automatically convert FLV files to modern video formats for faster loading, and an enhanced user experience.
Cloudinary performs the task in the cloud through automation in three steps:
- Convert FLV to MP4s or WebM through dynamic URLs.
- Resize, crop, and transform the videos generated in step 1.
- Optimize the transformed videos through a fast content delivery network (CDN).
The conversion capability is available in all Cloudinary plans, including the free tier. Do check it out.