[MPlayer-users] suggestion: backward step one frame

Matthew Mott matmott at btinternet.com
Wed Jan 19 20:12:49 CET 2005


Mark Potse wrote:
> hello,
>
> I like to be able to step backward one frame in mplayer, just
> like stepping forward (key '.', command frame_step). I implemented
> it by adding
>
>     case MP_CMD_BACK_FRAME_STEP : { /* go back one frame (and
>                                        another to compensate for next iter) */
>       if(sh_video) rel_seek_secs -= 2.0/sh_video->fps;
>       else rel_seek_secs -= 0.1;  /* I don't know what to do in this case */
>       osd_function =  OSD_REW;
>       cmd->pausing = 1;
>     } break;
>
> just before
>
>     case MP_CMD_FRAME_STEP :
>
> in mplayer.c (MPlayer-1.0pre6a).
>

I would guess this is only approximate. As I understand it, it is not
possible to accurately seek back one frame in a MPEG stream without
counting frames and reconstructing the previous frame by rendering all
the way from the last I-frame.

Whether this technique is "good enough" depends on the accuracy of
Mplayer's seek routines, on which I cannot comment as I am not an
Mplayer developer.

Matthew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-users/attachments/20050119/62e97717/attachment.pgp>


More information about the MPlayer-users mailing list