Codecs And Formats

This topic answers questions about codecs and formats for video inputs and outputs.

FAQ

  • What is a codec? What is a format?

    A codec is a compression standard. Raw video or audio is compressed when encoding, and decompressed (decoded) on playback. MP3 is an audio codec – a compression standard that MP3 players know how to decode, and MP3 encoders know how to encode. There are hundreds of codecs out there; some of the more important ones are H.264, HEVC, MPEG-2, Theora, VP8, VP9, JPEG2000, DivX, XviD, and the WMV family (video) and MP3, AAC, Vorbis, and the WMA family (audio).

    A format is a file container that holds one or more codecs – video, audio, or even data. The container format contains information about the video, audio, and data tracks that it holds. Some example container formats are mov (Quicktime), mp4, ogg, and avi.

  • What incoming video formats are compatible with Zencoder?

    Nearly everything. It’s difficult to predict what types of formats might be uploaded to your application, especially with user-generated content, so our goal is to accept every video format possible. So we support hundreds of codecs and formats, including all of the most common ones.

    For detailed information about video formats and codecs, and what source video formats are supported by Zencoder, see Supported Video Codecs and Containers

  • Are there any particular guidelines for input files?

    One issue that we have noticed is that if your input file is a segment of a longer video, and the segment does not begin with a keyframe, you may get stuttering at the beginning of the output videos. To avoid this, make sure that the input video begins with a keyframe.

  • What output formats do you encode to?

    Video

    AV1 is an open, royalty-free, next-generation video encoding format from the Alliance of Open Media Video. It can deliver superior quality at significantly lower bitrates compared to HEVC, VP9 and H.264 codecs. AV1 is still less full-featured and widely supported than H.265 (HEVC).

    H.265 (also referred to as HEVC or HDR) is a next-generation video codec that is capable of delivering higher quality content at lower bitrates than its predecessor, H.264. Because it is a new technology, HEVC video is not yet widely supported by clients (meaning device + OS + browser/app). In addition, some clients are capable of switching between HEVC and AVC segments during playback, while others are not.

    H.264 is currently the highest quality video codec available that is generally supported by all browsers and platforms, which means that it can usually look better at the same file size, or the same at smaller file sizes, than other codecs. It's also widely deployed, and most web browsers can play it (either natively, or via a Flash plugin), and so can many mobile devices, like the iPhone and Android. But there are licensing issues to consider.

    Theora is an open video codec. It is natively playable in many browsers, including Firefox, Chrome, and Safari. But compression is a bit worse than H.264.

    VP8 is an open and royalty-free. It compresses better than Theora, and about as well as the H.264 Baseline profile. H.264 is still better in its Main and High profiles. But that will hopefully change as VP8, and VP8 encoders, mature. VP8 is expected to be widely adopted in web browsers, and can be played today in the newest versions of Chrome, Firefox, and Opera.

    VP6 is supported natively in Flash 8, and so is widely used on the web. It is a good codec, but doesn't compress as well as H.264. We encode to VP6 in the FLV container, with MP3 audio.

    MPEG-4 is often used in a 3GP format on mobile devices.

    WMV is a Windows codec. We specifically support WMV 8, which is confusingly the same as WMV2.

    Audio

    MP3 is a pretty good audio compression format. Royalties on distribution of MP3 content may be applicable in some cases.

    AAC is quite similar to MP3. The standard itself is better, but MP3 encoders are often a bit more mature, so the quality differences between them are small. There are no licensing fees for distributing AAC content.

    Vorbis audio is open and royalty-free, just like Theora and VP8 for video. Vorbis is a good audio codec, and is very comparable to MP3 or AAC.

    WMA is a Windows audio codec that we support alongside of WMV video.

    Microsoft Smooth Streaming (MSS) is an adaptive bitrate format which enables streaming of video content to platforms such as Microsoft Silverlight, XBox 360, Windows Phone 7, and select connected TV platforms.

  • Can you add support for codec X?

    Maybe. We have plans to add support for a few more codecs, and we make these decisions based on customer demand. Get in touch and let us know what codec you want, and why, and we’ll definitely consider it.

    Keep in mind that we aren’t interested in supporting 50 output codecs. We want to support every possible input codec, but only the most important output codecs. We’d rather do an awesome job with 5 video codecs than a mediocre job with 15.

  • What codecs should I use?

    On the video side, this depends on how onerous you find the H.264 patent licensing terms. At the moment, they are pretty liberal, so H.264 works for most people. It’s the best quality codec around and the most widely deployed, so it’s a good default. Again, be sure to understand the codec licensing terms.

    Try VP8 if you want a different option, it is open and royalty-free. Try Theora if you want a more established free codec, and can live with a bit less compressibility. But keep in mind that neither Theora nor VP8 are playable in every browser, whereas H.264 is playable in 99.9% of browsers.

  • What file extension should I use?

    H.264 and AAC content uses a MP4 file format. Valid extensions are .mp4, .m4v (mp4 video), .f4v (mp4 video for Flash), or .m4a (mp4 audio-only).

    VP8 content uses the .webm extension.

    Theora and Vorbis content can use .ogg or .ogv (Ogg Video).

    MP3 audio-only files use the .mp3 extension.

  • I want .flv video. Why do you tell me to use .f4v?

    FLV isn't just a file extension — it's a container format used by older Flash Video codecs (H.263 and VP6), which is officially deprecated for H.264 content. If you want H.264 content playable in Flash, you typically want to use a MP4 container format, not FLV. Call it ".f4v" if you like.

    It is possible to place H.264 and AAC streams into the traditional FLV file, but Adobe strongly encourages everyone to embrace the new standard file format.

  • How can I add quick-start to my videos so they play during download?

    Zencoder automatically places the MOOV atom at the front of the file, similar to what qt-faststart (or qtstart) does. This means that videos will play sooner when downloading.

  • Can you transcode SWF files?

    Maybe. SWF files can contain a variety of things - if we're able to identify a video or audio stream in the file we may be able to transcode it. Many SWF files don't contain an audio or video stream at all, but are instead animation instructions. While this may result in a series of changing pictures during playback, it's not a video stream that we can process.