[MPlayer-users] Seeking problem (-endpos working)
Konstantinos Karydas
kkar at intracom.gr
Thu Nov 6 14:37:41 CET 2003
Hello.
I have been playing with mplayer a long time now and I have managed to make
the -endpos function of the mencoder to function in mplayer, with some
necessary changes and additions. I will refer to the patch in another e-mail
and probably when I clean up the code (from comments, unused variables etc.)
I will send it to you. But in the process of analyzing the code of the
mplayer and understanding the exact functionality of many things, I have
concentrated to the timing. There I simply noticed that the seeking in
seconds (e.g. mplayer -ss 5 video.mpg) at least for a mpeg2 file is not
exact at all. I simply try to seek to e.g. the 5th second of the mpeg2 video
clip and mplayer seeks to the 10th second instead! When you have to do with
small times the problem is not that obvious, but when have a large video
clip and especially if we try to fast forward and rewind many times during
the playback (osd_function=OSD_FFW or osd_function=OSD_REW), then the timing
is totally messed up and seeks to very wrong positions, e.g. you can't
guarantee that when you want to watch from the 235th second onwards you will
really watch from the 235th second, but most probably when using:
mplayer -ss 235 video.mpg
you would seek to ... 245th or 250th seconds or even worse than that. You
can see that this is a problem when you want to do some more exact seeking.
So, does anyone know what is wrong? What is going on in this demux_seek
function? Is this maybe a video file indexing issue? I.e. mplayer can't
really locate (at least with the mpeg2 files) where the 10th relative second
of the clip is exactly, so it seeks very inaccurately to wherever mplayer
thinks that it is the 10th relative second of the clip.
Is there any function to get the exact timing of the video clip then seek to
a specific second accurately enough, thus stop making (at least) tens of
seconds wrong seeking? Maybe demux_seek needs to be changed to become more
efficient and correct in its functionality.
Thanks for reading,
I am waiting for your comments and/or recommendations,
Kostas
More information about the MPlayer-users
mailing list