[MPlayer-users] Mencoder seems to skip duplicate frames - switch?
Brett Kosinski
brettk at interdynamix.com
Mon Mar 10 19:04:39 CET 2003
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> Hi Brett!
>
> Thank you very much for your answer - that was _exactly_ what I was looking
> for. (Eventually, I would have had a look into the code myself - though I
> have to say last time I opened mencoder.c I got scared; it was not what I
> call beautiful code... ;-} )
Heh, yes, I know what you mean. ;)
> Do you run a CVS version? If so, can you give me a "cvs diff" for convenience?
I don't, actually... I'm currently using rc4.
> > Or create a new variable + command-line argument (what I did) to
> > selectively disable the behaviour depending on user input.
> That seems to be the cleanest solution. I even thought about whether the
> existing "-noskip" option should affect this!?
Hmm... rc4 has no such flag, AFAICT. Perhaps you mean the noframedrop
flag?
Anyway, since a diff is out of the question, I'll just describe what I
added. :)
In cfg-mplayer.h, change:
extern int vidmode;
to
extern int vidmode;
extern int skip;
and also change:
{"vm", &vidmode, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{"novm", &vidmode, CONF_TYPE_FLAG, 0, 1, 0, NULL},
to
{"vm", &vidmode, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{"novm", &vidmode, CONF_TYPE_FLAG, 0, 1, 0, NULL},
{"skip", &skip, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{"noskip", &skip, CONF_TYPE_FLAG, 0, 1, 0, NULL},
Then, in mplayer.c, change:
int fixed_vo=0;
to
int fixed_vo=0;
int skip=0;
and also change:
blit_frame=decode_video(sh_video,start,in_size,drop_frame);
to
blit_frame=decode_video(sh_video,start,in_size,drop_frame);
if (! skip)
blit_frame = 1;
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.
Brett.
More information about the MPlayer-users
mailing list