Understanding Digital Video Formats: Codecs, Containers, and More Explained
Explore the complexities of digital video formats, including codecs and containers, to better understand how video files are encoded, stored, and used.
File
Explaining Digital Video Formats, Codecs Containers
Added on 09/30/2024
Speakers
add Add new speaker

Speaker 1: Welcome to another video from ExplainingComputers.com. This time I'm going to talk about digital video formats. To do this I also need to explain digital video codecs and containers. So let's go and get started. Digital video files can have many different file extensions including MP4, MOV and MXF. However the first thing to understand about digital video formats is that they're not defined by their file type. This makes digital video formats far more complex than, for example, image formats where you can be certain that a JPG file is an image in the JPEG format. Rather than being defined by a file type, a digital video format is a combination of a video codec and a container. Codec stands for Coda Decoder and refers to the algorithm used to digitally encode a video. Meanwhile a container is a digital box or wrapper used to store video streams and related content in a single file. It is therefore digital video containers that can be identified by their file extension and not digital video formats. Today the great many video codecs and containers are in use with common codecs including H.264 also known as AVC, H.265 also known as HEVC, H.262 also known as MPEG-2 Part 2, MJPEG, ProRes, DNxHD and DNxHR. Common containers include MP4, AVI, MOV, MXF, 3GP and 3G2 and MTS, M2TS and TS. There are many other digital video codecs and containers but the ones listed are those I'll explain in more detail later in this video. As you probably gathered, digital video is complex and can get somewhat confusing. So to help us get our heads around the critical concept of a video format being a combination of a codec and a container, let's take a look at one of these, a mini DV tape which was for years a common means of storing digital video. However a mini DV tape is a container and not a format as it can be used to store video in three different ways. Specifically a mini DV tape like this one can store video encoded with a standard definition consumer DV codec, with a professional standard definition codec called DV-CAM and with a high definition codec called HDV. This means that it's impossible to look at a DV tape like this and to know its format. And precisely the same is true when it comes to digital video files where the file extension indicates the container but not the video's codec. Digital video, just like a reel of movie film, is made up of a series of still frames. A codec or coda decoder digitally encodes these frames with the term codec used to refer to both the software or hardware that performs the encoding operation as well as the algorithm it applies. Because videos contain a great deal of information, most but not all codecs compress a video's frames to limit file size. Such compression can also be achieved in two ways known as intraframe and interframe. Intraframe compression compresses each frame individually. In contrast, interframe compression stores some complete frames as keyframes but all frames in between as delta frames which only contain incremental changes. This allows interframe compression to produce smaller video files. However, intraframe video is generally of a higher quality and is easier for a computer to edit as every frame is immediately accessible. So if you are planning to edit your video, it's best to shoot it using an intraframe codec if possible. Common intraframe codecs include MJPEG, ProRes, DNxHD and DNxHR. As you may guess, MJPEG stands for Motion JPEG and stores each video frame or field as an individual JPEG image. ProRes is a family of intraframe codecs created by Apple which is widely used in professional video acquisition and production. The different codecs in the ProRes family are named ProRes 422 Proxy which has the lowest data rate and quality up to ProRes 4444XQ which has a very high data rate and produces very large files. DNxHD stands for Digital Non-Linear Extensible High Definition and is a family of intraframe codecs created by Avid for professional video editing but now also used for acquisition. As you may guess, DNxHR is a higher resolution version of DNxHD supporting 4K video and above. In common with ProRes, DNxHD and DNxHR data rates and file sizes can get very large indeed. One of the most popular codecs in use today is H.264 also known as AVC or Advanced Video Coding. H.264 was defined by the Motion Picture Experts Group or MPEG in part 10 of their standard MPEG-4. Most of the time H.264 is an interframe codec that produces relatively small video files by storing keyframes and the incremental differences between them. However, the specification allows H.264 to be used as an intraframe codec and some professional video formats take advantage of this, usually describing their codec as iFrame H.264. A more recent and increasingly popular intraframe codec is H.265 also known as HEVC or High Efficiency Video Coding. This was also defined by the Motion Picture Experts Group in part 2 of their standard MPEG-H and can produce video with the same quality as an intraframe H.264 codec with roughly half the data rate and file size. However, H.265 requires more computer power to encode and decode than H.264 and so is not as easy to edit. An earlier and still very important intraframe codec is H.262 which was defined by the Motion Picture Experts Group in part 2 of their MPEG-2 standard. H.262 is not as efficient as H.264 or H.265 so produces much larger video files. However, it is still widely used for standard definition digital television broadcasts and DVDs. As noted earlier, a digital video format is a combination of a video codec and a container. Here a container is a digital box or wrapper that is used to store a video stream as well as one or more accompanying audio streams and potentially other related content such as subtitles and metadata. Digital video containers include MP4, AVI and MOV. MP4 was defined by the Motion Picture Experts Group in their MPEG-4 part 14 specification. AVI was developed by Microsoft and stands for Audio Video Interleave and MOV was created by Apple and is short for Movie. All three of these containers can store video encoded with many different codecs with MP4 and MOV currently having the widest range of both professional and consumer applications. Professional niche containers include MXF, 3GP and 3G2 as well as MTS, M2TS and TS. MXF stands for Material Exchange Format and is a container used in professional video production and distribution. Meanwhile 3GP and 3G2 are containers developed by the Third Generation Partnership Project for use on mobile phones. MTS, M2TS and TS were created for the AVCHD video format and Blu-ray discs and stand for MPEG Transport Stream, MPEG-2 Transport Stream and Transport Stream respectively. The codecs and containers we've just looked at can be combined to create a wide variety of video formats, some of which are mainly used for recording and others for the delivery of final video files. To provide just a few examples when it comes to acquisition, videos recorded in the still relatively popular consumer format AVCHD which stands for Advanced Video Coding High Definition use the H.264 codec and either an MTS or M2TS container. The XAVC-I and XAVC-L formats used on many Sony cameras then store H.264 video in an MXF container while the closely related XAVC-S format uses an H.264 codec and an MP4 container. Many Canon cameras shoot in a format called XFAVC which again uses the H.264 codec and an MXF container. In production, especially in the consumer arena, video formats are not given a name. For example, most DSLRs do not declare a format but use an H.264 or H.265 codec with either an MP4 or MOV container. Similarly, video captured on cameras and recorders that use a ProRes codec is typically described as being in the ProRes format and stored in a MOV container whilst DNxHD and DNxHR codec videos are usually placed in either an MXF or MOV file. Videos shot on smartphones also don't have a named format but are usually encoded with an H.264 or H.265 codec and stored in a 3GP, 3G2 or MP4 container on an Android device or in a MOV container on an iPhone. When it comes to the delivery of final digital video files, once again we often lack specific format names, although H.264 and H.265 codecs used with MP4 or MOV containers are the most common in the consumer space. And if you are ever in doubt, render your final video using the H.264 codec and an MP4 container as this is always a very safe bet as well as being the recommended upload format for YouTube. The professional delivery of final video files usually takes place in an MXF container using codecs that include ProRes, DNxHD and DNxHR. This said, an intraframe Panasonic codec called AVC-INTRA is also very common. Indeed, in October 2014, all UK broadcasters began using a format called AS11DPP for HD program delivery which uses the AVC-INTRA codec and an MXF container. Finally, most cinemas these days project from a format called Digital Cinema Package or DCP. This uses an MJPEG codec and an MXF container. So the MJPEG codec is not as rare as you may have imagined. For the best part of a century, the most stable and widespread motion picture format was this 35mm film. Now technically we could argue that even a roll of 35mm film is a container and not a format because the frames on a roll of 35mm film can be optically stretched to accommodate different aspect ratios and the VistaVision format shot 35mm film horizontally and not vertically in order to get a bigger frame with higher resolution. But for the most part, for the best part of about 100 years, if you wanted to shoot high quality moving images with a good archive potential, you chose the 35mm film format. Today, digital video reigns supreme online, on television, and in the cinema. And as we've seen in this video, there are a wide range of codecs and containers available which give us a bewildering array of digital video formats. And deciding which one to shoot in, to edit in, to deliver in, and to archive in is a very tricky decision. But I hope at least in this video I've given you some useful information. But now that's it from me and the roll of 35mm film. If you've enjoyed what you've seen here, please press that like button. If you haven't subscribed, please subscribe. And I hope to talk to you again very soon. Bye.

ai AI Insights
Summary

Generate a brief summary highlighting the main points of the transcript.

Generate
Title

Generate a concise and relevant title for the transcript based on the main themes and content discussed.

Generate
Keywords

Identify and highlight the key words or phrases most relevant to the content of the transcript.

Generate
Enter your query
Sentiments

Analyze the emotional tone of the transcript to determine whether the sentiment is positive, negative, or neutral.

Generate
Quizzes

Create interactive quizzes based on the content of the transcript to test comprehension or engage users.

Generate
{{ secondsToHumanTime(time) }}
Back
Forward
{{ Math.round(speed * 100) / 100 }}x
{{ secondsToHumanTime(duration) }}
close
New speaker
Add speaker
close
Edit speaker
Save changes
close
Share Transcript