[MEncoder-users] Dropped frames trouble

Matthew Allen fret at memecode.com
Tue Sep 19 05:40:59 CEST 2006


Hi all,

I'm trying to convert a PAL mpv (mpeg video) stream to avi/xvid on windows using the command line:

mencoder.exe input.mpv -o output.avi -of avi -ovc xvid -vf scale=640:368 -xvidencopts bitrate=1000:turbo:vhq=0

This worked, in that I got a reasonable "output.avi". However the output avi has less frames than the input mpv file and runs for less time, and so the audio (mpa) is out of sync when remuxed (via intermediate wav file) with the avi.

The mpv file us 1:24:25.0 long in 126625 frames (25.000fr/sec), however the avi is 1:24:19.56 with 126489 frames. So I'm losing ~6 seconds of video somewhere in the conversion process. The mpa file is exactly the same length as the mpv file, which gives credence to the mpv's stats.

Is there an option I can set to cause it to not drop frames at all?

The orginal mpg file that the mpv and mpa came from was generated by HDTVtoMPEG2.exe from a .ts file saved by WebScheduler from free to air TV. HDTVtoMPEG2 allows you to cut ads out and saves the result as mpg without any re-encoding. So the mpv file may have corrupt frames caused by reception dropouts. FYI I demuxed the mpg with PVAStrumento.exe which does a bunch of error correction and resyncing, which I've found to be very good at fixing dubious mpg files. So I doubt that is an issue. If I play the mpv and mpa files together using Media Player Classic they stay in sync, so I'm pretty sure that the issue is definately in the mencoder step.

Can I need to maintain corrupt frames in the output so that sync with audio isn't lost? I don't care whats in corrupt frames, I just don't want them dropped entirely.

Pointers? Ideas? Suggestions?

Thanks for your time.
--
Matthew Allen




More information about the MEncoder-users mailing list