Transcript for:
Understanding Digital Video Formats and Codecs

[Music] welcome to another video from explaining computers 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 coder 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 in 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 the 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 minidv tape is a container and not a format as it can be used to store video in three different ways specifically a minidv tape like this one can store video encoded with the 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 the 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 videos codec digital video just like a reel of movie film is made up of a series of still frames a codec or coder 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 intra-frame and interframe intra-frame compression compresses each frame individually in contrast inter-frame 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 intra-frame 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 intra-frame codec if possible common intra-frame 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 for different codecs in the prores family are named prores 422 proxy which has the lowest data rate and quality up to prores 444xq 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 intra-frame 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 intra-frame codec and some professional video formats take advantage of this usually describing their codec as iframe h264 a more recent and increasingly popular interframe 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 two of their standard mpeg-h and can produce video with the same quality as an interframe h.264 codec with roughly half the data rate and file size however h.265 requires more computer power to encode and decode with h.264 and so is not as easy to edit an earlier and still very important interframe codec is h.262 which was defined by the motion picture experts group in part two 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 into leave and mav 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 more 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 finally mts m2ts and ts were created for the avchd video format and blu-ray discs and stand for mpeg transport stream and peg 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 xavcl formats used on many sony cameras then store h.264 video in an mxf container while the closely related xavcs 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 often 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 mod container whilst dnxhd and dnxhr codec videos are usually placed in either an fxf or mov file videos shot on smartphones also don't have a named format but are usually encoded with an h264 or h.265 codec and stored in a 3gp 3g2 or mp4 container on an android device or in a mav container on an iphone when it comes to the delivery of final digital video files once again we often lack specific format names although h264 and h.265 codex 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 intra-frame panasonic codec called avc intra is also very common indeed in october 2014 all uk broadcasters began using a format called as11dp 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 35 millimeter film now technically we could argue that even the role of 35 millimeter film is a container and not a format because the frames on a roll of 35 millimeter film can be optically stretched to accommodate different aspect ratios and the vista vision format shot 35 millimeter 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 a hundred years if you wanted to shoot high quality moving images with a good archive potential you chose the 35 millimeter 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 role of 35 millimeter 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 recent [Music] you