[MPlayer-users] -ss does not always work in mencoder

Stefan Baehre ste.ba at gmx.de
Tue May 14 02:57:02 CEST 2002


I have a problem with the '-ss' option in mencoder.

I have ripped "Matrix" DVD using
'mplayer -dvd 1 -dumpstream -dumpfile matrix.dump'
and encoded it to MPEG4 using
'mencoder -vop scale=704:304,crop=704:416:8:80 -sws 2 -oac mp3lame
-o matrix.avi -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1000:vhq:vqmin=2
-npp lb matrix.dump'.

Then I tried to cut a scene out of it using
'mencoder -v -ovc copy -oac copy -ss 120 -endpos 60 -o part.avi matrix.avi'
(output appended).

But the '-ss' option worked for the video stream only.
Audio always starts from the beginning.

I recognized that this doesn't happen with all video data.
I tried another DVD and some videoclips and it worked ok,
video and audio in sync.

Anyway, I *can* do 'mplayer -ss 120 matrix.avi'. It jumps
to 120s with correct video and audio. Only mencoder
doesn't.

I'm uploading a low bitrate version of the first minute of
Matrix to matrix60.avi.
'mencoder -ovc copy -oac copy -ss 30 -o part.avi matrix60.avi'
will show the error (video starts at 30s, audio at 0s).
-------------- next part --------------
MEncoder CVS-020513-01:33-2.95.4 (C) 2000-2002 Arpad Gereoffy (see DOCS!)

CPU vendor name: AuthenticAMD  max cpuid level: 1
CPU: Advanced Micro Devices Duron MG Morgan (Type: 6, Stepping: 0)
extended cpuid-level: 8
Testing OS support for SSE... yes.
Testing OS support for SSE unmasked exceptions... yes.
Tests of OS support for SSE passed.
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Reading /home/stefan/.mplayer/codecs.conf: can't open '/home/stefan/.mplayer/codecs.conf': No such file or directory
Reading /etc/mplayer/codecs.conf: 34 audio & 92 video codecs
Detected AVI file format!
Font /home/stefan/.mplayer/font/font.desc loaded successfully! (206 chars)
VIDEO:  [FrNo]  0x0  24bpp  25.00 fps    0.8 kbps ( 0.1 kbyte/s)
MainAVIHeader.dwFlags: (2320) HAS_INDEX IS_INTERLEAVED TRUST_CKTYPE
Not an URL!
Using pass3 control file: frameno.avi
File size is 5448597504 bytes
Checking for YUV4MPEG2
success: format: 0  data: 0x0 - 0x44C30000
DEMUXER: freeing demuxer at 0x83061d0  
ASF_check: not ASF guid!
DEMUXER: freeing demuxer at 0x83061d0  
Checking for NuppelVideo
DEMUXER: freeing demuxer at 0x83061d0  
Checking for MOV
DEMUXER: freeing demuxer at 0x83061d0  
Checking for VIVO
DEMUXER: freeing demuxer at 0x83061d0  
header block 1 size: 0
Checking for REAL
DEMUXER: freeing demuxer at 0x83061d0  
DEMUXER: freeing demuxer at 0x83061d0  
DEMUXER: freeing demuxer at 0x83061d0  
DEMUXER: freeing demuxer at 0x83061d0  
DEMUXER: freeing demuxer at 0x83061d0  
DEMUXER: freeing demuxer at 0x83061d0  
system stream synced at 0xD (0)!
==> Found video stream: 0
Detected MPEG-PS file format!
Searching for sequence header... OK!
VIDEO:  MPEG2  720x576  (aspect 3)  25.00 fps  8500.0 kbps (1062.5 kbyte/s)
[V] filefmt:2  fourcc:0x10000002  size:720x576  fps:25.00  ftime:=0.0400
Detected audio codec: [a52] drv:14 (AC3-liba52)
Initializing audio codec...
Selecting Audio Decoder: [liba52] AC3-liba52
dec_audio: Allocating 3840 bytes for input buffer
dec_audio: Allocating 6144 + 65536 = 71680 bytes for output buffer
Using SSE optimized IMDCT transform
AC3: 5.1 (3f+2r+lfe)  48000 Hz  384.0 kbit/s
A52 flags before a52_frame: 0x2A
A52 flags after a52_frame: 0xA
Using MMX optimized resampler
AUDIO: srate=48000  chans=2  bps=2  sfmt=0x10  ratio: 48000->192000
==> Found audio stream: 129
videocodec: framecopy (720x576 24bpp fourcc=10000002)
audiocodec: framecopy (format=2000 chans=2 rate=48000 bits=16 bps=48000 sample=1)
Writing AVI header...
==> Found audio stream: 128
XXX initial  v_pts=0.000  a_pos=24000 (0.500) 
Pos:   0.0s      1f ( 2%)   0fps Trem:   0min   2mb  A-V:0.000 [0:0] A/Vms 0/0 D/S 0/0
Pos:   0.1s      2f ( 2%)   0fps Trem:   0min   4mb  A-V:0.000 [0:0] A/Vms 0/0 D/S 0/0
Pos:   0.1s      3f ( 2%)   0fps Trem:   0min   5mb  A-V:0.000 [0:0] A/Vms 0/0 D/S 0/0
[...]
==> Found subtitle: 8
==> Found subtitle: 7
==> Found subtitle: 1
==> Found subtitle: 0
Pos:  10.5s    261f ( 2%)   0fps Trem:   0min 253mb  A-V:0.000 [4625:384] A/Vms 0/0 D/S 1/0
Pos:  10.5s    262f ( 2%)   0fps Trem:   0min 254mb  A-V:0.000 [4618:384] A/Vms 0/0 D/S 1/0
Pos:  10.6s    263f ( 2%)   0fps Trem:   0min 255mb  A-V:0.000 [4619:384] A/Vms 0/0 D/S 1/0
[...]
==> Found subtitle: 5
==> Found subtitle: 4
==> Found subtitle: 2
==> Found subtitle: 3
Pos:  13.7s    342f ( 2%)   0fps Trem:   0min 329mb  A-V:0.000 [4678:384] A/Vms 0/0 D/S 1/0
Pos:  13.8s    343f ( 2%)   0fps Trem:   0min 330mb  A-V:0.000 [4672:384] A/Vms 0/0 D/S 1/0
Pos:  13.8s    344f ( 2%)   0fps Trem:   0min 331mb  A-V:0.000 [4675:384] A/Vms 0/0 D/S 1/0
[...]
Writing AVI index...
Fixup AVI header...

Video stream: 4603.406 kbit/s  (575425 bps)  size: 34548564 bytes  60.040 secs  1500 frames

Audio stream:  384.000 kbit/s  (48000 bps)  size: 2904000 bytes  60.500 secs

*** free_stream() called ***


More information about the MPlayer-users mailing list