Difference between revisions of "H.264"

From Free Knowledge Base- The DUCK Project: information for everyone
Jump to: navigation, search
m (The Best Codec of 2005)
(Decoders (comparison))
Line 47: Line 47:
 
=== Decoders (comparison) ===
 
=== Decoders (comparison) ===
  
* ffmpeg: opensource (LGPL), used e.g. in ffdshow (VFW and DShow decoder), mplayer and VideoLAN
+
* ffmpeg: opensource (LGPL), used e.g. in ffdshow (VFW and DShow decoder), [[MPlayer]] and VideoLAN
 
supports B-Frames, B-References, CABAC, Loop, Weighted Prediction and High Profile (8x8 dct and intra prediction, lossless)
 
supports B-Frames, B-References, CABAC, Loop, Weighted Prediction and High Profile (8x8 dct and intra prediction, lossless)
 
* CoreAVC
 
* CoreAVC
Line 66: Line 66:
 
* mpegable: offered for some time a free VFW decoder (usable also in DShow), supports .avi (with DAVC fourcc)
 
* mpegable: offered for some time a free VFW decoder (usable also in DShow), supports .avi (with DAVC fourcc)
 
* Basic AVC Decoder in C, for an university project  
 
* Basic AVC Decoder in C, for an university project  
* Pegasus: not really compliant DShow AVC decoder  
+
* Pegasus: not really compliant DShow AVC decoder
  
 
== Software to Encode to H.264 Video ==
 
== Software to Encode to H.264 Video ==

Revision as of 16:11, 2 July 2010

H.264/MPEG-4 AVC is a standard for video compression. DivX® 7 is based on the H.264 standard, as well as Apple QuickTime 7. H.264 delivers the same quality as MPEG-2 at a third to half the data rate and up to four times the frame size of MPEG-4 Part 2 at the same data rate.

H.264 is most popular for its use on Blu-ray Disc, HD DVD and videos from the iTunes Store.

AVC and H.264 are synonymous. The standard is known by the full names "ISO/IEC 14496-10" and "ITU-T Recommendation H.264". In addition, a number of alternate names are used (or have been) in reference to this standard. These include:

  • MPEG-4 part 10
  • MPEG-4 AVC
  • AVC
  • MPEG-4 (in the broadcasting world MPEG4 part 2 is ignored)
  • H.264
  • JVT (Joint Video Team, nowadays rarely used referring to actual spec)
  • H.26L (early drafts went by this name)

A competing and alternative to AVC/H.264 is Microsoft's VC-1.

  • VC-1 is supposed to be used for HD-DVD
  • HD-DVD is a competitor with BlueRay
  • BlueRay already uses AVC/H.264

Available AVC/H.264 Codecs

AVC/H.264 implementations are available atm already from x264, Nero, Apple, Sorenson, Elecard, Moonlight, VSS, mpegable, Envivio, Hdot264 (binary), DSPR, JM (reference software) (binary), ffmpeg, Philips, FastVDO, Skal, Sony and many more

