PDA

View Full Version : Frauenhofer's AVC/H.264 codec


bond
8th September 2004, 18:48
Frauenhofer today made its MPEG-4 AVC encoder available to the public via a free 30 days evaluation software
the encoder outputs to .mp4 and also supports HE-AAC encoding

it also comes with a streaming server for .mp4 files and a player, the later is said to be unlimited for useage

read the press release here (http://www.iis.fraunhofer.de/pub_rel/presse/2004/mpeg4/index.html)

download the software and sample .mp4 clips here (http://www.iis.fraunhofer.de/amm/download/mpeg4/)

unmei
8th September 2004, 21:23
First thing i experience is a crash of the player when i feed it the cathedral..mp4 provided by atheme. Actually i expected it, but i think the conclusin cannot be the two will be incompatible in the full versions. It's beta vs. evaluation after all.

I'm currently encoding a 5min 30 half-anime clip at full DVD resolution to 600/48 kbit. I'll reprt back once it finished. One thing to say already is it isn't terribly fast at hi quality setting. It makes around 1fps on my athlon XP @2GHz from a huffyuv source. Ah well, it only takes avi video and avi/wav input (and mp4 iirc, too late to confirm as i started the encode).

LostMP4
8th September 2004, 21:33
Originally posted by bobololo (from Ateme AVC beta thread)
It seems that fraunhofer doesn't support main profile...

unmei
8th September 2004, 21:47
ah that would explain something =)
I wonder what they mean with "Full support of MPEG-4 AVC/H.264 video" then :rolleyes:

[edit]
The large sample they provide has probably a bitrate of 480kbit on video (i say probably because it shows 0 in the player, so deducted from length and minus the 96 for audio) and a really tiny of 352x288 ..but it actually has quite a bit of artifacts..

i wonder if i should cancel my encode already now as the chance of it being even remotely watchable is very low. Too sad, their name looks good, but that demo video definitely does not.

CruNcher
9th September 2004, 01:06
jeah that sample is awefull bad for 3 mins also their server is crashing on client connect trying to serve that sample :P

superdump
9th September 2004, 13:23
I also tested this codec at the same bit rate as my Ateme tests (704x288 / 25fps @ 760kbps) and it was ridiculously slow (about 1 fps) it seemed to be only one pass and the deblocking is too strong. I suspect that it's CBR only as well, but I might be wrong. Conclusion => in its current state, it sucks.

bond
9th September 2004, 20:13
did anyone do some interoperability testing with the .mp4 files created by this encoder?

i tried playing them in videolan and it seems (in contrary to ateme created files) to work great (well the quality still really sucks), but i cant try the nero nor the enviviotv dshow filters here :(

unmei
10th September 2004, 02:07
@bond
the fraunhofer produced file plays in Nero ShowTime perfectly. At first i was not able to play it in MPC because the 3vix splitter picked it up and could not find a suitable decoder. It "magically" works suddenly by the use of "Nero DVD decoder".
However both ShowTime and MPC hang immediately as soon as you try to seek.
I don't have the envivioTV and could not get it as they no longer offer it for download, something along the line "now only for our customers", i guess those that buy their hardware or other industry level solutions.

Maybe that's obvious, but i'll mention it anyway: Osmo 4 doesn't play it, mpeg-4ip can't extract the video. Furthermore, to only thing i arrived at to get the video out of the .mp4 was as raw YV12 (decoded by Nero filter and muxed to mkv) However even this does not play. The 4CC of the YV12 raw was AVC1, which triggered FFDShow but it seems it expected the video then to be in h264 (which it wasn't any longer).
Mkvmerge can't mux it since it seems its mp4/Quicktime reader doesn't know what to do with AVC.


So now about the encode:

Source:
The tech details are in my first post in this thread. The source is Huffyuv filtered from the DVD by this script:

Mpreg2source(cpu=0,iPP=true)
TomsMoComp(1,15,1)
RemoveGrain(mode=2).RemoveGrain(mode=2)

I think the huffyuv is very close to the DVD.

The clip has not so much motion, but a artificial background and areas that pan across the sceen. Also it has both real life portraits and a lot of anime and line drawing over the background texture.

Encoding
It took 330 minutes to encode my ~8200 full DVD resolution frames. I used the max quality level. For some reason the result did not include the audio it was supposed to encode to HE-AAC.
For comparision FFDShow's x264 encoded the same clip at constant bitrate, 600kbit/s in less than 12 minutes.
The file produced by the Fraunhofer is not CBR, Showtime displayed the bitrate changing for 0.31 to 1.2mbit/s, i set 600kbit/s in the encoder.
The bitrate is below what you would want for this clip, for both encoders.

I then did a frame compare Fraunhofer vs. x264.
The only way i found to get frames from fraunhofer was to set my capture utility (IrfanView) to grab a frame every 1 or 2 seconds while i played the file in the Fraunhofer player (Nero returned blank screens). This was before the file played in MPC - now i could probably grab exact frames with MPC.
So i loaded the x264 file in MPC and tried to get the same frames as i had from the fraunhofer by using framestep and MPCs frame capture. A very annoying process since if you seek back with x264 the picture is broken (it doesn't hang tho, just need to go back to a previous keyframe and let the picture build up again). Note that i did not capture the frames the same way, therefore you should not take the pictures too serious. There may be processing or color differences. I'm trying to show differences, doing metric analysis or diff frames is useless here. As is counting the number one codecs "wins" over the other.
This way i got ~40 frames of each, some i link here.


Some observations:

Fraunhofer seems to retain more detail than x264. x264 blurs pretty strong i realised in this compare.
On the other hand, Fraunhofer runs more danger to introduce slurs and sometimes "produces details" that are not present in the original, probably by not clearing out macroblocks from former frames - it looks a bit like the smearing we could observe with FFDShow playing ASP Xvid at some times.

Both encoders take a long time to build up detail, especially the textured background when it was covered and then suddenly is uncovered. Most of the time fraunhofer finished building up detail quicker than x264, but because the difference from start to full detail is larger with fraunhofer, the build up with x264 still looks less disturbing when actually playing the video.

In general, Fraunhofer produced more natural skins, but in one place it broke badly on skin probably because there was detail it could not build up while x264 simply discarded that with smoothing and looked better during the build up time.

Both encoders have a weird way of dealing with hair, this could be inherent to h264 even. There are areas that are extemely detailed and other areas where it is just a monochrome soup. A more uniform appearence were less disturbing, even if it had less detail in the sum.

I think x264 dealed better with the drawn (anime) part, like mentioned it smoothes more, but this prevented it from producing some ugly blocks. However in very detailed anime scenes x264 discared some detail totally and the fraunhofer looked clearly better.
Also while fraunhofer is subject to blocking, x264 is more subject to wipe out lines/edges which also looks quite bad.

Frame captures:

I do not embed the pictures because they are ~500KB each with a total of over 15MB.

-blocks in fraunhofer, wiped edges in x264. In the top right, fraunhofer killed a hair line and somehow garbled the other strokes.fh (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/03_fraun.png) x264 (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/03_x264.png)

-this time fraunhofer both blocks and smoothes. however with x264 the detail in the upper left circle looks stange (so surrounded by "cloud"). fh (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/04_fraun.png) x264 (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/04_x264.png)

-x264 wipes lines on the gun, invents detail on the ear and in the hair there is something like a huge block (actually a horiz. line invented). Most dominant is the missing color information to the right . fh (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/05_fraun.png) x264 (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/05_x264.png)


-x264 is weak in the background texture. Here it almost completely omits it. Also the skin looks terrible. This frame is short after a "scene change" and the portrain is moving into the picture. fh (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/06_fraun.png) x264 (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/06_x264.png)


-several seconds later, x264 has recovered as much texture as it will. The skin in x264 now also looks a bit more acceptable, but still not as detailed as in fraunhofer. Here the black shading strokes on spkie to the left impress me in both encoders. fh (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/07_fraun.png) x264 (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/07_x264.png)


-Skin and hair, a real problem it seems. fh (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/08_fraun.png) x264 (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/08_x264.png)

-Again more detail in fraunhofer, but i think the x264 still looks less annoying in this case. fh (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/09_fraun.png) x264 (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/09_x264.png)


-This is several seconds after a scene change. x264 started out worse, but recovered (except the artifact in the top right). Fraunhofer somehow fails totally on the texture here. X264 looks a bit more fuzzy in the anime area, but fraunhofer has blocking there. fh (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/10_fraun.png) x264 (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/10_x264.png)


-Wiped edges in x264 fh (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/11_fraun.png) x264 (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/11_x264.png)

-here it is interesting to see how the codecs build up texture. B is 2 seconds after A. I think i did not hit the same frames for x264 and fraunhofer. Fraunhofer grays the white background in the circle with Jed on the bottom left. A fh (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/12a_fraun.png) A x264 (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/12a_x264.png) , B fh (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/12b_fraun.png) B x264 (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/12b_x264.png)

-These two might explain why i think x264 is more enjoyable for anime. fh (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/13_fraun.png) x264 (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/13_x264.png) , fh (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/14_fraun.png) x264 (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/14_x264.png)


-But still, also x264 can wipe out huge parts of a stroke at random places (center, wall plate). fh (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/15_fraun.png) x264 (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/15_x264.png)


-Finally a word on texture (fh (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/16_fraun.png) x264 (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/16_x264.png))
and detail (fh (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/17_fraun.png) x264 (http://homepage.hispeed.ch/mieru/doom9/fh_vs_x264/17_x264.png)) in anime.

conclusion
It is really hard to tell which one provides better quality. I think i would rather take fraunhofer for real life pictures because of the skin/hair. And x264 for cartoon/anime.
Both codecs show about the same phenomenon but in different places. Both build up detail (too) slowly. Both invent stuff that is not there. Both often smooth in places i think were important while retaining detail i would not care about. x264 wipes edges or strokes more than fraunhofer, but both do. x264 almost never blocks while fraunhofer often does in high motion anime.

Finally,
fraunhofer is extremly slow (27x slower than x264!) and i cannot seek. Contrary i can encode x264 in VDM, use AVS input, mux it into matroska with my audio codec of choice. And i can seek, it looks ugly after a rewind but it doesn't hang the player.

JohnV
12th September 2004, 12:36
I dont know about x264 but at lower bitrates Fraunhofer h264 doesn't exacly shine compared to Ateme/ND h264... Also the FhG demo encoder has practically no options except fast/high quality.

Here's some comparison clips:
http://www.hydrogenaudio.org/stuff/hero_Ateme_h264_500kbps.mp4
http://www.hydrogenaudio.org/stuff/hero_Fraunhofer_h264_500kbps.mp4

FhG was of course encoded with the highest quality setting.

unmei
12th September 2004, 13:08
Well, i'm not a atheme beta tester, so i could not compare to their encoder. But yes, i actually expect theirs to beat both x264 and fraunhofer.

Tommy Carrot
12th September 2004, 13:32
Fraunhofer h.264 has serious problems with the rate-control for sure, the quality is _very_ inconsistent (and usually bad). It looks like a CBR encoding.

Edit: Ah, apparently it supports CBR only, this answers a lot, but it looks bad even for a CBR encode.