This topic is so complex, and this video only scratches the surface. You could literally make it your career to explain everything about digital video.
As a heavy user of various digital video/media solutions, it was certainly a pleasure to see a refresher on all of this stuff. Just thought I'd share a couple additions from my experience: 1) Media containers like MP4 can not only contain several audio streams and subtitle streams but also several video streams too! Some of the videos I encode have three or four different video tracks showing playback from different perspectives. 2) Media containers can have any or all of the items you listed (e.g. video streams, the audio stream(s), and subtitles). Some projects I've worked on use MP4 but simply contain a bunch of audio streams which is super handy if you're trying to transcribe audio from an interview and have a combination of combined and individual speaker's audio, enabling the transcriber to swap between the various speakers. Since it's all contained within that mp4 file it's very easy for them to work with. 3) Containers can also contain a bunch of other meta-data that may be handy for some projects. For instance, did you know that you can label each audio stream, video stream and transcription track, enabling viewers to clearly tell what they viewing? 4) Not all media playback software handles these containers the same way. I'd encourage anyone to try opening an MP4 file containing several audio, video, and transcript tracks in QuickTime and tell me what they see. Compare this with VLC which lets the user choose which audio, video, and closed captioning tracks they want to see. 5) Similar to the roll of 35mm film you held up at the end, modern-day video can also be created by threading together a bunch of still images. Some of the videos I'm creating right now use tens of thousands of ultra-high-resolution screenshots to put together 4K video at about 90 frames-per-second. 6) Although there are a number of great video editing tools out there, one tool I am using a lot is FFmpeg (from the terminal). It lets you do all sorts of stuff from creating multi-track audio MP4 files to creating multi-track audio, video, and closed captioning videos with sophisticated overlays. The best part is since it's a command-line tool you can use shell scripting to automate the whole video encoding workflow. Instead of spending hours in handbrake or other tools going project by project to define a workflow and wait for the processing to resume, I can write a clever script run it overnight on my computer and when I get up all the media files are encoded for me to view.
This is by FAR the best, briefest and most comprehensive simplification of digital video formats I've seen... fantastic job, thank you!! 🥰 From now on, anytime someone asks me to explain it - which I do very poorly - I can send them here.
This is definitely one of those videos which falls into the category of "Things I didn't realise I didn't know", or - more precisely - "Things about which I didn't realise how much there is not to know"! By that I mean both the things you've explained in the video and all the questions which arise from it because it's quite clear you've only really scratched the surface!
Scrolling the comments, I see I was hardly alone in raising an eyebrow at the absence of Matroska/.mkv containers. I have also seen the numerous replies from our charming host regarding his focus on the production/editing side of things. If I might be so bold, Chris, could I suggest the idea of a future video that dives deeper into video containers including the pros and cons of each relatively popular type. It is not inherently obvious to a novice why one might choose MP4, MKV, MOV, the venerable AVI or whatnot over the other options. MKV clearly has a strong user base with video that has multiple language options, for example, but understanding why would be quite interesting. Why do those unique Android containers when MP4 exists? That sort of thing. Great video as always!
Definitely curious why MKV was left out. MKV is commonly used, open source, supports more options for audio and captions, and supports higher compression than MP4.
@@autouzi Me too, I came here specifically to understand MKV files because that is the default storage for OBS and I want to find an efficient way to upload my twitch streams to TH-cam, as well as the best file to convert in order to edit with Premiere Pro (because Pr unfortunately does not support the MKV file format).
@@autouzi I thought the same too it wasnt mentioned. It is a very common format. As for being higher compression than MP4, to be honest I haven't really noticed any difference, though programmes like Adobe Premiere don't support MKV, but you can remux MKV files to MP4 (OBS Studio can do this). I've noticed that you hardly hear of MPEG2 anymore, even avi you rarely hear of. I have a TV recorder machine called Argus which records in the .mts format that you would normally see on consumer grade HD camcorders. The recorded quality is superb, no compression I can tell and looks like the original, but oddly produces very small file sizes, but I think this is down to the bitrate it was recorded/captured at.
Here I am again with my cuppa. Sitting down with a brew to watch the new EC video is a habit I very much enjoy! The only time I have issues with codecs is on DVD players as the selection of formats supported is so random & varied. As far as Windows goes, at least you can download VLC or MPC-HC and pretty much forget about what format your files are in. This is one respect that things have definitely changed for the better!
Fascinating topic. I remember learning years ago that MPEG video from a source such as digital satellite and cable used (perhaps still do) the interframe compression mechanism, where it would only compress the moving parts of a video and not the still parts of the video. Too much movement on the screen and you can begin to see blocks of video (also known as pixelation) on the screen. A good example is the New Years celebration in Times Square with all the confetti raining down on the crowd below. I believe TH-cam also uses the interframe compression as well. The DV tape demonstration in the video really cleared up a lot of confusion I had between the codec and the container. Very well done Chris, thank you sir!
3 ปีที่แล้ว +25
I wrote a paper in college 16 years ago exactly about this topic. MP4 was a new format/container at the time, using mostly H.264 (H.265 didn't exist yet), HD files were almost non-existent, and most everything was SD with a few 480p or 576p videos. 3GP was also kind of new at the time (used in mobile phone videos). Good times...
This is the best video ever made on explaining codec and containers. I was totally confused after I saw Raspberry Pi 4 documentation and it stated H.264 decode/encode and H.265 encode. Thank you Explaining Computers.
Sir, The way you present these topic in a succinct manner is a testament to your great teaching ability. Thank you for this channel sir.We love your work
This is the best video on formats and codecs I’ve ever seen! It’s so clear and concise. I now have a WAY better understanding on the subject. I’m saving it a a reference to whenever I have questions or need a refresher. Thank you SO much!
Companies have fallen in love with letters and numbers added on to product titles... And it seems to be " the more the merrier". Thank you for adding clarity to the chaos of characters! Wonderful explanation!
I disappeared down this rabbit hole of research once. Your explanation was much simpler to understand, as when you add in the audio codecs, the formats becomes a veritable fruit machine of combinations. All I wanted to know was how to store my DVD's on a NAS. I wasn't expecting a headache :)
use the Linux version of MakeMKV ,their big 'single' files though, buy more drives for your openmediavault , and/or use an ffmpeg script to off line recode them 'once' for everything on your lan, simples ^_~
I did not know hardly any of this subject before. Thank Chris for your clear and complete explanation on the topic. I now have the confidence I needed to handle the video files from my (over the air TV) DVR, which uses 'mts' format. I'd assumed that an app like VLC would play the files, but it's good to know the structure behind it. Thanks for another great video.
Great video as usual, and it filled in some of my missing knowledge about video formats, but still did not answer basic questions I have. Many years ago I spent hours and hours converting my VHS tapes to digital using an RCA Lyra RD-2780 connected to an 8-head VCR, which worked great although saving my video files in an ASF format. Each video has some header and trailing video which needed trimmed off, and thinking this would be as easy as trimming an MP3, I happily decided to drop some $$$ on a copy of Cyberlink PowerDirector to do the job. Happiness turned to frustration as every attempt to "trim" the video resulted in a recoding of the video, along with file size 2x to 4x times the original. To this day I still do not know how to edit the videos without a ballooning effect on the file size, which should go down with a smaller video and better compression. I don't want to have to repeat the hours of work rerecording the original VHS tapes. Any advice?
@@rleim IDK if it is or isn't. I just want to trim the files without having to recode them (which I assume results in lower video quality) and having the file size balloon up to ridiculous levels.
Nothing against MKV, but I wonder what the benefit of that container is over say MP4? In addition, not all media players support the MKV format whereas there is typically universal support for MP4 and MOV.
Holy moly, you stretched my brain again and I will have to go back and watch this video several times because you dropped me into a deep dark black hole. I have had a camera in my hands since I was 8 years old and I thought I knew the formats clearly but clearly I do not. Thank you for a most professional presentation and you have stretched my brain almost to the breaking point. =_=
I feel very fortunate to be here. Your tonality, pace with which you uttered, the information you imparted, so on and so forth,...........nothing I can say, but AWESOME. Needs more of you. Thank you for your input! And LONG LIVE!!
Modern codecs have come a long way, a few years ago I "stumbled upon" about 5000 hours of my favorite tv shows, and I managed to compress them down to less than 1TB using h.265 at 480x360 400kb/sec. I originally intended it for a laptop screen, but that machine broke, it works fine on my 32'' TV though, being about the quality of a low end DVD.
As a comment said earlier, I never really understood anything about this. Another excellent explanation, minimal jargon, clear, well planned and, as is rarely the case, useful.
In Linux we have various tools that make recognizing these things a pretty easy. At the first stage a command named 'file' this will display what the file is and read out the required info, if say the format is not something you have a player / codec for then you go straight for FFMPeg and convert it to something more friendly. There is also VP8 and VP9 codec / formats ( see wiki's for more info ) among other audio codecs formats like Ogg over MP3 which are preferred as shown codecs here come with license entanglements that are frowned upon due to overreach of DRM among other things ( Looking at you Hollywood ). I think as far as a player goes VLC is pretty much the go to on all platforms as it supports any and all codecs / formats usually out of the box.
Excellent: I was hoping somebody would post such a comment to save me the job of doing it. I always go for ffmpeg and vlc to sort out videos. One common thing that often needs to be fixed is the frame rate. Videos are often provided at, say, 50 fps, but they are simply 25 fps videos with each frame shown twice, so you can halve the file size with no loss of quality using ffmpeg's -r flag. This has the added benefit of cutting the processing power needed to display the video, often accompanied by a reduction in fan noise.
After 15mins it's already 1,191 views. Interesting topic, I've always wanted to learn more about those things but I've never got to. This video is a great explanation, I finally understood what they're all about now. Thank you!
Ahh yes the confusing world of video - nicely explained Chris 👍 Mr Scissors or Stanley sure would like to get into some old fashioned tape reel frame trimming jobs I bet!
For me, so much new to learn in this presentation... Had to watch it several times... Time well spent (both for the presentation and viewing). Thank you!
I frames are ‘intra coded’ - they can stand alone... P are predictive, only containing the detail needed to render between I-frames when running forward... B are ‘backward’ details... The complexity of the GOP (Group Of Pictures) determines the ‘temporal’ resolution of the stream... The other compression element is ‘spatial’ compression, which condenses the image to be rendered within the desired XY image space.
in professional video broadcast, for MPEG2, h264 and HEVC you have I, B and P frames. An I frame is a fully encoded frame, think of it like a JPG image. P and B frames only contain the 'differences' between I frames. So if you had an I frame once per second, and you are doing 25 frames per second, you would get an I, then some Bs and Ps, then a second later an I. In light compression, you generally get all I frames (no Bs or Ps) so you don't have to think about I frames. Even if you do have I, B and P, if you use something like Premiere as an editor, it will render all the frames fully for editing (so Premiere will take the I frame, and use that information to render the B and P frames as 'I' frames so you can d frame accurate edits).
Informative video, as always. I watched this to refresh my memory about these things. Got the apple side of the story as a bonus. Thanks for making these videos. Amazing voice and delivery as always. You are like the Geoff Boycott of TH-cam to me!
Fantastically clear explanation! I was afraid to approach this topic expecting it to be hard on my brain. But with your video it was a pleasant enlightenment! You just made my life easier! thank you !!!
Nice stuff. I was fighting with this several years ago when I was in Nokia. The phone supported “MP4”, but as you said this is just a container. An area I think you skiped is the Audio codec. The contain includes also Audio and this also comes in various formats (AAC, MP3, etc). If you get this wrong, no sound... Also the MKV container is imortant as it can contain several items. Like multiple audio or subtitle track. By the way, in Denmark we broadcast in TS with H.264 video and AAC audio.
I believe MKV was also the only real container choice for multiple _video_ tracks back when I was comparing containers many years ago. (I don't know if more containers support that now, and I might be wrong about that anyway! :p) I imagine that's a very rarely used feature, with multiple audio and subtitle tracks being more common, but weren't DVDs hyped, at launch, as supporting multiple camera angles that the viewer could switch between on demand? I don't recall that ever really being used, but the idea is there! 😹 I could imagine something like OBS having the option of saving all/several video inputs/scenes as separate tracks in the same container when recording, along with all/several audio tracks, so that everything was in the same place for any future editing, and all tracks should(?) be correctly synced up. But I doubt video editors have much support for multiple video tracks in one container (though I hope I'm wrong!), so OBS recording like that wouldn't be too useful... MKV also supports "attachments" - arbitrary embedded files - which can sometimes be useful!
It's also TS with H.264 and AAC in the UK. I think he quoted the preferred format for delivery of material to the broadcaster by a production house. lol
Thanks for explaining this very confusing subject. I find it difficult to produce videos that all mutually compatible with computers, youtube and DVDs. What plays perfectly on Computers i.e MP4s does not play on all DVD players. Some of the older DVD players will not play MP4 videos so I have to make in video in more than one format to get it to play on multiple people's devices. This certainly helps to clean up some of the confusion.
Not gonna lie, this information was very useful in understanding the various formats my video editor can spit out. Now I know H.264 / MP4 format is the best combo for online uploads. Thanks!
It is worth to mention about mkv and old avi conteners. TH-cam is testing a new AV1 codec. AV2 and H266 codecs are in development. And lastly. I think a lot people probably remember illegal DivX 3 alfa codec stolen from Microsoft. I do remember this time a years ago. If you had dvd-rom drive or dvd-rw you could rip (still can) dvd video to avi with xvid or DivX 5 to single cd 700mb. 4,38gb or more with DVDDL to one single CD. Best regards!
Usually I understand various data formats but I have to admit regarding video data I have been in the dark. I didnt realize how much i was confusing codecs versus containers until I heard your explanation. very useful to know in that more highly compressed video formats are stressing our computers more now when editing. Thanks for the enlightening explanation!
Thanks, that was very informative. Would you be able to follow up with something about how audio in included in the containers. There seems to be an equally bewildering situation there what with bit rates and multiple channels. And for icing on the cake how about demystifying how all videos are streamed?
MKV and WebM are both containers, the latter intended for online use, as the name implies. Important depends on what areas of application you are working in! :) This video is focused on video acquisition, production and distribution.
@@ExplainingComputers webM is a container for VP8 or VP9 codecs afaik, I don't know if it can be used for other codecs. I missed the video mentioning these open formats plus AV1.
@@ExplainingComputers Currently if one downloads a TH-cam video, it always arrives as an MP4, but very old vids can arrive a WebM, AVI, MKV, and one came down the wire in dozens of fragments with some other extension that YT-DL took all day to repack into MKV files. Standards, so many to choose from! Thanks for the info; I had no idea what was going on in there, and now have my very first clue. :D
@@Reziac Actually you can easily download WebM, AVI video streams from most (if not all) newer youtube videos with youtube-dl or other software such as Aria2c for example. Both video and audio streams are downloaded separately then merged using ffmpeg to a desired container ( i mostly use MKV or WebM) depending on what video (resolution)/audio (quality) needed.
Wow, that was a lot more informative than I was expecting! I have heard one other person mention that file containers and codecs are not the same thing, so it's great to see more information about that in-depth! I screen-record with MKV container these days because of recovery from corrupted video, but I always end up muxing to MP4 using Avidemux, OBS (both nearly instant probably because of same file container and copying frames), or Handbrake. I use MTS for camcorder, MP4 for Android Phone, and MOV with iPad. I generally export using AVI and compress it with CRF in Handbrake to generally get the best ratio between quality and size without risking losing more quality until the very last step. I feel old-fashioned doing that, but that's just how I do things. :)
@@Nivislmon hey there, ive been doing some research on this topic so i feel im poised to answer this for you. .mkv containers, specifically in regards to on screen recording on computers, are a type of container that can be remuxxed into alternate file types, making it extremely versatile for any recording and editing purposes you may have to fulfill for projects secondly, when using a program like OBS for screen recording, the .mkv format is perfect because it can retain data without corruption or data loss, in the instance where, perhaps, your computer crashes. instead of having a corrupted file, the recording will be saved in its entirety now, surely ive oversimplified some things here so i encourage you to look into it yourself but yeah thats basically why .mkv is so popular, and for good reason
Thanks! More of this, please! Before this video I was ignorant. But the good thing was that my ignorance didn’t leave much room for confusion. Now I feel that I know a little, but I’m also a lot more confused. I feel that I need to know more.
Why no .MKV (matroska) among popular containers?! New Samsung tvs come without .AVI support but with .MKV support. In fact, MKV is the most usable and convenient container when you want separate audio tracks, nested tracks like subtitles in various languages and so on...
@@ExplainingComputers It might be useful to explain and contrast that with what we see in userland, once all that acquisition and production are done and sent to our screens.
Great video Chris. I have no real reason to know this but, as an engineer, I know that I will watch it several times to absorb some ‘ nice to know’ knowledge.
Wow! A video about something I really like! Nice! I use Handbrake and MakeMKV a ton to back up my DVDs/BDs and after years using AVC MP4s, I switched to MKVs because of MKVToolNix and editing subtitles. Also found out just how much better the picture quality (average bitrate encodes) was with HEVC, so I re-encoded lots of them. 2:08 Still never heard of the last 2 on the left. I mainly remember DivX and XviD in the mid-00s being super popular for a hot minute.
I do state that other containers exist, but that I am only going to cover those on the initial table. My focus here is on digital video aquistion and production, and MKV is not an acquisition or production container.
I remember when I was starting to deal with digital video using a program, as I wanted to save the video to a certain format I was like “oh my god look at all these formats and variations!” I did not even know what to pick and why. It took me a long time to figure out which format to use that provided me the highest resolution with the lowest file size. But as of lately, I’m always using the M2t format to upload my videos to TH-cam because if I try other formats, they actually degrade the sound for whatever reason on TH-cam’s part. Because even though the quality of the audio sounded great on my end on other formats, for whatever reason TH-cam itself degrades it. And I’ve noticed that by using the M2t format the quality stays pretty much the same. Then we have all these other options within the issue for example, anti-aliasing options, dithering options, bit depth options so many other options when rendering a video. -- With so many different formats and variations, it’s like going to a store and seeing a whole bunch of different types of bread. You have no idea which bread is the richest tasting so you have to go through each and every one of them to find out and it can be quite a task. - Television before the digital era was actually crisp and clear and all channels looked great. Ever since the digital era arrived there is a complete mess of resolutions on the TV broadcast. I can see a commercial that looks very good but then the next commercial looks grainy and low quality. The same goes with news broadcasts sometimes they’re showing an interview of a person that looks great and then when they go to show a video of some sorts related to the news that they’re talking about it looks horrible. We never had this issue back in the day. The only way to combat this is if all Television stations choose one high-quality format for everything. But I don’t see this happening anytime soon. - Everybody uses whichever format they choose and the digital video world becomes a huge clusterfruck of videos with all sorts of resolutions and quality. I wish there was only ONE format and container for all provided it’s the highest quality available for the sake of the beautiful crisp and no nonsense video. I’m dreaming of the MPNG format to appear.
Codec is indeed sometimes expanded as compression/decompression -- or compressor/decompressor. But calling it coder/decoded is more common, and also more accurate -- as not all codecs compress things. :)
Thank you, very informative. But how about the other formats/codecs? I mean divx, mkv, Xvid, indeo, etc? A history of digital video would be interesting indeed. I remember a small utility Gspot that allowed to tune the combination of codecs used to view a video. with most players the video was green,flipped, black or interleaved but with that GSpot I managed to see it
I believe divx and Xvid are quite similar to MPEG line of codecs. I think mkv is used more in consumer side of things as well; the video seems to focus more on capturing and editing side.
@@muche6321 I remember seeing a camcorder that had Divx logo and Pinnacle Studio (8 or 9) used to import and edit Divx encoded videos. Of course those were more home/consumer oriented but however they existed as option to mpg/mpeg at the time, before AVC.
Just to add, one of those projects was trying to complete a $$$ government tender for ‘Parliament House’ broadcast capture, compression, reticulation and storage systems. The tender was so badly written, I had to call them out, and about a week later the tender was withdrawn, and rewritten some months later ! A lot of pissed-off vendors that would have tried to sell them ‘whatever’ they had!
@@rleim MKV is an open source container for consumer video, so generally used with interframe video, so not idea for editing. And something Sony, Canon and others have decided to use in their cameras.
This is a subject I've taken for granted for decades, without actually understanding it. Thanks for this!
Same.
n00bs
@@aryanmaddox1749 spam
@@codycast Yes, but what about my mother's virtue? Surely there's comments to be made about that?
@@FatNorthernBigot ?
This topic is so complex, and this video only scratches the surface. You could literally make it your career to explain everything about digital video.
So true!
Only because video is so widely used for everything now.
Therefore, minor efficiency improvements are economic windfalls.
As a heavy user of various digital video/media solutions, it was certainly a pleasure to see a refresher on all of this stuff. Just thought I'd share a couple additions from my experience:
1) Media containers like MP4 can not only contain several audio streams and subtitle streams but also several video streams too! Some of the videos I encode have three or four different video tracks showing playback from different perspectives.
2) Media containers can have any or all of the items you listed (e.g. video streams, the audio stream(s), and subtitles). Some projects I've worked on use MP4 but simply contain a bunch of audio streams which is super handy if you're trying to transcribe audio from an interview and have a combination of combined and individual speaker's audio, enabling the transcriber to swap between the various speakers. Since it's all contained within that mp4 file it's very easy for them to work with.
3) Containers can also contain a bunch of other meta-data that may be handy for some projects. For instance, did you know that you can label each audio stream, video stream and transcription track, enabling viewers to clearly tell what they viewing?
4) Not all media playback software handles these containers the same way. I'd encourage anyone to try opening an MP4 file containing several audio, video, and transcript tracks in QuickTime and tell me what they see. Compare this with VLC which lets the user choose which audio, video, and closed captioning tracks they want to see.
5) Similar to the roll of 35mm film you held up at the end, modern-day video can also be created by threading together a bunch of still images. Some of the videos I'm creating right now use tens of thousands of ultra-high-resolution screenshots to put together 4K video at about 90 frames-per-second.
6) Although there are a number of great video editing tools out there, one tool I am using a lot is FFmpeg (from the terminal). It lets you do all sorts of stuff from creating multi-track audio MP4 files to creating multi-track audio, video, and closed captioning videos with sophisticated overlays. The best part is since it's a command-line tool you can use shell scripting to automate the whole video encoding workflow. Instead of spending hours in handbrake or other tools going project by project to define a workflow and wait for the processing to resume, I can write a clever script run it overnight on my computer and when I get up all the media files are encoded for me to view.
This is by FAR the best, briefest and most comprehensive simplification of digital video formats I've seen... fantastic job, thank you!! 🥰 From now on, anytime someone asks me to explain it - which I do very poorly - I can send them here.
My goodness you've shown up my ignorance! That was a fantastically informative video.
After 20 years in photography, I need to go back to school after watching this tutorial. Thanks a lot.
Thanks for watching. Look out for the follow-up video "Explaining Image File Formats" this Sunday. :)
This is definitely one of those videos which falls into the category of "Things I didn't realise I didn't know", or - more precisely - "Things about which I didn't realise how much there is not to know"! By that I mean both the things you've explained in the video and all the questions which arise from it because it's quite clear you've only really scratched the surface!
:)
Scrolling the comments, I see I was hardly alone in raising an eyebrow at the absence of Matroska/.mkv containers. I have also seen the numerous replies from our charming host regarding his focus on the production/editing side of things. If I might be so bold, Chris, could I suggest the idea of a future video that dives deeper into video containers including the pros and cons of each relatively popular type. It is not inherently obvious to a novice why one might choose MP4, MKV, MOV, the venerable AVI or whatnot over the other options. MKV clearly has a strong user base with video that has multiple language options, for example, but understanding why would be quite interesting. Why do those unique Android containers when MP4 exists? That sort of thing. Great video as always!
Thanks for this! There are indeed possibilities for follow-up videos. :)
Definitely curious why MKV was left out. MKV is commonly used, open source, supports more options for audio and captions, and supports higher compression than MP4.
@@autouzi Me too, I came here specifically to understand MKV files because that is the default storage for OBS and I want to find an efficient way to upload my twitch streams to TH-cam, as well as the best file to convert in order to edit with Premiere Pro (because Pr unfortunately does not support the MKV file format).
@@autouzi I thought the same too it wasnt mentioned. It is a very common format. As for being higher compression than MP4, to be honest I haven't really noticed any difference, though programmes like Adobe Premiere don't support MKV, but you can remux MKV files to MP4 (OBS Studio can do this). I've noticed that you hardly hear of MPEG2 anymore, even avi you rarely hear of. I have a TV recorder machine called Argus which records in the .mts format that you would normally see on consumer grade HD camcorders. The recorded quality is superb, no compression I can tell and looks like the original, but oddly produces very small file sizes, but I think this is down to the bitrate it was recorded/captured at.
@@DialecticRed You are better off with DaVinci Resolve. Also, it's cheaper & more efficient in my opinion.
Here I am again with my cuppa. Sitting down with a brew to watch the new EC video is a habit I very much enjoy! The only time I have issues with codecs is on DVD players as the selection of formats supported is so random & varied. As far as Windows goes, at least you can download VLC or MPC-HC and pretty much forget about what format your files are in. This is one respect that things have definitely changed for the better!
Fascinating topic. I remember learning years ago that MPEG video from a source such as digital satellite and cable used (perhaps still do) the interframe compression mechanism, where it would only compress the moving parts of a video and not the still parts of the video. Too much movement on the screen and you can begin to see blocks of video (also known as pixelation) on the screen. A good example is the New Years celebration in Times Square with all the confetti raining down on the crowd below. I believe TH-cam also uses the interframe compression as well.
The DV tape demonstration in the video really cleared up a lot of confusion I had between the codec and the container. Very well done Chris, thank you sir!
I wrote a paper in college 16 years ago exactly about this topic. MP4 was a new format/container at the time, using mostly H.264 (H.265 didn't exist yet), HD files were almost non-existent, and most everything was SD with a few 480p or 576p videos. 3GP was also kind of new at the time (used in mobile phone videos). Good times...
You put a lot of time and energy into a very good presentation. Thank You!
Thanks.
Just graduated Film School and have never been explained this stuff so well in any of my editing classes. I took notes during this video. Great stuff.
Congratulations on your graduation! :)
That speaks much about the level of quality that school is holding...
This is the best video ever made on explaining codec and containers. I was totally confused after I saw Raspberry Pi 4 documentation and it stated H.264 decode/encode and H.265 encode. Thank you Explaining Computers.
Sir,
The way you present these topic in a succinct manner is a testament to your great teaching ability.
Thank you for this channel sir.We love your work
EC: Mentions common containers
MKV: *Sad noises*.
Agree
"FLV" was also missing which is also kind off common
My focus here was largely on acquisition and production. I can't imagine anybody shooting or editing in MKV. :)
@@ExplainingComputers possible follow up video on format conversion and what's lost in the process?
Almost all the vids on my NAS are .mkv
handbrake + MKV was the breakfast for fansubbers back in the day
This is the best video on formats and codecs I’ve ever seen! It’s so clear and concise. I now have a WAY better understanding on the subject. I’m saving it a a reference to whenever I have questions or need a refresher. Thank you SO much!
Glad it was helpful.
Companies have fallen in love with letters and numbers added on to product titles... And it seems to be " the more the merrier". Thank you for adding clarity to the chaos of characters! Wonderful explanation!
This clearly explains why we haven’t heard from alien life as they don’t know what format to use with us, or they are so confused they gave up.
Excellent!
There’s more truth in that than you think !
I disappeared down this rabbit hole of research once. Your explanation was much simpler to understand, as when you add in the audio codecs, the formats becomes a veritable fruit machine of combinations. All I wanted to know was how to store my DVD's on a NAS. I wasn't expecting a headache :)
use the Linux version of MakeMKV ,their big 'single' files though, buy more drives for your openmediavault , and/or use an ffmpeg script to off line recode them 'once' for everything on your lan, simples ^_~
I did not know hardly any of this subject before. Thank Chris for your clear and complete explanation on the topic. I now have the confidence I needed to handle the video files from my (over the air TV) DVR, which uses 'mts' format. I'd assumed that an app like VLC would play the files, but it's good to know the structure behind it. Thanks for another great video.
Great video as usual, and it filled in some of my missing knowledge about video formats, but still did not answer basic questions I have.
Many years ago I spent hours and hours converting my VHS tapes to digital using an RCA Lyra RD-2780 connected to an 8-head VCR, which worked great although saving my video files in an ASF format. Each video has some header and trailing video which needed trimmed off, and thinking this would be as easy as trimming an MP3, I happily decided to drop some $$$ on a copy of Cyberlink PowerDirector to do the job. Happiness turned to frustration as every attempt to "trim" the video resulted in a recoding of the video, along with file size 2x to 4x times the original.
To this day I still do not know how to edit the videos without a ballooning effect on the file size, which should go down with a smaller video and better compression. I don't want to have to repeat the hours of work rerecording the original VHS tapes. Any advice?
@@rleim IDK if it is or isn't. I just want to trim the files without having to recode them (which I assume results in lower video quality) and having the file size balloon up to ridiculous levels.
MKV (Matroska) container is widely used too :)
Indeed.
Yeah, i was surprised it's not even mentioned, i use it for movies since about 6 years - mkvtoolnix rocks. :D
It's like second after mp4
Nothing against MKV, but I wonder what the benefit of that container is over say MP4? In addition, not all media players support the MKV format whereas there is typically universal support for MP4 and MOV.
@@j2simpso Easy to manipulate,
That was no-doubt the best video I've seen on explaining image file formats I've seen to-date. Thank you Mr. Barnatt. You are a treasure!
after many years, i never knew file extensions are not exactly the formats. thanks for great content
Holy moly, you stretched my brain again and I will have to go back and watch this video several times because you dropped me into a deep dark black hole. I have had a camera in my hands since I was 8 years old and I thought I knew the formats clearly but clearly I do not. Thank you for a most professional presentation and you have stretched my brain almost to the breaking point. =_=
I feel very fortunate to be here. Your tonality, pace with which you uttered, the information you imparted, so on and so forth,...........nothing I can say, but AWESOME. Needs more of you.
Thank you for your input!
And LONG LIVE!!
I’ve watched several videos trying to understand this. Yours is the clearest and helped me a lot. Thank you.
Quite possibly the clearest explanation I've seen on this tricky subject. Well done.
Thanks! :)
Modern codecs have come a long way, a few years ago I "stumbled upon" about 5000 hours of my favorite tv shows, and I managed to compress them down to less than 1TB using h.265 at 480x360 400kb/sec. I originally intended it for a laptop screen, but that machine broke, it works fine on my 32'' TV though, being about the quality of a low end DVD.
As a comment said earlier, I never really understood anything about this. Another excellent explanation, minimal jargon, clear, well planned and, as is rarely the case, useful.
You've made it all sound not only clear but sensible! I hadn't appreciated the difference between codecs and containers. Thanks very much!
This went perfectly with a cuppa tea in my new Explaining Computers mug. Thanks for another great video!
The way you have been able to explain this topic, simply left me speechless! Now I have finally understood, thank you! :)
Thanks for watching. :) Your kind feedback is appreciated.
In Linux we have various tools that make recognizing these things a pretty easy. At the first stage a command named 'file' this will display what the file is and read out the required info, if say the format is not something you have a player / codec for then you go straight for FFMPeg and convert it to something more friendly.
There is also VP8 and VP9 codec / formats ( see wiki's for more info ) among other audio codecs formats like Ogg over MP3 which are preferred as shown codecs here come with license entanglements that are frowned upon due to overreach of DRM among other things ( Looking at you Hollywood ).
I think as far as a player goes VLC is pretty much the go to on all platforms as it supports any and all codecs / formats usually out of the box.
Excellent: I was hoping somebody would post such a comment to save me the job of doing it. I always go for ffmpeg and vlc to sort out videos. One common thing that often needs to be fixed is the frame rate. Videos are often provided at, say, 50 fps, but they are simply 25 fps videos with each frame shown twice, so you can halve the file size with no loss of quality using ffmpeg's -r flag. This has the added benefit of cutting the processing power needed to display the video, often accompanied by a reduction in fan noise.
This was beautifully done. more information and explanation than i have seen about formats, containers etc in forever. Thank you so much!
Thanks for your kind feedback.
That was a LOT of information. Makes me appreiciate Video Conversion/Recording Software much more.
After 15mins it's already 1,191 views.
Interesting topic, I've always wanted to learn more about those things but I've never got to. This video is a great explanation, I finally understood what they're all about now. Thank you!
Excellent Video Chris, I've been messing about with video files for years and didn't know most of what your video has taught me today :)
The accessibility and simplicity of this presentation is a work of art. Beautiful!
Great Video and thanks, I have learnt something new this afternoon even if it did cause my container "brain" to heat up considerably.
Brilliant thanks Christopher.... the clearest explanation of this confusing subject matter I have seen.
This was great. So much to learn and understand here. Thank You For This.
Ahh yes the confusing world of video - nicely explained Chris 👍 Mr Scissors or Stanley sure would like to get into some old fashioned tape reel frame trimming jobs I bet!
Great info, now I know a lot more than a few minutes ago.
For me, so much new to learn in this presentation... Had to watch it several times... Time well spent (both for the presentation and viewing). Thank you!
Fab explanation Chris, wish you'd been training when I was in broadcast television!
Loved this! I (mostly) understand digital audio, but this was the BEST video I've seen describing digital video. 👍😊👍
Wow, thanks!
I really wonder who had the glorious idea to throw in "I-Frame" as an abbreviation when we're trying to distinguish between interframe and intraframe.
People who don't use the name "interframe"
I frames are ‘intra coded’ - they can stand alone...
P are predictive, only containing the detail needed to render between I-frames when running forward...
B are ‘backward’ details...
The complexity of the GOP (Group Of Pictures) determines the ‘temporal’ resolution of the stream...
The other compression element is ‘spatial’ compression, which condenses the image to be rendered within the desired XY image space.
in professional video broadcast, for MPEG2, h264 and HEVC you have I, B and P frames. An I frame is a fully encoded frame, think of it like a JPG image. P and B frames only contain the 'differences' between I frames. So if you had an I frame once per second, and you are doing 25 frames per second, you would get an I, then some Bs and Ps, then a second later an I.
In light compression, you generally get all I frames (no Bs or Ps) so you don't have to think about I frames. Even if you do have I, B and P, if you use something like Premiere as an editor, it will render all the frames fully for editing (so Premiere will take the I frame, and use that information to render the B and P frames as 'I' frames so you can d frame accurate edits).
Informative video, as always. I watched this to refresh my memory about these things. Got the apple side of the story as a bonus. Thanks for making these videos. Amazing voice and delivery as always. You are like the Geoff Boycott of TH-cam to me!
Great video, clear, concise, comprehensive and informative, as usual 👌
Much appreciated!
Fantastically clear explanation! I was afraid to approach this topic expecting it to be hard on my brain. But with your video it was a pleasant enlightenment! You just made my life easier! thank you !!!
Great to hear!
Nice stuff. I was fighting with this several years ago when I was in Nokia. The phone supported “MP4”, but as you said this is just a container.
An area I think you skiped is the Audio codec. The contain includes also Audio and this also comes in various formats (AAC, MP3, etc).
If you get this wrong, no sound...
Also the MKV container is imortant as it can contain several items. Like multiple audio or subtitle track.
By the way, in Denmark we broadcast in TS with H.264 video and AAC audio.
I believe MKV was also the only real container choice for multiple _video_ tracks back when I was comparing containers many years ago. (I don't know if more containers support that now, and I might be wrong about that anyway! :p)
I imagine that's a very rarely used feature, with multiple audio and subtitle tracks being more common, but weren't DVDs hyped, at launch, as supporting multiple camera angles that the viewer could switch between on demand? I don't recall that ever really being used, but the idea is there! 😹
I could imagine something like OBS having the option of saving all/several video inputs/scenes as separate tracks in the same container when recording, along with all/several audio tracks, so that everything was in the same place for any future editing, and all tracks should(?) be correctly synced up.
But I doubt video editors have much support for multiple video tracks in one container (though I hope I'm wrong!), so OBS recording like that wouldn't be too useful...
MKV also supports "attachments" - arbitrary embedded files - which can sometimes be useful!
It's also TS with H.264 and AAC in the UK. I think he quoted the preferred format for delivery of material to the broadcaster by a production house. lol
Very informative. Thanks to you & your entire Team sir.
Thanks for explaining this very confusing subject. I find it difficult to produce videos that all mutually compatible with computers, youtube and DVDs. What plays perfectly on Computers i.e MP4s does not play on all DVD players. Some of the older DVD players will not play MP4 videos so I have to make in video in more than one format to get it to play on multiple people's devices. This certainly helps to clean up some of the confusion.
This video gave us the in-depth knowledge of the video outputs we see all around. Awesome. Have an amazing week Chris.
Thank You for making this Video !!! Matroska (.mkv) is a media container that's kinda popular in the opensource community as well.
Not gonna lie, this information was very useful in understanding the various formats my video editor can spit out.
Now I know H.264 / MP4 format is the best combo for online uploads.
Thanks!
Who remembers Real player (rm) and Windows media (wmv)?
Or DivX and XviD!
What about the MOD format, back in 1987?
MPC-HC, anyone?
@@MJ-uk6lu mpc-hc no longer in development :(
love you from INDIA I've watched that I never thought I would ever see. Thankyou sir for the factful information a deep satisfying video I've seen .
You're here either you work in creative content or just a Pirate
And i can fall into both categories
This video feels like something I should have researched some time the last 20 years myself. Awesome work, thanks for making it!
Another informative video...
✅✅✅✅✅✅✅
You definitely have one of the most useful channels. Thank you sir, you are a real teacher.
It is worth to mention about mkv and old avi conteners. TH-cam is testing a new AV1 codec. AV2 and H266 codecs are in development. And lastly. I think a lot people probably remember illegal DivX 3 alfa codec stolen from Microsoft. I do remember this time a years ago. If you had dvd-rom drive or dvd-rw you could rip (still can) dvd video to avi with xvid or DivX 5 to single cd 700mb. 4,38gb or more with DVDDL to one single CD. Best regards!
Agreed. My focus here was on acquisition and production.
@@ExplainingComputers okay so maybe you will make part 2 in near future. I think this topic is interesting.
You missed mentioning the MKV container, but the video turned out excellent.
Usually I understand various data formats but I have to admit regarding video data I have been in the dark. I didnt realize how much i was confusing codecs versus containers until I heard your explanation. very useful to know in that more highly compressed video formats are stressing our computers more now when editing. Thanks for the enlightening explanation!
Thank you
Was looking for something precise like this.
Love and respect from India🇮🇳
You always put so much effort into your videos. Truly a rarity on TH-cam these days.
By far the best explanation of codecs I’ve seen. Thank you so much for this!
Very useful information presented clearly.
Thanks!
I love these videos. It has that no nonsense, let's get on with it approach so reminiscent of teaching computer tv programmes in the 80's
Thanks, that was very informative. Would you be able to follow up with something about how audio in included in the containers. There seems to be an equally bewildering situation there what with bit rates and multiple channels. And for icing on the cake how about demystifying how all videos are streamed?
Hi Graham. You are right, there were possibilities for other videos here. I will see how popular (or otherwise) this video is . . .
Would also appreciate a video on containers and audio.👍 Perhaps include subtitles?
@@ExplainingComputers for fun see '0612 TV w/ NERDfirst FFMPEG Advanced Techniques Pt1 - Advanced Filters' and his part two ^_-
This is such a great video thank you for making it.👍
Thanks. :)
Btw, what about mkv, webm, etc? Aren't they important?
MKV and WebM are both containers, the latter intended for online use, as the name implies. Important depends on what areas of application you are working in! :) This video is focused on video acquisition, production and distribution.
@@ExplainingComputers
Oh, I see.
I learned about them when I started using ytdl app. It lets you download videos in higher resolution ( 1080, etc. )
@@ExplainingComputers webM is a container for VP8 or VP9 codecs afaik, I don't know if it can be used for other codecs. I missed the video mentioning these open formats plus AV1.
@@ExplainingComputers Currently if one downloads a TH-cam video, it always arrives as an MP4, but very old vids can arrive a WebM, AVI, MKV, and one came down the wire in dozens of fragments with some other extension that YT-DL took all day to repack into MKV files. Standards, so many to choose from! Thanks for the info; I had no idea what was going on in there, and now have my very first clue. :D
@@Reziac Actually you can easily download WebM, AVI video streams from most (if not all) newer youtube videos with youtube-dl or other software such as Aria2c for example. Both video and audio streams are downloaded separately then merged using ffmpeg to a desired container ( i mostly use MKV or WebM) depending on what video (resolution)/audio (quality) needed.
Instant like before I've even watched the video 👍
Fantastic!
Watched it. Can I like again :)
Wow, that was a lot more informative than I was expecting! I have heard one other person mention that file containers and codecs are not the same thing, so it's great to see more information about that in-depth! I screen-record with MKV container these days because of recovery from corrupted video, but I always end up muxing to MP4 using Avidemux, OBS (both nearly instant probably because of same file container and copying frames), or Handbrake. I use MTS for camcorder, MP4 for Android Phone, and MOV with iPad. I generally export using AVI and compress it with CRF in Handbrake to generally get the best ratio between quality and size without risking losing more quality until the very last step. I feel old-fashioned doing that, but that's just how I do things. :)
And then there's the mkv container?
MKV god!
Yes I’m a MVK simp as well
Matroska all the way.
Could I ask why it's your go to container? Trying to get a grasp of what's best :)
@@Nivislmon
hey there, ive been doing some research on this topic so i feel im poised to answer this for you.
.mkv containers, specifically in regards to on screen recording on computers, are a type of container that can be remuxxed into alternate file types, making it extremely versatile for any recording and editing purposes you may have to fulfill for projects
secondly, when using a program like OBS for screen recording, the .mkv format is perfect because it can retain data without corruption or data loss, in the instance where, perhaps, your computer crashes. instead of having a corrupted file, the recording will be saved in its entirety
now, surely ive oversimplified some things here so i encourage you to look into it yourself but yeah thats basically why .mkv is so popular, and for good reason
Thanks! More of this, please!
Before this video I was ignorant. But the good thing was that my ignorance didn’t leave much room for confusion. Now I feel that I know a little, but I’m also a lot more confused. I feel that I need to know more.
Welcome to the nightmare of digital video! :) I may do more content in this area.
Why no .MKV (matroska) among popular containers?! New Samsung tvs come without .AVI support but with .MKV support. In fact, MKV is the most usable and convenient container when you want separate audio tracks, nested tracks like subtitles in various languages and so on...
My focus here was on acquisition and production. I did note early on that lots of other codecs and containers were in use! :)
@@ExplainingComputers It might be useful to explain and contrast that with what we see in userland, once all that acquisition and production are done and sent to our screens.
This is the new standard for explain video formats. Thank you.
The free MKV container and its WEBM derivative are so widespread that they deserved at least a mention.
Great video Chris. I have no real reason to know this but, as an engineer, I know that I will watch it several times to absorb some ‘ nice to know’ knowledge.
Part two is due! Complementing on VP9 and licensing.
Oh, and MKV ;)
Started to really click with the cassette analogue. Really nice introductory video!
Now I know I'm uploading to TH-cam in an appropriate format.
Wow! A video about something I really like! Nice!
I use Handbrake and MakeMKV a ton to back up my DVDs/BDs and after years using AVC MP4s, I switched to MKVs because of MKVToolNix and editing subtitles. Also found out just how much better the picture quality (average bitrate encodes) was with HEVC, so I re-encoded lots of them.
2:08 Still never heard of the last 2 on the left.
I mainly remember DivX and XviD in the mid-00s being super popular for a hot minute.
Where is the mention of the world's most widespread "open format" MKV container?
I do state that other containers exist, but that I am only going to cover those on the initial table. My focus here is on digital video aquistion and production, and MKV is not an acquisition or production container.
@@ExplainingComputers but it is open.... :-)
I remember when I was starting to deal with digital video using a program, as I wanted to save the video to a certain format I was like “oh my god look at all these formats and variations!” I did not even know what to pick and why. It took me a long time to figure out which format to use that provided me the highest resolution with the lowest file size. But as of lately, I’m always using the M2t format to upload my videos to TH-cam because if I try other formats, they actually degrade the sound for whatever reason on TH-cam’s part.
Because even though the quality of the audio sounded great on my end on other formats, for whatever reason TH-cam itself degrades it. And I’ve noticed that by using the M2t format the quality stays pretty much the same.
Then we have all these other options within the issue for example, anti-aliasing options, dithering options, bit depth options so many other options when rendering a video.
--
With so many different formats and variations, it’s like going to a store and seeing a whole bunch of different types of bread. You have no idea which bread is the richest tasting so you have to go through each and every one of them to find out and it can be quite a task.
-
Television before the digital era was actually crisp and clear and all channels looked great. Ever since the digital era arrived there is a complete mess of resolutions on the TV broadcast. I can see a commercial that looks very good but then the next commercial looks grainy and low quality. The same goes with news broadcasts sometimes they’re showing an interview of a person that looks great and then when they go to show a video of some sorts related to the news that they’re talking about it looks horrible. We never had this issue back in the day.
The only way to combat this is if all Television stations choose one high-quality format for everything. But I don’t see this happening anytime soon.
-
Everybody uses whichever format they choose and the digital video world becomes a huge clusterfruck of videos with all sorts of resolutions and quality. I wish there was only ONE format and container for all provided it’s the highest quality available for the sake of the beautiful crisp and no nonsense video.
I’m dreaming of the MPNG format to appear.
Looking forward to h.266
It's so strange not to see mkv container
Another great video on basic computing that no one explains as well. Love the DV tape analogy to explain containers.
Here I am, back again! First.
I'm sorry professor... not first today, my cat was chasing the mouse across the talble...
Greetings, another gold metal to you!
@Anand Raj Well, of course. What else would you put on your high-quality connectors??
My bad. :(
A ton of information packed into one simple video (on a complex topic). Thanks for the explanation and the time spent on it.
I never even knew there was a format that supported transparency(Alpha channel) till recent.
Another winner Chris. I always thought Codec meant Compression/Decompression so I have now been properly schooled.
Codec is indeed sometimes expanded as compression/decompression -- or compressor/decompressor. But calling it coder/decoded is more common, and also more accurate -- as not all codecs compress things. :)
Thank you, very informative. But how about the other formats/codecs? I mean divx, mkv, Xvid, indeo, etc? A history of digital video would be interesting indeed.
I remember a small utility Gspot that allowed to tune the combination of codecs used to view a video. with most players the video was green,flipped, black or interleaved but with that GSpot I managed to see it
I believe divx and Xvid are quite similar to MPEG line of codecs.
I think mkv is used more in consumer side of things as well; the video seems to focus more on capturing and editing side.
@@muche6321 I remember seeing a camcorder that had Divx logo and Pinnacle Studio (8 or 9) used to import and edit Divx encoded videos. Of course those were more home/consumer oriented but however they existed as option to mpg/mpeg at the time, before AVC.
Thanks for this...
I spent ten years through the 2000s trying to explain this to people who should’ve known.
Just to add, one of those projects was trying to complete a $$$ government tender for ‘Parliament House’ broadcast capture, compression, reticulation and storage systems.
The tender was so badly written, I had to call them out, and about a week later the tender was withdrawn, and rewritten some months later !
A lot of pissed-off vendors that would have tried to sell them ‘whatever’ they had!
May I know why you didn't even mention the MKV container format?
It is not used for shooting or editing; this video has an acquisition and production focus.
@@rleim MKV is an open source container for consumer video, so generally used with interframe video, so not idea for editing. And something Sony, Canon and others have decided to use in their cameras.
The first video I have given a like to this year. Well done!
Wow, thanks!
Chris aka video wikipedia. Thank you for that.