I've recently begun recording or "capturing" live football (soccer) matches in HD, on my computer, with a DVB-T Tuner that I bought from eBay. It works well and does everything I want it to do, but my issue is compressing/encoding the recorded files which are of course very large. I have a good program which easily cuts out advertisements, and a couple of decent programs which I use for encoding.
Up until now, I have just been cutting out the ads with one program, and then encoding the files with a simple and easy-to-use program which is probably best suited for beginners and/or people who don't want to get into all the specifics. The option which I have been going for up until now is one that the program just refers to as an "HD AVI Video". I then set the Video Quality to "High" and the same with the Audio Quality.
Once the file is finished, the picture quality still looks quite good, but whilst the file size is smaller than the original, it's still a little bit too large for my liking. I know there are many other people who capture live sport in HD as well, but most of them seem to be able to make their file sizes much smaller than mine, and also have better quality too. It looks like quite a lot of people use h264 or x264 (I don't know the difference) with the MKV container.
I'm thinking of trying this for the next game that I record, so I have downloaded a program that gives me much more options, and is a lot more advanced than the one I have been using.
I know I have written a lot here (sorry) but my main question is, what is the difference between x264 and h264, and why are they so popular? Is it because they can compress files too a smaller size and at the same time, retain a high picture quality? Or is there much more to it than that? And would you say that AVI is not a very good container for HD videos?
Once again, sorry for the long post, but I am only a beginner with all this sort of stuff, and I just wanted to give as much information as possible.
Thanks in advance to anyone willing to help. All help will be much appreciated
+ Reply to Thread
Results 1 to 23 of 23
h.264 is a specification for compressing video, aka Mpeg 4 part 10 or AVC.
The benefit of h.264 is better compression than, say, Mpeg 2, or Mpeg 4 part 2 (Xvid, Divx). "Better compression" means better quality at the same size as those other codecs, smaller size with the same quality, or something in between.
x264 is an open source h.264 encoder.
So x264 is what encodes a video into h.264, correct? If this is the case, why do I see people stating that a file has been encoded with x264, rather than just saying that the video is h.264? And if x264 is the encoder for h.264, then what is the encoder for a codec such as Xvid?
Also, I've read that h.264 can be used in multiple containers, not just MKV. For example, MP4. If so, does it really matter which container I use? Does the container effect the quality?
Sorry for asking so many questions, I'm just a bit confused.
Last edited by KyleMadrid; 4th Feb 2013 at 04:21.
And if x264 is the encoder for h.264, then what is the encoder for a codec such as Xvid?
Also, I've read that h.264 can be used in multiple containers, not just MKV, for example, MP4. If so, does it really matter which container I use? Does the container effect the quality?
ok, thanks, poisondeathray. I think I understand it a bit better now. Also, just to clarify... is AVC the same as h.264?
yes, AVC = h.264 = mpeg4 part 10
Not all AVC encoders are equal. The worst AVC encoders can produce very poor results, maybe worse than xvid. Arguably, x264 the best overall AVC encoder in most situations
The standards (which can be argued ad infinitum) for MKV sometimes cause issues for certain computers and media extenders. This is usually due to excessive compression and/or certain settings like CABAC. If your intent is to make your videos as compatible as possible for as many devices as possible, use H264/AAC (that's video/audio) in an MP4 container. Turn off CABAC. Basically, if you encode as if you're going to play it on a Color Nook, it will play on almost any device. See the settings for the iPhone4 or iPad in the Handbrake app and use that as your starting point. (Your encoded videos should end up almost the same size as the MKVs).
wow, so AVC = h.264 and h.264 = mpeg4 part 10. Hmm... Now I'm confused again.
I just googled "What does MPEG stand for" and I got "Moving Pictures Expert Group". So does this mean that AVC/h.264 was created by this group, and is just one of many codecs that they have created? hence the 'part 10'? Am I even close to being on the right track?
I'm not too worried about the files being compatible with multiple players, and I am aware that MKV isn't supported as much as containers like MP4. I usually play all my video files on my computer, and I have 2 Media Players installed which can play MKV files. My favourite being VLC. So that's not a problem for me.
However, what is 'CABAC'? I'm assuming it's an acronym for something, and is it bad/good/useful? I do remember seeing something like that as an option in MediaCoder (the program that I plan on using to encode my files from now on) but I've just had a quick look through it again and can't seem to find it.
Thanks again for all the help guys.
CABAC = Context Adaptive Binary Arithmetic Coder.
The x264 encoder has an option to disable it, which you normally wouldn't do. http://mewiki.project357.com/wiki/X264_Settings#no-cabac
Which program did you download to try? There's a whole bunch of different programs which can encode using x264. I generally use MeGUI but it's got a bit more of a learning curve than most programs.
I don't watch much TV at all, mainly because the quality of the free to air broadcasts in Australia are generally pretty shite, and often in standard definition, and I know nothing about the way sport is broadcast, but if you're comparing encodes of sporting events at least make sure you're comparing encodes taken from a similar/same quality source.
Is the sport stuff you re-encode broadcast as progressive or interlaced? If it's interlaced, one way to improved the perceived quality may be to choose a different de-interlacing method, assuming you're de-interlacing when encoding. Most people do, and the most common method for doing so is to take the interlaced 25fps video (which uses two fields to make up each frame) and convert it to 25fps progressive. Doing so can lose you some smoothness in the motion which mightn't be ideal for encodes of sporting events. An alternative is to de-interlace it while converting it to 50fps progressive, which retains more of the motion but will probably increase the file size a little.
Depending on the conversion program you might be able to choose the method for de-interlacing when encoding.
I presume you're capturing TV as mpeg or TS files? Whatever the format, MediaInfo should be able to tell you what's inside?
I will be using MediaCoder from now on, but I haven't had a chance to actually put it to the test yet, because I'm waiting for the next match to be broadcast on free-to-air TV in Australia, which will be next week. The files that I get when recording/capturing are mpeg files. I will check with MediaInfo next time I record a match to see if it is interlaced or progressive. I've never thought about de-interlacing because to be honest I don't really know what it is. But, I have opened up MediaCoder, and clicked on the "picture" tab and it gives me all sorts of options, some I know what to do with, some I do not. It also then gives me all the options to do with de-interlacing. There are three main options... I can either select de-interlacing to be "Auto", "Enabled" or "Disabled". It is on Auto by default, but which would you suggest for videos of sporting events?
There is also an option to select "Motion Compensation" and then I can set it as fast, medium, slow, or extra slow. Would it be a good idea to select this option and set it as "fast"?
Sorry if I have asked any questions that don't make sense or seem like the answer is very obvious, I'm basically starting from 'zero' and just trying to improve on the knowledge that I have accumulated from downloading a whole lot of stuff over the years.
Thanks to everyone who has taken the time to try and help me so far, it's very much appreciated.
ISO/IEC 14496-10 to conclude long list names for H.264
And don't be confused with Xvid which is ISO/IEC 14496-2.
AVC is a marketing/consumer name, H.264 or ISO/IEC 14496-10 are names for particular standard (professional name).
These are complex standards, especially the later ones. Not all encoders, decoders, or devices support all of the features the standards encompass.
A very brief history of the MPEG codecs:
MPEG-1 came first. It was used with VCD (Video CD). It can only do progressive frames.
MPEG-2 came next. It is used on DVDs and can be used on BluRays. It supported progressive and interlaced frames. The support for interlaced frames was a really big deal at the time as TVs then only supported interlaced video unless they were really expensive.
H.263 (Divx/Xvid) came next. It was never intended for consumer discs like DVD. It took off years ago because it was something like MP3 but for videos. This is not known by any MPEG name.
H.264 was designed for the successor formats to DVDS (HD DVD and BluRay). It's also known as MPEG-4.
There's talk that MPEG-5 is being worked on right now.
There's a common misconception, even among some of our members, that you cannot get good quality out of some of these codecs and that is not true. At sufficiently high bit rates all of them are capable of producing high quality output, including MPEG-1.
and as a brief of history it is worth to mention that:
MPEG-1 was standarized as ISO/IEC-11172-2 (and based on H.261),
MPEG-2 standardized as H.262 or ISO/IEC 13818-2 (and generally compatible with MPEG-1 i.e. MPEG-2 decoder should be capable to decode MPEG-1 under some constraints),
H.263 is not MPEG-4 part 2 (but MPEG-4 part 2 is compatible with H.263 under some constraints),
There is big mess thank to marketing people that very frequently use poshy words to catch customers attention then you end with plenty strange names that looks very professional and only confuses people.
Wow, first of all, thanks to everyone here who have tried to help me out so far. You've all tried to answer my questions with great detail, and it's very much appreciated.
I'm not going to lie, I am still quite confused by a lot of stuff, but I do understand some things much better now.
Originally Posted by jman98
Originally Posted by pandy
I wish it were much more simple...
h.261 was pioneered by ITU. MPEG1 was pioneered by MPEG.
h.262 was worked on by BOTH the ITU and MPEG (so aka MPEG2) - mpeg3 is mpeg2 w/HD folded in.
h.263 was worked on by ITU, while MPEG made MPEG4-SP. Then both enhanced theirs and made them compatible, so h.263+ is ~= MPEG4-ASP (aka Divx/Xvid). h.263 also had a variation in Sorenson Spark (used in FLV)
Meanwhile Microsoft & Real both split off from the original MPEG4 spec and created their own forks ("MP42" which then mutated into WMV9 and later VC-1; and RealVideo8 and onward, respectively)
h.264 was worked on jointly by ITU & MPEG (so aka MPEG 4-part10 as well as AVC and also JVT "joint video team").
h.265 is having a similar joint gestation. It would probably be known both as h.265 and HEVC and MPEG4-part?. It is NOT going to be called MPEG5, as it is only a change in the video coding side, not an overall change in container or strategy (like the others were).
MPEG7 has already been around for a while, but is not really being picked up into general use yet. As was said, it has to do with metadata (or "tags" as most consumers refer to this kind of data).
There is also an MPEG21 (go ask them why they skip #s...) that deals with Integrated Transactions & Rights Management. Don't know how far along with this one they are (don't care too much, but if it pleases Hollywood, it'll be shoved down our throats I'm sure).
To make things more complicated are all the Layers, Levels & Profiles!...
Last edited by Cornucopia; 4th Feb 2013 at 21:42.
I don't know what the "Motion Compensation" setting does, but at a guess, assuming it relates to the way the video is de-interlaced, the slower the setting used, the better a job it'll do.
Interlaced PAL video is shot at 50 fields per second rather than 25 frames per second (progressive) and two fields make up a frame. Each field consists of every second line of video in a frame. When the two fields are combined to make up a frame the process is called deinterlacing. You can read about the whole process here: http://en.wikipedia.org/wiki/Interlaced_video
Anyway.... assuming the original video is interlaced you can encode it without de-interlacing it, or you can de-interlace it to either 25 frames per second or to 50 frames per second when encoding. Whether MediaCoder can do the latter I'm not sure, but for sporting events where there's lots of motion it'd probably make a big difference to how smooth it looks. MediaCoder might have a setting in it's options for how it de-interlaces. Something like "original frame rate" or "double frame rate". If it does, try encoding using both to see what the difference is.
To be honest I've only just experimented with de-interlacing using the "double frame rate" method, but while I don't encode interlaced video much these days I seriously wish I'd always used it. Even for standard video (non-sports) the difference in smoothness of motion is quite obvious when you compare video de-interlaced at 50fps to video de-interlaced at 25fps.
It requires AVISynth, or an encoder GUI which uses AVISynth, but the best de-interlacer I've used is QTGMC. It's slow (although as I don't use the multithreaded version of AVISynth I just run two encodes at a time to keep the CPU busy) and I've not used it for de-interlacing sports video, but as it also de-noises etc while de-interlacing, so far every video I've encoded with it has looked as good or better than the source video when it's done. It doubles the frame rate when de-interlacing.