Log in

View Full Version : Hex editing h264 header


lnatan25
21st August 2010, 04:28
I have this strange problem, so perhaps the title is not the best way around the issue.

My problem is, I have a stream which has been encoded incorrectly with wrong luminance range (black areas appear gray and white areas appear also gray, so I assume it has been wrongly encoded with 0:255 when source was 16:235). I do not have access to the source.
My question is there any method of forcing decoders to select a different method of decoding by editing the header of the stream? Or any other method of signaling to the decoder that I wish a different decoding setting (through the container, MKV, MP4, etc.)?
It something easily fixable in AviSynth, but wish to not reencode the stream, if possible.

Thanks in advance!

poisondeathray
21st August 2010, 04:48
you can try this ffmpeg build by roozhou to rewrite the fullrange flag
http://forum.doom9.org/showthread.php?t=152419

But if white areas appear green, it's not going to be as simple as only a luminance or levels issue


...white areas appear also green...

lnatan25
21st August 2010, 04:57
Hm, no, I have not noticed white areas to appear green.
Thanks for you answer! I will take a look and see if it helps.

Ghitulescu
21st August 2010, 18:11
Nonsense, green is everything that is not compliant, due to any errors in stream, communication channel or any other external cause. Rerip your originals ...

setarip_old
21st August 2010, 18:45
@Ghitulescu

Hi!

You say:Rerip your originals ... But OP has stated: I do not have access to the source.

nm
21st August 2010, 22:20
Nonsense, green is everything that is not compliant, due to any errors in stream, communication channel or any other external cause. Rerip your originals ...

lnatan25 already clarified that "green" was a mistake and he meant gray. So it's a levels issue.

lnatan25
22nd August 2010, 00:36
I apologize, I was indeed mistaken in my original post. I meant gray and gray ("crushed whites and blacks"?).

Unfortunately, changing the header with that ffmpeg build did not work.