[MEncoder-users] mplayer / mencoder timing mismatch (WAS: Re: mplayer / mencoder: precision of -ss)

Reza Roboubi reza at parvan.net
Fri Apr 7 00:16:20 CEST 2006


Nitin Jain wrote:
> It depends upon the rate control algo that had been used to encode the
> original stream (the one you _pause_ in mplayer)...
> For something like h.264, where you might've dozens and scores of P &
> B frames strewn between two neighbouring I frames, chances are that a
> gap of 50 seconds might not be that surprizing!

No.  When I play with mencoder, I can get very close to where I need; within a
few seconds.  I'm assuming that's an Iframe point, no?  Yet the input
used (for -ss) to get there, is very different than the mplayer reading.

This is streaming media, from a news source(a segment is being cut for
educational needs.)  I'm using mplayer -dumpstream to capture it.

On the captured file, mplayer reports:
<<<------------------------------------------------>>>
ASF file format detected.
VIDEO:  [MP43]  320x240  24bpp  1000.000 fps    0.0 kbps ( 0.0 kbyte/s)
[...]
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 1 ch, s16le, 32.0 kbit/4.54% (ratio: 4006->88200)
Selected audio codec: [ffwmav2] afm:ffmpeg (DivX audio v2 (FFmpeg))
[...]
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffdivx] vfm:ffmpeg (FFmpeg DivX ;-) (MS MPEG-4 v3))
<<<---------------------------------------------------->>>

I'm pausing this at 1607 seconds according to mplayer.

Yet, adjusting mencoder to get within seconds of this clip, requires:
~/tmp/usr/bin/mencoder -ss 1530 -endpos 330 -of avi -ovc copy -oac copy \
      -o segment.avi story.dump

So the -ss is way off.

I should have mentioned that mencoder reports these "errors":
File not found: 'frameno.avi'
Failed to open frameno.avi
66 duplicate frame(s)!
66 duplicate frame(s)!
[... many more of these ...]

> Oh.. btw, can you tell how good (visually) does the original video
> clip seem to be?

It looks very good.  I apologize to the community for not releasing the
video source.  The person who needs this was rather hesitant about that.
Her mind may change.

Reza.




More information about the MEncoder-users mailing list