[MPlayer-users] mencoder to join files: keyframes gone?

D Richard Felker III dalias at aerifal.cx
Thu Jan 22 06:08:23 CET 2004

On Wed, Jan 21, 2004 at 11:39:22PM -0500, Johan wrote:
> I've sucessfully used mencoder and -copy switches to concatenate several 
>  avi files. The original files all seek very well; without the floating 
> colored blocks effect.  The concatenated file plays perfectly (great 
> sync), but seeking results in upto a second or two of image degradation 
> (ie, blotchy blobs) before quality is restored.  I'm concluding that the 
> original had more keyframes than the concatenated version. The 
> concatenated version is also smaller than the sum of the parts, so this 
> may well be the case.
> Is there someway to request more keyframes (or that all keyframes are 
> kept?), or am I misdiagnosing the problem?

You're misdiagnosing. The problem is that all frames are getting
marked as keyframes (even though they're not!), so mplayer will seek
to non-key frames when it plays the resulting file.

> the command:
> cat "$1"*avi | mencoder -ovc copy -oac copy -forceidx -o "$1_joined.avi"

Forceidx can't work when you "cat" the input because it's not
seekable. Instead cat all the files together first then run mencoder
on the combined file. This might fix your problem.


More information about the MPlayer-users mailing list