[MPlayer-dev-eng] playback seeking
Ivan Kalvachev
ikalvachev at gmail.com
Fri Apr 14 14:12:39 CEST 2006
2006/4/13, yiping chen <yipingchenfr at gmail.com>:
> Hello,
> I need your help:)
> I want to have a more accurate playback seeking.
> In what file can I find the method for seeking, To attempt to a defined
> position?
Exact seeking is already implemented in mencoder.c, if you need same
for mplayer then look at mplayer.c.
If you are going to port it to mplayer be sure to make it optional (by
new option;)
Currently MPlyarer seeks to the nearest keyframe. This means that
mplayer.c sends the wanted distance to the demuxer and the demuxer
goes to the nearest keyframe at that distance. This is the only valid
behaviour as you cannot start decoding from non-keyframe. Now if you
want precise seeking you must decode all the frames until you reach
the one you need. For normal playback this is overkill. However there
are few instances where such behaviour is desired (e.g. editing
subtitles you seek back&forth a lot).
More information about the MPlayer-dev-eng
mailing list