Log in

View Full Version : Question for h.264 gurus


sebazvideo
24th April 2010, 22:49
x.264 is a great encoder but my NLE of choice is Edius Neo Booster (and probably will be Edius 5.5 in the near future, which is the same but with more features). Edius doesn't have a way to frameserve to another application, so I have to use the bundled h.264 encoding engine, which is not bad, but no matter what settings I choose, I can always tell when the change of GOP occurs if there's a static background that is a half tone, like gray, or brown, not too dark or too bright. Generally I don't see it and it's not a problem, but it's rather annoying when I can spot it. Depending on how long I set the IDR interval to, I can always tell by the way the pixels are placed on the texture of the monument. If I set it to 30, I can see the change once a second, if I set it to 15 I can see it every half second, and so on. I tried setting it to the maximum it allows, 300, and since then it's every ten seconds it's not much of a problem, but the file it produces cannot be used in either Sony DVD Architect or Adobe Encore CS4. In both, it shows the file as compliant, but when I build the project it stops right away with a buffer underflow message. I built a blu-ray structure with TSMuxer and burned it to a DVD-RW and my blu-ray player plays it fine, but something tells me that if both DVD Architect and Encore reject the file, really long GOPs might not be safe to author discs that can be played everywhere.

The first time I spotted this was after encoding an edit of a trip to Wilmington, NC, where there's a bronze monument where this defect is noticeable, I suppose it's because of the texture of the monument. I had shot that with a Canon HF100 (AVCHD).

The same defect is not noticeable at all when encoding using x.264 through Megui. Now, if I had a way to frameserve out of Edius Neo Booster I'd be more than happy to just encode in Megui, but there's not, and rendering to a lossless intermediate file takes up way too much hard drive space that I don't always have.

Recently I went back to Wilmington, NC and I shot the same monument, this time with a different camera, the Panasonic HMC40, from a different corner but zooming in and leaving it there for a minute, to see if there was any difference. When I came back I ran dozens of tests encoding out of Neo Booster to several different settings, as well as encoding with Megui and also Sony Vegas Pro 9.0d. In all the tests I did with Neo, the defect is noticeable, although depending on the settings it becomes excessive, or barely noticeable. However, in the tests done with Megui and Vegas, it's not noticeable at all. So far I ran over 50 short tests changing all these parameters, but I still can't achieve making this problem disappear completely.

So what I would like to ask the h.264 gurus is what settings in all the ones available to me in the Edius h.264 encoder I can possibly change to avoid this, if any. This encoder doesn't have as many choices as Megui for x.264, and some have different names, but I attached the screenshots for them to this post, except the first tab, since the settings in there are only to choose between VBR, CBR or constant quality, the bitrate and if you want 2 pass or not for VBR.

I also uploaded some samples to mediafire so anybody who's interested can see for themselves. They are just 15 seconds of footage to make the uploads faster, but there is the original, then one encode with Neo using the factory defaults, another using all the quality settings, and then one with Megui to show the difference.

The files are at http://www.mediafire.com/?sharekey=3dfcec8ff0efaf260c814df2efeadc50b1c0a54d2b13e870f0a154af670496da

I'd be really grateful if any guru could guide me in the right direction. After 55 tries, I'm not sure what else I can do. Maybe it's just that the encoder bundled with Neo and Edius is poor quality, or maybe there's a setting that is not available to the user and it's what's causing this, but if there's anything I can do to make this problem disappear it would be a little piece of heaven for me.

:thanks:

PS: the bitrate used in these files is 20 Mbps, because that's about the highest that I can use to put HD material on DVD media in blu-ray format to play in a standalone Blu-Ray player. The original file from the Panasonic camera I believe it's around 21 Mbps VBR.

http://imgur.com/iAGwD.jpg" alt="Hosted by imgur.com

http://imgur.com/qixg3.jpg" alt="Hosted by imgur.com

http://imgur.com/VKuzg.jpg" alt="Hosted by imgur.com

7ekno
25th April 2010, 01:47
Contact Canopus about it ;)

It's an ongoing issue that has been reported over and over again without resolution :(

It's one of the reasons I don't use any "pro-sumer" packages anymore ... If you examine the Sony footage closely you will also see more artifact than x264 ....

7ek

Dark Shikari
25th April 2010, 02:29
A commercial H.264 encoder is a pile of garbage, who would have thought? ;)

sebazvideo
25th April 2010, 02:43
A commercial H.264 encoder is a pile of garbage, who would have thought? ;)

Well, that's a bit of a stretch. It's not as good as x264, but it isn't a pile of garbage. The picture quality is still really good, that is the only difference I find, and it's not noticeable all the time, only in half tone objects when the camera is static or moving very slowly.

What I would call a real pile of garbage is the ATI Stream h.264 encoder, which is as fast as they claim, but the picture quality is downright disgusting.

