[MEncoder-users] Skipped and duplicate frames

The Wanderer inverseparadox at comcast.net
Wed Apr 1 23:52:34 CEST 2009


Peter wrote:

> The Wanderer wrote:
> 
>> Of course not. Those options were not supposed to remove the
>> messages; they were supposed to fix problems which might be there
>> in spite of or as a side effect of those messages, and they can
>> have negative side effects of their own.
>> 
>> The messages just mean "in order to maintain A/V sync, MEncoder had
>> to duplicate or drop a frame". If you get rid of them without
>> introducing some other way of maintaining that, audio and video
>> will be out of sync.
> 
> Thank you for answering. The original video is in sync. I know I
> sound ungrateful, but I'm trying to reduce some digital camera videos
> (which are in a somewhat inefficient "MJPEG" format because it's
> simpler for the camera) for archiving; the original will be deleted.
> Therefore I can't accept any perceptible reduction in quality.
> Duplicating or skipping frames sounds like a reduction in quality.

It can be, depending on how and where it's done, but it isn't
necessarily - or even, in my experience with MEncoder, usually.

Is there a (to use your own word) perceptible problem - which might be
due to frames dropped or inserted, e.g. jerky video - in the resulting
file?

>> Just offhand, my guess as to the reason for there being some such
>> messages left would be that there is a difference in frame rate
>> between the input and the output, and so frames have to be added or
>> dropped in order to maintain the same effective playback rate at
>> the new frame rate.
> 
> You are probably on to something there; my original is 30fps but
> apparently that's not a valid framerate for the coder. I put "-r
> 30000/1001" before my input file, and it cleared the error; because
> of this, I wouldn't be surprised to see one skipped or duplicated
> frame in 1000 - I could accept that. This is probably where the
> remaining one or two came from when I used "-nosound".

What frame rate is the output file? What happens if you specify it
explicitly to be the same as what's in the input file?

>>> I have switched to ffmpeg, because for some reason, it does not
>>> give these errors.
>> 
>> This would be because either it uses a different method for
>> maintaining A/V sync, or (more likely), it simply doesn't tell you
>> every time it duplicates or drops a frame - in other words, it's
>> still doing it, it's just not telling you about it. I don't see how
>> this would be better, but if you prefer ffmpeg, that's certainly no
>> skin off my nose...
> 
> I don't prefer either; I just want a fairly simple way to compress
> this kind of movie file (ffmpeg output):
> 
> Input #0, avi, from 'S6301641.AVI':
>    Duration: 00:01:20.14, start: 0.000000, bitrate: 4853 kb/s
>      Stream #0.0: Video: mjpeg, yuvj422p, 640x480, 30.00 tb(r)
>      Stream #0.1: Audio: pcm_s16le, 22050 Hz, mono, s16, 352 kb/s
> 
> into something smaller, for archive purposes. Encode time is not an
> issue, and it would be ideal if it were playable on my Philips DivX
> DVD player.

If encoding time is not an issue, then at minimum you almost certainly
want to run a two-pass encode, and more complicated things with the more
esoteric command-line options may be worthwhile.

Is storage space (for the end product) an issue?

> I believe my original files to be without errors or "issues" (unlike
> my HD camcorder which sometimes omits frames as it starts up)
> therefore, sadly I have to conclude that if mencoder claims to be
> fixing something, it's probably mistaken and could be breaking it...

It isn't particularly fixing anything.

It's just preventing something from breaking in the process of being
transformed from one form into the other.

If there's something wrong with the output, regardless of those
messages, then either there's something wrong with your command line
(which was very simple - there is almost certainly room for improvement)
or it's a bug which should probably be fixed.

-- 
       The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

Secrecy is the beginning of tyranny.


More information about the MEncoder-users mailing list