Avidemux Forum

Avidemux => Windows => Topic started by: AcerBandit on March 09, 2012, 05:21:51 AM

Title: Trying to achieve near perfect black levels using MPEG-4 AVC's h264 encoding
Post by: AcerBandit on March 09, 2012, 05:21:51 AM
I'm trying to achieve near perfect black levels using MPEG-4 AVC's h264 encoding but no matter what settings I try I can't get good black levels  They always come out to be an off-black or really dark gray.  I have some borders (and chopping them off is not an option nor is adding black borders) that are originally pitch black - perfectly black 000000.  I use these videos on a black website so it stands out.

I encoded a file using XVID instead just to make sure Avidemux could achieve the black levels I wanted at all, period, and it was successful.  I'm going to show you the results.  On the left will be normal and the on the right will be with the lightness increased to exaggerate the effect to make sure you understand I'm not just making this up.

Here's the capture using xvid which is successful at matching pure black:
(https://avidemux.org/smif/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FprGAI.png&hash=b55c93e671fbf26a9f10a8c062c221f2) (https://avidemux.org/smif/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FbLtwm.png&hash=ea7b8031e0d32304ba0de0a7a6d7ce7e)

And here's another snippit of a file encoding with h264 or x264 or whatever it's using:
(https://avidemux.org/smif/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FFcjJQ.png&hash=3bf6c93fc7b1d6ab8e3e76c8837466da) (https://avidemux.org/smif/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FbLlrW.png&hash=376e54f8936551b3b6ae7033213ab1af)

I added a small perfect column of black to the left of these images to give you some context of what it should be matching.

I know this is a small nitpick but I really want to do this correctly.  How do I achieve the black levels I desire using h264 and Avidemux?
Title: Re: Trying to achieve near perfect black levels using MPEG-4 AVC's h264 encoding
Post by: AcerBandit on March 09, 2012, 05:58:51 AM
I was using 2.5 in the previous post, so out of curiosity I tried using the latest 2.6 nightly build.

It gets the great black levels I want.  So success there.  However, new problems result.

(https://avidemux.org/smif/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FGCKYq.png&hash=dfcff890233e0dbe723d5a9627357997)

Whenever I skip around in the resulting file I get this weird green stuff in the lower corner of the player.  It disappears after about 3 seconds but it's annoying and I don't want it.

The other problem is now the audio is out of sync with the video.  I used to get a prompt for building a VBR time map with 2.5.  I don't get that with 2.6 and I don't see any option for doing that in 2.6 so it creates these out of sync video files and that just won't work.  Where did that wonderful feature go?

So I guess I need help in either getting black levels I want in 2.5 or getting a file that doesn't make that green pixel noise and audio that is in sync in 2.6.  Please help!
Title: Re: Trying to achieve near perfect black levels using MPEG-4 AVC's h264 encoding
Post by: Jan Gruuthuse on March 09, 2012, 07:04:02 AM
The player green artifacts is probably only in the avidemux player and not when viewing the saved content in another player?
2.6 is not frame based rather time based. The audio shift is this in the saved content outside avidemux to?
Title: Re: Trying to achieve near perfect black levels using MPEG-4 AVC's h264 encoding
Post by: AcerBandit on March 10, 2012, 01:26:29 AM
1) The green stuff I'm referring to appears when I use an online browser video player (jwplayer).  It doesn't show up in AviDemux.  It's only on the resulting encoded file.

2) I need the "Build VBR Time Map" feature that AviDemux 2.5 has in order to not have have syncing issues.  I can't find the feature in AviDemux 2.6 at all.  Are you saying that 2.6 is so drastically different that it no longer can do this?
Title: Re: Trying to achieve near perfect black levels using MPEG-4 AVC's h264 encoding
Post by: Jan Gruuthuse on March 10, 2012, 07:58:25 AM
Not saying that. 2.6 is a work in progress and very experimental: Dont use it for serious stuff.
The "Build VBR Time Map" I can't answer on that one.
Online browser issue? Check with MediaInfo if there are codec differences when you make from same source video a clip with avidemux 2.5.6 and 2.6. Do other online browser video players have the same issue?