Blue_MiSfit
25th April 2010, 07:35
If an encoder can't maintain transparency or close to transparency at 20mbps for 1080p, I'd call it garbage ;)

Hell, even a high quality MPEG-2 encode can look fantastic at 20mbps. OK maybe not fantastic, but quite good :devil:

Also, don't post attachments on the forum. They take forever to get approved. Use imgur or some other free image hosting service. Otherwise we'll never see the options you're talking about. Maybe we can offer suggestions on how to improve the quality of your encoder, but not without seeing the options!!!

~MiSfit

Dark Shikari
25th April 2010, 07:43
If an encoder can't maintain transparency or close to transparency at 20mbps for 1080p, I'd call it garbage ;)Technically this is 1080i ;)

Blue_MiSfit
25th April 2010, 07:59
...

/sigh you're right :) OK that makes it harder, but still...

creamyhorror
25th April 2010, 09:45
If Edius is compatible with Quicktime or VfW, you can try the x264 plugins for those systems. Not guaranteed to work, of course.

sebazvideo
25th April 2010, 14:38
If Edius is compatible with Quicktime or VfW, you can try the x264 plugins for those systems. Not guaranteed to work, of course.

It does support both, but I thought that the WfW version of x264 was an abandoned project, isn't it? And besides, how do I extract the video stream to be able to use in DVD Architect or Encore?

LoRd_MuldeR
25th April 2010, 14:45
It does support both, but I thought that the WfW version of x264 was an abandoned project, isn't it?

The VfW front-end isn't maintained by the x264 team anymore, but people are still providing updated builds:
http://komisar.gin.by/old/1564/x264vfw.1564kMod.generic.x86.exe

Of course this will force the usual VfW restrictions on you, so be warned!

Another option would be exporting the video from Edius Neo Booster as a lossless format (HuffYUV, FFv1, Lagarith) and then feed that into x264.

And besides, how do I extract the video stream to be able to use in DVD Architect or Encore?

You can extract the "raw" H.264 from an AVI container (that's what you usually get from VfW-based applications) with a tool like AVI-Mux GUI:
http://www.alexander-noe.com/video/amg/

Simply right-click the video stream and choose "extract binary". Then you can re-mux the raw stream into a MKV or MP4 container with MKVToolnix/MP4Box...

sebazvideo
25th April 2010, 14:46
Also, don't post attachments on the forum. They take forever to get approved. Use imgur or some other free image hosting service. Otherwise we'll never see the options you're talking about. Maybe we can offer suggestions on how to improve the quality of your encoder, but not without seeing the options!!!

~MiSfit

I didn't know that. I edited my first post to replace the attachments for the images at imgur.

poisondeathray
25th April 2010, 17:35
You can extract the "raw" H.264 from an AVI container (that's what you usually get from VfW-based applications) with a tool like AVI-Mux GUI:
http://www.alexander-noe.com/video/amg/


actually, those newer x264vfw versions can now export directly to raw/mp4/mkv from the vfw interface

sebazvideo - so you could export raw, and use that directly in encore or dvda. If you use blu-ray compliant settings, pass through works for both (no re-encoding)

Blue_MiSfit
25th April 2010, 18:43
Indeed. This will likely be the "best" option in this case.

~MiSfit

sebazvideo
25th April 2010, 22:54
actually, those newer x264vfw versions can now export directly to raw/mp4/mkv from the vfw interface

sebazvideo - so you could export raw, and use that directly in encore or dvda. If you use blu-ray compliant settings, pass through works for both (no re-encoding)

Thanks, that's a good tip, unfortunately when I wanted to check on it I realized that Neo doesn't allow exporting to any codec in the avi format, only uncompressed, and the two Canopus codecs, HQ and lossless. Really sucks donkey balls.

mp3dom
26th April 2010, 00:22
Canopus HQ and Lossless are really nice codecs. The HQ is similar to Avid DNxHD and Apple ProRes regarding bitrates/quality. Lossless is 4:2:2 that compress better than Huffyuv while mantaining similar decoding speed.

sebazvideo
26th April 2010, 00:43
Canopus HQ and Lossless are really nice codecs. The HQ is similar to Avid DNxHD and Apple ProRes regarding bitrates/quality. Lossless is 4:2:2 that compress better than Huffyuv while mantaining similar decoding speed.

Absolutely, they're excellent codecs, what sucks is that the program doesn't allow me to output to any AVI codec, so that I can use the WfW x264 like some suggested here. Still, I exported some footage in Canopus HQ at the best possible quality and then encoded to x264 and I can't tell the difference between that and encoding from Canopus Lossless or Uncompressed RGB. My only problem is the hard disc space needed for an intermediate file when I have a long timeline. Of course, I wish that the encoder Grass Valley includes with Neo wouldn't have that issue so I could use it happily.

Still, it's not the end of the world. I encoded 30 minutes of that recent trip with the Neo bundled encoder and it looks excellent, and I couldn't spot that problem but in a couple of places, and it wasn't so disturbing. I would prefer if it wasn't there, though.

CruNcher
26th April 2010, 21:11
Yep Canapus HQ and Lossless where one of the best intermediates before AVC-Intra came around, but even in multi Generation Editing AVC-Intra prevails and x264 lossless is also a wonderful thing :)
but yeah compared to Cineform Canapus rocked in my last tests i did couldn't beat AVC anyways, but those are also some years old now and Cineform for sure improved also with the time the same though could be for sure said for Canapus too hehe so it would be interesting to see some newer comparison then i did over 10 Editing Generations :)

sebazvideo
26th April 2010, 21:27
Yep Canapus HQ and Lossless where one of the best intermediates before AVC-Intra came around, but even in multi Generation Editing AVC-Intra prevails and x264 lossless is also a wonderful thing :)
but yeah compared to Cineform, Canapus rocks :)

