This FAQ is pretty outdated now, H.264 is supported by most of the programs and devices out there. However the conversion guide at the end of the page is still pretty useful. If you need to rip a DVD to H.264 you can find many more guides here.
The purpose of this article is to explain with simple words what H.264 is, its advantages (and disadvantages) comparing to well known codecs like DivX and XviD as well as simple instructions to create and playback H.264 video files. I decided to write this guide as a FAQ, so that its easier to understand and read, attaching a small guide about converting any video file to H.264 at the end. I have tried to stay clear from technical stuff, as I understand that they do not interest most people. However if you fell that there should be some addition or correction in this FAQ, use the contact form to let me know.
So, what is H.264?
H.264 is a new video codec standard which can achieve high quality video in relatively low bitrates. You can think it as the “successor” of the existing formats (MPEG-2, DivX, XviD etc) as it aims in offering similar video quality in half the size of the formats mentioned before.
OK. What is H.264/AVC then?
AVC stands for Advanced Video Coding. Actually its identical to H.264 so you can find it as H.264, H.264/AVC, H.264/MPEG-4 AVC or MPEG-4 Part 10.
I want to use it! Where can I download this H.264 codec from?
As we said, H.264 is a codec standard, so there are various implementations around. Lets name the most important (and easy to use) tools you can use to create a H.264 video:
-Nero Recode 2. Their latest version (comes with Nero 7) includes an H.264 encoder called NeroDigital AVC. It can be used in the other video-related program in Nero suite, Nero Vision.
-Apple Quicktime. Using Quicktime 7 Pro you can encode videos using H.264 in both Windows and Mac OS X platforms.
-x264. An open source solution. It is command-line only, but its being used in various free programs like SUPER (simple video conversion program, guide below), Fairuse Wizard (DVD to AVI program, guides coming soon) and various other projects.
There are various other solutions like the MainConcept H.264 encoder, Sorenson and VSS to name a few, but they are either too expensive for the average user or hard to find. Some of them are pretty unstable as well.
Which one do you suggest I use to encode an H.264 video?
Depends on your needs actually. However, one can say that right now x264 is the right choice. Compared to the commercial solutions, not only it doesn't lack features, speed or quality, but in most areas it even surpasses encoders that cost hundreds of dollars. It's a perfect example of open source software's power! If you just need to do a simple conversion, I suggest SUPER, a GUI for ffmpeg and mencoder that can use x264 to create an H.264 encoded file. We show how you can do that in the guide below this FAQ. If you want to convert DVD to H.264 the best choice would be Fairuse Wizard. Other free solutions to convert DVD to H.264 are MeGUI and Gordian Knot.
From the commercial solutions, Nero Recode is a very good choice. However it is not worth it to buy Nero just to get the H.264 encoder. If you already have Nero 7, give it a try and compare it against x264 yourself. Quicktime Pro is very, very slow at the moment, therefore we don't suggest using it.
How can I playback H264 videos?
The latest version of ffdshow supports H264 playback. You can get it from here. Remember, ffdshow is a DirectShow filter so after you install it you'll be able to play H264 in most video players you already have installed, including Windows Media Player. Alternatively you can download VideoLAN player from here. It can play H264 without need of any codec or DirectShow filter. Nero Showtime and Apple Quicktime players support H264 too, but their support is not so great for all formats (they play better H264 content that was created using Nero Recode or Quicktime Pro) so I don't suggest using them for general H264 playback. Generally most players or codec packs nowadays include H264 support so you shouldn't have any problems. For Linux Mplayer offers excellent playback as well as Xine and VLC. Totem (using Gstreamer as a backend) seems to have many troubles however, especially low speeds.
The playback is slow / with pauses. Why does this happen?
H264 requires a fast CPU and lots of RAM to playback fine. If you have one of those old PIIIs or any CPU less than 1GHz plus less than 256RAM you may have trouble decoding H264 content fast.
My standalone player plays DivX/XviD. Can it play H264 too?
No, the standalone MPEG4 players that are supporting DivX/XviD do not support H264 videos. You would have to buy one that plays AVC/H264, you can find some in this list .
What about support of H264 in mobile devices?
The new iPod can playback H264, Sony PSP is able to do so too. PocketPCs can play H264 too, using the CorePlayer however you are advised to use small resolutions or the processor won't be fast enough.
What extension does H264 use? Is it an .avi file or does it have its own extension like .divx?
You may come across all kind of file extensions and still the codec can be H264:
- .avi - Yes, people use .avi for H264 videos too!
- .mp4 - Nero Recode and Quicktime use this format. Better than AVI as you can store AAC audio as well.
- .mkv - Matroska container - can support many video and audio formats. Have a look here for more info.
- .h264 - This extension is not commonly used. Maybe in the future.
Do you have any video I can see for myself the quality of H264?
I always say that before selecting what codec to use it is better to do some testing and decide for yourself. But we do have some small video you can download and see for yourself. You can get it from our downloads database here. There are also versions of exactly the same video in DivX and XviD to do a comparison. All videos where encoded from a DVD using Fairuse Wizard and all codec quality settings are set to maximum. The bitrate used was approximately 860kbps, an average bitrate someone uses to store a movie in one CD.
Can Xbox play H264 using XBMC (Xbox Media Center)? What about Xbox 360?
Yes it can. However some files play pretty slow, not sure why it happens (my H264 encodes work fine, 2-3 other files I tried play very slow). I'll have to do some tests to confirm what caused that. Remember that Xbox doesn't have the fastest CPU out there (Pentium 3 733MHz) so to be honest the nice playback of most H264 files impressed me. About the new Xbox 360, the media player it contains plays pretty much nothing besides WMV files, so until something like XBMC comes out for 360 you can only display H264 by a streaming solution using a PC.
Nice FAQ, but I still have more questions!
Come to our forums and ask! There is always a kind person there to help you out.
I think you have a mistake here and there, you could also add that there and explain this better.
Use the Contact Us button at the menu on the top of the site and let me know of your thoughts and suggestions about this FAQ. Let me know of other programs, newer developments etc. Thanks!
There is certainly no quality improvement when you are converting a video from XviD for example to H264. The big quality boost happens when you convert to H264 from the DVD source, which will be the subject of the Fairuse guide that this about to come. However the way shown here is easy, uses a nice freeware tool and is useful if for some reason you want to compress your AVI files a bit more (to distribute in the internet for example) and not lose much audio quality. Also using that program you can create H264 content for video iPods and Sony PSP.
The program itself is very simple so we just need to explain you the options and the features. You can download it for free from our software downloads database here.
Now lets move on to the Video settings. (5) It's a good idea not to alter the video resolution and the aspect ratio. If you know the frame / sec set it know, if not I'll show you how to find out later. For the bitrate, use a little lower than your original file (I'll show you how to find the bitrate as well in the next step). For mobile devices a value about 500 should be OK, for a computer everythingover 700 should look OK too. If you source is high quality you might want to use even higher bitrates. From the options select High quality. In the audio settings (6) select 96 or 128 in the audio bitrate. The rest settings should be left the same as your source file.
So it's about time to load the source file and show you how to find all these info about it, right? Right-click anywhere in the program and select Add Multimedia Files (7). When you do so, make sure "Enable File Analyzing Engine" is selected as well. Time to move to the next step!
When you click on "Add Multimedia Files" the well-known Windows dialog will appear. You can select all the files you want to convert and click Open.
There you can see all the important info about the source file. In our example we can see that he video is DivX, a bitrate of 1086 KBps and a frame rate of 29.97. So in the video settings in Step 1 you should select a bitrate of about 900 or 1000 and the same frame rate.
When you are done, have a last look to the settings to make sure everything is OK and click Encode now! In a while you'll have a H264 file waiting for you in your hard disk!