[MPlayer-dev-eng] [PATCH] further dvr-ms playback improvements
John Donaghy
johnfdonaghy at gmail.com
Mon Oct 16 22:58:44 CEST 2006
Here's the updated patch I've been working on that calculates the
average frametime as it plays the file, based on the file's pts
values. Thanks to Trent Piepho for the following sugguestion which
I've now implemented as well:
> For extra credit, keep using the old average after a seek until the new
> average is based on more samples than the old one.
I dont know what to do about Nico Sabbi's suggestion though because
the file pts values always increase as I explaied previouly.
> > where n (in this case 1..4) indicates the display order.
> > In your case you can consider n=pts (your variable time).
> > When you see pts(n-1) > pts(n) (e.g. 4 > 2) you have actually found a
> > B frame,
> > so you have to increase the frame count but you have to wait until P7 to
> > calculate the average framerate on the interval I1 to P4
This patch also tries to identify key frames based on the average
number of segment in a video frame - I do this because the dvr-ms
format marks every single frame as a key frame. I'm open to
suggestions here but what I've done works well most of the time. I.e.
seeking usually lands on an I-frame but not always.
Finally, in the seek function I calculate 'rel_seek_packs' differently
for dvr-ms. This works well but I'm not sure if it would also work for
wmv files due to lack of samples. The other way didnt work for dvr-ms
and I dont know if it works for wmv so I've only changed the behaviour
for dvr-ms files.
John
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avg_frametime.patch
Type: application/octet-stream
Size: 8348 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20061016/ef031d24/attachment.obj>
More information about the MPlayer-dev-eng
mailing list