Episode: 41 Title: HPR0041: Codecs Part 3 Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr0041/hpr0041.mp3 Transcribed: 2025-10-07 10:39:59 --- Music This is Hacker Public Radio. My name is Klaatu. I'm the host for today. This is episode three of an in-depth series on Codex. In the previous episode we spoke about compression which is as we found out in the first episode different from Codex but very very closely related. The different variables in compression as we learned in last episode are keyframes which is the number of eye frames or intra frames per second. We learned about frame rates which we discovered are perceptual not actual and they have everything to do with the perceived smoothness of the motion on the screen and there is of course a bitrate. That's important. Bitrate is the amount of information being sent from the source of the video out to whatever it is being shown on whether it's a media player on your computer or a TV via your DVD player or whatever. In this episode I want to talk about Codex versus transport formats or container formats and how to distinguish one from the other and then I want to get into a couple of the different Codex that are out there that you and I get to deal with. Codex are delivered to us or rather video that has been encoded. It is delivered to us in some kind of a file format of one sort or another. The most common one I guess is probably either .avi or .mp4. Sometimes you'll see .mpg. Of course you've got .mov.wmv. All these kinds of file formats that seem like that would be the Codex right. A lot of people will ask what kind of video is it and someone will say oh it's .avi which is basically like saying oh what kind of car is it. Oh it's an automobile. It's the kind of video file but it has nothing to do with the Codex that is contained inside of that video file. So how do we find out what Codex a file has actually been encoded in or with and what Codex conversely it needs to be decoded by. The easiest way I guess is just to crack open either VLC player or totem. Those are the two that I use most frequently VLC players really what I use typically. You open the video up in that and you look at the information tab and it will tell you what kind of stream the video it has been encoded in and it gives you a stream zero for the typically as the video feed or the video stream and then there's if there's sound there'll be another stream stream one that'll have the audio Codex as well and even a VLC can't play it for some reason if it's just some obscure video then VLC in my experience still is able to see what kind of Codex that video was encoded with you know it's just it's basically reading metadata from that file even if it can't play it. Don't confuse the container with the Codex so now you know there's no such thing as a .avi file there's also no such thing or there there is such a thing as a .mp4 that is not that that is a .mp4 so mp4 sounds like mpeg4 right well that's what it is but mpeg4 is peculiar because it's also a standard so you can actually have a .mp4 file that uses the mpeg4 Codex and yet at the same time you could have another .mp4 file that was encoded with say xvid or h.264 or something like that so you have to be kind of careful with with certain container formats bottom line I guess is to open it up in VLC or totem or something like that and just take a look in the in VLC it's in the information section and it just tells you the different streams contained within that file which is very helpful so more more than trying to decide like what Codex to use because one does one one thing better than another it's more about which Codex you want to use legally and which and what settings you have set for your compression so a lot of the burden is still on you as the compress or rather than the Codex which is simply the method of compressing it that's a general statement but it's really is it holds to be true a lot of times so there's there's two different things that we that we consider when we're thinking about compressing video there's the video downloads or the DVDs or whatever those are typically kind of nice because it's really kind of it's there's a limit just on the hardware in the software for bitrate so you can kind of predict what you want to do for that streaming video that's hard because there you don't know who is streaming who is receiving that data over what kind of connection they're they're getting it the data needs to be compressed it needs to be sent needs to be received and then reassembled and played live streaming is really hard because you've got video that's being compressed on the fly and being sent somewhere and received and reassembled and think about streaming for instance if I'm streaming video to someone and if if I have an iFrame or essentially what would be an iFrame and I send that well what if that iFrame doesn't arrive for a second but all the p in the bFrames do arrive well they're no good until that iFrame gets there and that's what causes like those that weird kind of digital distortion or or or even the the digital skipping of of the image when you're streaming video conferencing and things like that different codex we'll talk about a couple of different ones there is a standard of codex for for video there are a couple of standards I should say one of the most well-known is the standard that has put forth by the motion picture experts group they gave themselves that name they're not necessarily experts that's just what they call themselves motion picture experts group it's just a group like any other group that defines a standard you know they don't have any authority innately they're just making a lot of sales and they're making their products into standards so they came up with the impact for to kind of as I understand it to unify all web video and stuff like that it didn't work of course but it did it was accepted as a standard and so a lot of the come a lot of the codex that have come since then try to adhere to the impact for a standard now the impact itself the motion picture experts group itself also has I mean they're hardly an unbiased a society they have they have a number of impact codex that they license out which is of course why none of us Linux users can watch DVDs legally in most countries or maybe just the US I don't know you know it's all because of that whole thing they they own the impact technology they license it out to certain people and if you're buying your OS you are buying the license for the impact to format and if you're not buying your OS then you're not paying for that impact license and so you don't get to watch that stuff so luckily the the good the good kind of impact is impact for because at least it is a standard and it is kind of nice for that the evil stuff impact one impact two those things MP3 how could I forget that one impact three of course is an impact format so all that stuff is owned and licensed out by the impact uh society itself okay so let's talk about a nice free codec just get things started because that's always cheerful x-vid is an impact for compliant codec so it does it adheres to the standard quite quite well and it's a good thing that it does because it's actually it's really being adopted pretty well from what I can tell so it can be inside again like a dot avi or a dot mp4 container um x-vid is free as in free and free it is basically just it's a really good codec that aims toward compatibility it also has b-frame support so if you're doing the whole i b p b p p p i thing you can do that with x-vid not all codecs are going to support the b frames it also has a whole host of different pixel aspect ratio options so they can do hd so this is a very very broad codec that can do a lot of stuff it's a really nice one what does it lack not a whole lot not not a whole lot actually um it does not have interactivity built into its into its specifications so if you were going to do a menu where you wouldn't wouldn't want people to you know click on the screen to to choose i don't know the the next chapter or whatever x-vid alone wouldn't be able to do that but there are plugins that adds these kinds of features so there's really not not a whole lot that um that x-vid doesn't do really now the the hot new codec on the block that is not free um is h.264 this did not come from the in-peg society but it came from another society i don't remember it starts with a v i don't remember the name of it but it's it's everyone's really excited about it right now it was adopted by hd dvd and blu-ray as their format so instead of going with impact to uh it's actually going more with h.264 the good news about that is that h.264 is in-peg for compliant so it would be a lot easier for Linux people to be able to watch that because it's it's it's it's an open standard or it's a it's a standard um that does not require licensing um so there's all there's a codec out there right now called x.264 which is very similar in terms of trying to get around any kind of licensing issues and legalities h.264 is kind of a good thing for for Linux users although it's not a free or an open of codec by any means it is a pretty robust codec though uh very similar to x.264 in the sense that it can do a very wide color space it can uh extend itself according to what what it's going out to so if if you need there to be you know a very high bitrate version for for for a big screen tv but then a lesser bitrate for standard definition or something like that you can you can you have that kind of flexibility with h.264. Divix a lot of people have heard of divix that is basically it's it's a it's another dvd spec actually it's kind of a competitor in in a way to impact to although it's kind of a competitor at the same time to impact for it it is impact for compliant as far as i know um it it does have support for interactive menus and chapter points so it's a lot like the dvd spec in that sense it's got x sub for sub titles has the ability to do multi audio multiple audio tracks so you can switch between soundtracks uh and it has x tag for tags that are basically like id3 id3 tags for np3 so it's it's kind of a it's a consumer video oriented codec that gives you you know if you were a business and you wanted to license that you could do that and you would have those features if you didn't want to license it from impact for like the impact to standard those are kind of the big i guess consumer oriented codecs i mean obviously there are so many more windows media windows media audio uh real real audio there's just so many there's there's three three ivx which actually interestingly has codex for linux bos and amiga believe it or not uh there's huffy uv um there are codex that avid has released there are codex that apple has released codex um well even dv like i was saying in a previous episode dv is in addition to being a tape format that we tape video onto it's also a form of compression because the video wouldn't fit on that tape if it weren't at initially compressed so they would fit on the tape the business model of all of this is quite clever i guess the typical way that these companies that just invent arbitrarily invent these codex is that they they provide the consumer a free download so the consumer gets to download for free the decoder the thing that will enable the consumer to consume the content and so it seems like it's free it's it's very nice and friendly they're going to the big companies and selling the companies this codex solution so that the company can use for instance real to encode video in such a way that no one else can get to it you know so that's protecting their content and the only way for someone to get to it is to get this free decoder and the decoder will have whatever it needs to have whether it's advertisements that you have to sit through before you can watch the content or whether it just simply cost the company that's encoding the content more money to license that technology one of the big keys usually is trying to lock that content in which is why impag 2 is completely unfriendly format you know it you can only you can see it but you can't touch it you can never you can't really pull an impag 2 very easily and edit it you usually have to transcode it first or if you can then some company somewhere has paid a lot of money to license the ability to to edit that content so it's it's all based on who's paying what amount of money for what ability you know to do what process to the video it's it's a huge business we're going to get into even more codec dealers in the next episode and I'm saving it I thought this might be the last one but I think I've run out of time so I will I will do one more episode in which case we'll finish up some of the codex some of the more specialized codex and then of course the great aug collection of codex and maybe I'll go into a little bit of a line command on how to get something into aug thanks for listening this has been the hacker public radio thank you for listening to hacker public radio hpr is sponsored by caro.net so head on over to caro.nc for all of the