Encoders

  • x264: the first publically available High Profile encoder, opensource (GPL) (Source), available for VFW: x264vfw, ffdshow (output .avi), as commandline: x264cli (outputs .mp4, .mkv, raw), mencoder (outputs raw, .avi) (Doom9's MeGUI) or ffmpeg

x264 supports 2pass, CABAC, Loop, multiple B-Frames, B-References, multiple Reference Frames, 4x4 P-Frame, 8x8 B-Frame Blocksizes, anamorphic signalling and High Profile: 8x8 dct and intra prediction, lossless and custom quant matrices

  • NeroDigital AVC: useable in Nero Recode2, outputs .mp4

ND AVC supports 2pass, CABAC, (adaptive) Loop, multiple B-Frames, mulitple Reference Frames, weighted prediction, 8x8 P-Frame Blocksizes, 16x16 B-Frame Blocksizes, Adaptive Quant. (Psy High)

  • Sorenson: useable in Sorenson Squeeze 4, outputs .mp4,

Sorenson supports 2pass, max 2 B-Frames, B-References, Loop and multiple Slices

  • Apple: useable in Quicktime 7, outputs .mp4, .3gp and .mov, totally slow

uses 2pass, max 1 B-frame, Loop (0,0), P8x8,B8x8,I4x4, Adapt. Quant, 5 Slices, no CABAC, no Weighted Pred., no multi Ref.

  • JM: The AVC Reference Software offers in v9.3 Main and High Profile: B/SP-Frames, CABAC, Loop Filter, 4x4 Blocksizes, multiple Reference Frames, Adaptive Quant, Error Resilience, RDO, Lossless Coding, Custom Quants, Rate Control aso...
  • Hdot264: opensource (GPL) VFW version of the reference software by doom9 member charact3r, still based on a very old version of the reference (JM 4.0c)
  • VSS: free preview VFW Encoder (limited to 5 days), based on the reference encoder
  • Elecard: useable in Elecard Mobile Converter, outputs .mp4 and MainConcept's v2 encoder, outputs .264 and .mpg PS/TS

not publically available anymore:

  • Moonlight: useable in Moonlight's OneClick Compressor v1.1 and CyberLink's PowerEncoder, outputs .mpg

Moonlight supports 1pass (VBR/CBR/Fixed Quants), CABAC, Loop, 2 B-Frames, 8x8 P-Frame Sizes, Adapt. Quant, PAR, Interlacing

  • MainConcept: was useable in the v1 encoder (adds a watermark), outputs .264 and .mpg PS/TS

1pass (CBR/VBR/fixed Quants), P-Frame Reorder, CABAC, Loop, Multiple B-Vops, Multiple Ref, 4x4 P-Frame Sizes, PAR, RDO

  • mpegable: offered for some time a free VFW Encoder (not based on the reference), doesnt handle YV12

mpegable supports 1pass (fixed quants) uses P-Frames only, 8x8 P-Frame Blocksizes, CAVLC only, Loop

  • Envivio: useable in 4Coder, outputs .mp4

Decoders (comparison)

  • ffmpeg: opensource (LGPL), used e.g. in ffdshow (VFW and DShow decoder), MPlayer and VideoLAN

supports B-Frames, B-References, CABAC, Loop, Weighted Prediction and High Profile (8x8 dct and intra prediction, lossless)

  • CoreAVC
  • Apple: AVC decoding inside Quicktime 7, supports .mp4/.mov, very slow

supports only 1 B-Frame, CABAC, Loop but no mixed references, multiple B-frames and no interlacing

  • NeroDigital AVC: DShow Decoder and .mp4 Parser coming with Recode2

supports Main and High Profile

  • VSS: preview VFW Decoder (limited to 5 days) and a DShow Decoder (limited to 30 days)

VSS DShow supports .avi (with VSSH and H264 fourcc), CABAC, Loop, B-Frames

  • Elecard: available in Elecard's MPEG Player and MainConcept's v2 encoder
  • Envivio: not freely available AVC DShow decoder called EnvivioTV, handling AVC in .mp4 (since 2.0, current version: 2-1-181)
  • Philips: DShow AVC decoder freely available in the AVC Alliance player (handles raw AVC only)
  • FastVDO: time limited (5 minutes per video) High Profile DShow Decoder

not publically available anymore:

  • Moonlight: DShow decoder/Parser handling AVC in .mpg, .mp4 and .264 available in Moonlight's MPEG Player v3.0

supports Main and High Profile

  • MainConcept: the v1 preview offered a free DShow AVC decoder (adds watermark) and Parser handling AVC as .mpg PS/TS
  • mpegable: offered for some time a free VFW decoder (usable also in DShow), supports .avi (with DAVC fourcc)
  • Basic AVC Decoder in C, for an university project
  • Pegasus: not really compliant DShow AVC decoder

Software to Encode to 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. If you want to convert DVD to H.264 the best choice would be Fair use 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.

source: H.264 FAQ & Basic Conversion Guide

Playing H.264 Video

The latest version of ffdshow supports H264 playback. 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. 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.

source: H.264 FAQ & Basic Conversion Guide

 

The Best Codec of 2005

x264 won the best Codec of 2005 by doom9 where they had a shootout between many popular video codecs.

In their testing they found the following:

FIRST PLACE: x264 (a free open source H.264 codec/encoder) - Tied with Ateme's encoder on two occasions, and surpassing its most fierce competitor in SPR.

SECOND PLACE: Ateme's encoder left a good impression in the Matrix 3 test in the main round, sharing the first place with x264 in two tests. However, the results during night scene video shows that effectively it comes in second in the big picture.

THIRD PLACE: XviD is the dominant ASP codec. It continues to surpass DivX in the tested movies.

FOURTH PLACE: DivX 6.1 came in last in two out of three tests, and last tied with XviD in the third test. There's no doubt that DivX has made significant advancements and is getting closer to XviD, but it's still not there. Soon it won't matter as XviD and DivX are both ASP codecs, and ASP will soon be outdated.

  • x264
  • Ateme
  • XviD
  • DivX