Page 1 of 1

Green frames at start of output.

Posted: Thu Jun 07, 2018 9:55 pm
by Daz
Description of problem or question:
Green frames at the start of encoded file. There are no glitches/green frames present in the source (link bellow).


Steps to reproduce the problem (If Applicable):
Encode this source file and playback the output vrd-out.mp4.


HandBrake version (e.g., 1.0.0):
1.1.0


Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):
W7 SP1


HandBrake Activity Log ***required*** (see How-to get an activity log)
https://pastebin.com/fe8gF9nL

Re: Green frames at start of output.

Posted: Thu Jun 07, 2018 10:32 pm
by mduell

Code: Select all

[h264 @ 000000004f398d00] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
Corrupted input, different decoders may handle differently.

Try a nightly with ffmpeg to see if it handles any better than the old libav.

Re: Green frames at start of output.

Posted: Fri Jun 08, 2018 11:35 am
by Daz
Just tried the latest nightly and no green frames :)

So is the input corrupted somehow? I have noticed that line in the log before, most encodes display it but the green frames are relatively rare. The source file is created with VideoReDo and I took this issue to them first and they said it was a handbrake decoding issue bacuase it plays back ok before encoding with Handbrake.

Have I got this right then, this is infact a corupt source issue however the latest ffmpeg is able to deal with it?

Thanks.

Re: Green frames at start of output.

Posted: Fri Jun 08, 2018 3:44 pm
by BradleyS
Difficult to tell without a sample. Could be corrupt and FFmpeg's decoder is handling it better, or it could be fine and Libav's decoder wasn't handling it well at all.

Re: Green frames at start of output.

Posted: Fri Jun 08, 2018 4:58 pm
by Daz
I see. There's a link to a sample in the Steps to reproduce section above. That's the output from VideoReDo before it's been through Handbrake, is that any good or do you need the original tv stream untouched by VideoReDo aswell?

Re: Green frames at start of output.

Posted: Fri Jun 08, 2018 5:02 pm
by BradleyS
Oh, missed that.

Libav 12.x says:

Code: Select all

[h264 @ 0x7fda0f800000] number of reference frames (0+6) exceeds max (4; probably corrupt input), discarding one

Re: Green frames at start of output.

Posted: Fri Jun 08, 2018 5:10 pm
by Daz
So corrupt source?

Re: Green frames at start of output.

Posted: Fri Jun 08, 2018 6:16 pm
by BradleyS
Your HandBrake log says the same. Pastebin a log from the nightly and we can compare. I don’t have a recent FFmpeg built to test at the moment.

Re: Green frames at start of output.

Posted: Fri Jun 08, 2018 7:54 pm
by Daz
The nightly log also has that line. https://pastebin.com/raw/gYuzYj0H

Ok so if there's a line like that in the log the source file is definitely corrupt?

Thanks for your help Bradley.

Re: Green frames at start of output.

Posted: Fri Jun 08, 2018 8:40 pm
by BradleyS
Without diving down to the stream level, I'm going to go with probably. Most likely an issue in the original source that VideoReDo did not have enough information to correct, so it passed it through as-is.

Looks like FFmpeg's decoder is able to proceed normally, despite this. I do see that Libav reports 0+6 and FFmpeg reports 0+5, so perhaps FFmpeg is better identifying the reference frame(s) in question. A lost reference frame could definitely yield missing or incorrect frame data like you're seeing.

Re: Green frames at start of output.

Posted: Fri Jun 08, 2018 10:28 pm
by Daz
Makes sense, I'll pass this back to VRD then. Thank again for the help.