[MEncoder-users] Extracting video parts using mencoder

The Wanderer inverseparadox at comcast.net
Wed Apr 8 12:42:53 CEST 2009


Epithemeus wrote:

> Hi All,
> 
> I am trying to extract specific parts of a video (MPG format) using
> MEncoder.
> 
> 1.       Upon using:
> 
> mencoder inputFile.mpg -ss 0.0 -endpos 600.0 -ovc copy -oac copy -o
> outputPart1.mpg
> 
> This allows me to extract the first 600 seconds of the video.
> 
> 2.       To extract the next 600 seconds, I use the following:
> 
> mencoder inputFile.mpg -ss 600.0 -endpos 600.0 -ovc copy -oac copy -o
> outputPart2.mpg
> 
> For some reason, this only yields the last 200 seconds (approx.) of
> the video.
> 
> Am I missing something here? Any ideas would be very helpful!

Seeking in MPEG files is very imprecise. If you try '-ss 600' on that
input file with MPlayer, you'll probably see that it doesn't actually
start anywhere near the 600-second mark; it probably starts about 200
seconds from the end of the file.

The only solution for this that I remember offhand is trial-and-error
testing to find the correct "magic" value for -ss for that particular
file and that particular target seek point.

You might also have luck with an EDL and -hr-edl-seek, but I haven't
used that myself so I can't say much about it.

-- 
       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