Log in

View Full Version : Forcing keyframes in Mencoder


bilu
12th March 2004, 19:09
Anybody know if it's possible?

Purpose: DVD chapter authoring


Bilu

unixfs
13th March 2004, 19:40
keyframes are forced with

-lavcopts ...:keyint=15:...

but chapter authoring happens in dvdauthor, where mencoder doesn't have any role

RobertR
13th March 2004, 21:19
I suppose that bilu was rather refering to posibility to pass info to mencoder to create key frame at particular point of video (like it can be done for CCE).

bilu
13th March 2004, 21:22
As RobertR said :)


Bilu

unixfs
14th March 2004, 15:39
oh, silly me.
I'm not sure that this method will work, but you may try it:
one of lavc's options is vrc_override; it takes 3 arguments:
1 and 2 delimit a range of frames that you want to operate on, the
third is the quantizer that you want for that range, e.g.
1000/1001/2
will encode frames 1000 and 1001 at q 2.

Since this introduces a discontinuity in the video stream I *guess* that very likely the beginning of this range (1000) introduces a keyframe.

Hope this helps.

bilu
14th March 2004, 16:33
It's worth to try :)

Thanks for the idea. I'll let you know.


Bruno

Amenophis
20th March 2004, 00:48
hi,

vrc_override doesn't create additional keyframes, furthermode vrc_override(1001,1002,2) won't use fixed quant 2, instead the compression will be only 2% of the compression the ratecontrol algorithm had predicted for this frame. (so in most cases this will result in the min_quant).

if you still need a keyframe to be added, you have to edit the statsfile which is created during first pass. select the line which represents this frame, and change it to 'type:0'. additionally you can lower the 'q' value and increase the 'itex' value, so the quality of this frame will be better.

unixfs
20th March 2004, 10:10
so this man excerpt is wrong?

vrc_override=<options>
User specified quality for specific parts (ending, credits, ..) (pass 1/2).
The options are <start-frame>, <end-frame>, <quality>[/<start-frame>, <end-
frame>, <quality>[/...]]:

quality (2-31)
quantizer

quality (-500-0)
quality correction in %

Amenophis
20th March 2004, 12:26
yes, at this point the information in the man page is wrong. i've encoded dozens of samples, when using the values as mentioned in the man page the result wasn't useable at all. instead something like (startframe,endframe,1000) will do it, it compressed the credits 10 times stronger than normal. (which will result in about quant 10-12 for credits, so they still look perfect and take only up to 1500 kbit/s.