[MPlayer-users] Extracting a segment from an MPEG file

Vincenzo Romano vincenzo.romano at notorand.it
Sun Feb 26 19:16:01 CET 2012


Hi all.
I need to extract a segment of audio+video from a DVD, but am
encountering a few show stoppers.
I'm unsing mplayer/mencoder "SVN-r33713-4.6.1" under Kubuntu Linux.

For ease of use I've dumped the whole DVD on a local file (x.mpg) with:
mplayer -dumpstream dvd://1 -nocache -dvd-device /dev/scd0 -dumpfile x.mpg
I can play that file with mplayer and it works perfectly, just like
the first DVD chapter.

1. If I use mplayer -ss <time> -endpos <time> doesn't work. Something like this:
mplayer -ss 15:30 -endpos 1:40 -dumpstream -dumpfile 1.mpg x.mpg
What I get is an exact copy of the original file as if -ss and -endpos
had been ignored.

2. If I use mencoder those switches work, but the sync is gone.
Something like this:
mencoder -ovc copy -oac copy -o 1.mpg -ss 15:30 -endpos 1:40 x.mpg
will bring be the segment I need but with the wrong syncro. What's
worst is that the delay between audio and video
widens with playing time. So I cannot try to compensate properly with
-audio-delay.

Is there a way to solve this problem or is it a mencoder/mplayer bug?

--
Vincenzo Romano @ NotOrAnd.IT
Development Support Training
-=# NON QVIETIS MARIBUS NAVTA PERITVS #=-


More information about the MPlayer-users mailing list