Is there a free version of AVC Intra, or just the propietary ones that come in some NLEs?

LoRd_MuldeR
26th April 2010, 21:34
Is there a free version of AVC Intra, or just the propietary ones that come in some NLEs?

http://x264.nl/ :p :rolleyes: :)

sebazvideo
26th April 2010, 22:01
http://x264.nl/ :p :rolleyes: :)

That's for the x264 binaries, I don't see anything AVC Intra in there.

LoRd_MuldeR
26th April 2010, 22:08
That's for the x264 binaries, I don't see anything AVC Intra in there.

Yes, that web-site provides pre-compiled binaries of x264. And x264 is an OpenSource H.264/AVC encoder :)

AVC Intra is nothing but a "normal" H.264/AVC stream that only contains I-Frames. Configure x264's key-frame interval to 1 and you'll get an Intra-only stream ;)

And of course any "working" H.264/AVC decoder (such as ffmpeg/libavcodec) will decode such streams properly...

nurbs
26th April 2010, 22:37
He probably means the Panasonic AVC Intra (http://en.wikipedia.org/wiki/Avc_intra), not intra only AVC.

nm
26th April 2010, 22:54
He probably means the Panasonic AVC Intra (http://en.wikipedia.org/wiki/Avc_intra), not intra only AVC.
But AVC-Intra is intra only AVC with specific profile restrictions and sebazvideo asked for a free alternative. x264 is that, and it's most likely better than those commercial codecs except for 4:2:2 sampling and 10-bit support that are still missing.

LoRd_MuldeR
26th April 2010, 23:36
Yea, that "Panasonic AVC-Intra" simply is a subset of H.264/AVC. The same way the BluRay specs only allows a specific subset of H.264/AVC.

From what I see, x264 is able to create "AVC-Intra 50" conform streams, but not "AVC-Intra 100" streams. That's because the latter uses YUV 4:2:2, which x264 cannot do yet.

Also "AVC-Ultra" streams cannot be created by x264 yet, because neither 10-Bit nor 12-Bit are currently supported.

However there's absolutely nothing that prevents you from creating perfectly valid Intra-only H.264/AVC streams outside the restrictions of Panasonic AVC-Intra :)

kolak
27th April 2010, 00:03
There was already exactly the same post about the quality of Edius AVC output. It's nothing more than yet another Mainconcept implementation. You won't get as good results as with x264, so change your workflow.

I'm not sure about your space problems- Canopus HQ will give you good enough quality as an intermediate codec and it's about 150-200Mbit for full HD, so 2TB disk is enough for few hours.
Disks are cheap and there is no problem to add one more. Exporting to Canopus HQ is very fast, so you don't loose to much time.
If you're not happy with Edius AVC output, buy Carbon Coder (there is plugin for Edius- export straight from timeline), which has also Mainconcept engine, but better implementation and results.

Edius is a great piece of software and there is no need for 100 of features (which would destroy performance and stability)- there is one crappy Premiere, there is no need for 2nd. If you're not happy with Edius move to Premiere :)

Andrew

kolak
27th April 2010, 00:17
Yep Canapus HQ and Lossless where one of the best intermediates before AVC-Intra came around, but even in multi Generation Editing AVC-Intra prevails and x264 lossless is also a wonderful thing :)
but yeah compared to Cineform Canapus rocked in my last tests i did couldn't beat AVC anyways, but those are also some years old now and Cineform for sure improved also with the time the same though could be for sure said for Canapus too hehe so it would be interesting to see some newer comparison then i did over 10 Editing Generations :)

As far as I remember you've used around 100Mbits for Canopus HQ- it's not enough. You have to set it to max quality and than compare to AVC-I. My quick test (1 generation- Edius won't re-encoded Canopus HQ if it does not have to) showed that AVC-I from Edius (Panasonic encoder) is worse than Canopus HQ, but twice smaller :) I'm not fussy about size as long as it's about 4-5 times smaller than uncompressed, so I prefer Canopus HQ (also because of speed)

Andrew