playback seeking
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? Thanks
yiping chen wrote:
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?
Assuming you mean "which source file": none of them. If such a feature had been implemented, it would be documented in the man page. (If you aren't talking about source files, then this is a user question, and should have been posted to the user list - but the answer is still "sorry, can't do that".) The basic technique for implementing such a feature - at the cost of increased CPU (etc.) requirements, meaning much longer waits for the seek to complete - is known: identify the final keyframe preceding the desired seek position, seek to that frame, decode frames without outputting until you reach the desired seek position - but managing that without either producing garbage video or absolutely destroying A/V sync is trickier than it sounds. -- 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.
2006/4/13, yiping chen <yipingchenfr@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).
participants (3)
-
Ivan Kalvachev -
The Wanderer -
yiping chen