[MPlayer-users] seeks: relative verus absolute versus percentual

Martin Grim mgrim at freeler.nl
Wed Sep 3 20:43:07 CEST 2003


Hi folks,

Did anybody ever experient with seeking back and forth in MPEG2 files? Upto now 
I did not manage to do absolute nor percentual seeks in slave mode. Especially 
backwards (to the absoluut beginning of the movie) doesn't seem to work. 

I do something like

    $ little_test | mplayer -slave movie.mpg

with little_test doing something like the following:

int main()
{
    printf("pause\n"); fflush(stdout);

    while(true)
    {
        printf("pause\n"); fflush(stdout);          // unpause the movie
        printf("seek 20 type=0\n"); fflush(stdout); // rel. seek to 20 sec

        sleep(30);   // play movie for about 30 seconds

        printf("seek 0 type=2\n"); fflush(stdout);    // abs. seek to begin
                                                      // of the movie
        printf("pause\n"); fflush(stdout);            // pause the movie
    }
}


For some reason it seems that I can only search backwards by relative seeks. Is 
this a problem of MPEG2 or is something wrong with my mplayer? I've searched 
the documentation, bug reports and archive, but didn't find anything useful.

Regards,

Martin 





More information about the MPlayer-users mailing list