[MEncoder-users] hi!

Vladimir Mosgalin mosgalin at VM10124.spb.edu
Tue Jul 24 16:27:35 CEST 2012


Hi marco bernich!

 On 2012.07.24 at 10:48:42 -0300, marco bernich wrote next:

> use mplayer since I use linux (about 6 years ...) and am trying to edit
> video with mencoder.
> 
> but ... I have a problem:
> I want to make a cut using this syntax:
> 
> mencoder -ovc copy -oac copy -ss 55 -endpos 10 -o Corte.avi -idx
> /media/disco/Origen.avi
> 
> 
> cutting occurs, but not at the exact moment that indicated in '-ss'. occurs
> after a moment...
> 
> any ideas?
> thanks and regards

It is impossible to start cut at random position with -ovc copy due to
keyframes; the first frame from the moment you want (sec 55) requires
("references") earlier frames in this stream, so it's impossible to
start video at it without including earlier frames at all.

You have two solutions: one is to re-encode video in the whole fragment
(-ovc lavc -lavcopts ..., check manpage and make sure you provide enough
bitrate), which is probably easier in your case; another (when you need
long video and don't want to re-encode it completely) is to re-encode
only first group of frames to solve that keyframe start problem and keep
rest of the video intact. Avidemux (avidemux.sf.net) is able to do a
smart cut like that; in fact, it's probably easiest way to do visual cut
of videos. Also, it's fully supported by developers (unlike mencoder),
which probably means you have less chances to encounter bug that no one
would bother to fix.

-- 

Vladimir


More information about the MEncoder-users mailing list