[MPlayer-users] Mencoder seems to skip duplicate frames - switch?

Hans Meine meine at kogs1.informatik.uni-hamburg.de
Mon Mar 10 21:08:12 CET 2003


Hi again!

On Monday 10 March 2003 18:04, Brett Kosinski wrote:
> Hmm... rc4 has no such flag, AFAICT.  Perhaps you mean the noframedrop
> flag?
No, in cfg-mencoder.h there are
	// limit number of skippable frames after a non-skipped one
	{"skiplimit", &skip_limit, CONF_TYPE_INT, 0, 0, 0, NULL},
	{"noskiplimit", &skip_limit, CONF_TYPE_FLAG, 0, 0, -1, NULL},
	{"noskip", &skip_limit, CONF_TYPE_FLAG, 0, 0, 0, NULL},

I thought they were there for some longer time. Thus, "noskip" sets the 
variable "skip_limit" to "0" which is tested after the "if(!blit_frame)"-part 
if skipping was not requested. As one can see, the result is a 
"muxer_write_chunk(mux_v,0,0);" which is commented with "write empty frame".
But later down, after the MSGTR_DuplicateFrames-output which I get, the 
duplicated-frame-handling does the same muxer_write_chunk-call obviously 
writing an empty frame, too (so it's not obvious what -noskip does in this 
case, in fact it seems there are two muxer_write_chunk calls if (skip_frame 
== -1)). I do not see yet why that breaks the A/V-sync.

> Anyway, since a diff is out of the question, I'll just describe what I
> added. :)
Thanks for the description!

> That's basically it.  Of course, there are cleaner ways of implementing
> this, but this is my quick hack to get things working. :)  As you can see,
> it's a really minor change, but it seems to work.

Hmm, I tried several tricks now, but I don't get the desired result yet. I 
tried commenting out the "write empty frame" in the -noskip case, I tried 
setting blit_frame to 1 unconditionally, I tried setting skip_frame to 0 if it 
is < 0, and I really tried to understand what's going on. It seems as if I 
failed, though.

In fact, the output plays fine in all cases after pressing "+" 4 times to get 
a "-400ms" A/V correction. I wonder if this offset has the correct sign. 
(Testing) "-400ms" obviously means that the video is played with 400ms delay 
which seems right to correct the error of 10 skipped frames. But, why does 
commenting out the empty-frame-writing stuff not change anything?

/me lost his confidence that he can fix it.
  Greetings,
    Hans



More information about the MPlayer-users mailing list