[MPlayer-users] edl accuracy in mplayer vs. mencoder

pfile at pacbell.net pfile at pacbell.net
Tue Dec 27 20:30:44 CET 2005


>
> On Dec 26, 2005, at 2:34 PM, mplayer-users-request at mplayerhq.hu wrote:
>
>> You cannot do accurate editing with -ovc copy unless you use a codec
>> where all frames are keyframes. Also I recommend using the
>> -hr-edl-seek option with mencoder. And make sure your edl file has the
>> exact timestamps you want to cut at, not whatever adjusted values work
>> well for mplayer -edl (which is imprecise).
>>
>> Rich
>>
>
> i dug into this a little more and... GOTO considered harmful :)
>
> i instrumented the code in mencoder that's doing the EDL skips and
> found that there were two skips for every entry in my cutlist. there's
> a goto at the bottom of the EDL code that goes around and ends up
> calling edl_seek() again. there is a comment above the goto that's
> pretty cryptic, so i'm not sure exactly what case this was supposed to
> handle, but if it was to enforce keyframes its being too strict, as
> there are many more keyframes near my edit point than the one it ends
> on on the 2nd call to edl_seek().
>
> anyway, removing that goto has given me more accurate edits, to the
> point that i dont think i'll need to use avidemux. i'll have to try
> this on more examples to make sure its really solid. maybe someone can
> enlighten me about the need to call edl_seek() twice.
>
>

just to follow up for everyone: of course rich was right; i didnt have 
enough keyframes in my .avi and hence seeking was really inaccurate. i 
think the loop in the edl handling code is to make sure you get _past_ 
whatever PTS value is in the edl file, and since by default lavc has 
keyframes every 250 frames, it missed badly.

i changed my keyframe interval to 50 and everything looks great. the 
edits are much more accurate even with the 2 EDL seeks.

thanks for the help everyone.

rob




More information about the MPlayer-users mailing list