Green frames at start of output.

HandBrake for Windows support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
Daz
Experienced
Posts: 86
Joined: Sun Apr 01, 2012 8:15 pm

Green frames at start of output.

Post 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
mduell
Veteran User
Posts: 8182
Joined: Sat Apr 21, 2007 8:54 pm

Re: Green frames at start of output.

Post 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.
Daz
Experienced
Posts: 86
Joined: Sun Apr 01, 2012 8:15 pm

Re: Green frames at start of output.

Post 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.
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Green frames at start of output.

Post 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.
Daz
Experienced
Posts: 86
Joined: Sun Apr 01, 2012 8:15 pm

Re: Green frames at start of output.

Post 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?
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Green frames at start of output.

Post 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
Daz
Experienced
Posts: 86
Joined: Sun Apr 01, 2012 8:15 pm

Re: Green frames at start of output.

Post by Daz »

So corrupt source?
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Green frames at start of output.

Post 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.
Daz
Experienced
Posts: 86
Joined: Sun Apr 01, 2012 8:15 pm

Re: Green frames at start of output.

Post 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.
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Green frames at start of output.

Post 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.
Daz
Experienced
Posts: 86
Joined: Sun Apr 01, 2012 8:15 pm

Re: Green frames at start of output.

Post by Daz »

Makes sense, I'll pass this back to VRD then. Thank again for the help.
Post Reply