[MEncoder-users] mEncoder newbie

A. Schmid sahib at phreaker.net
Thu Apr 24 21:22:54 CEST 2008


Rob Langley wrote:
> Hi
> 
> 
> In the example below the resulting 5 second mp4 shows noise
> (horizontal coloured lines) for the first few seconds then a very
> pixilated few seconds of the actual footage.  I thought if I used
> –ovc copy it does just that copies each frame

Yes, and this is exactly why you get a distorted image!
All MPEG-ish video streams have I-Frames and, between them, P- (and 
possibly B-) Frames. I-Frames are much like JPEG still-images, P-Frames 
are just _differences_ from the preceding I-Frame (this is also where 
motion compensation takes place), dramatically saving filesize.

Now guess what happens, if you take a random frame from the video 
stream? You'll probably a P-Frame (there is only one I-Frame in 10 
seconds or something), meaning you cannot display the image (because you 
dont have the preceding I-Frame).
This is what happens with your "-ss 1 -ovc copy", and therefore you get 
garbage - up to the next I-Frame in the stream.

If you want the correct image, then you need to either re-encode this 
first few seconds, or you need to start the copied section at an 
I-Frame. Both is not easy with mencoder - better use some video editing 
software like avidemux.
Or you just re-encode the whole cut-out section, which may result in 
some quality loss.

> I also note when encoding the message ‘Skipping Frame’ many many
> times is this normal?

That depends. A few skips can be neccessary to keep audio and video in 
sync, always depending on output and input framerate. The same is true 
for "duplicate frames".

Regards,
Alex




More information about the MEncoder-users mailing list