On 6 May 2009, at 01:34, Alex Holkner wrote:
> > On Wed, May 6, 2009 at 10:17 AM, Padraig Kitterick > <[email protected]> wrote: >> >> Hi John, >> >> This is a feature that I know Alex is working on including in avbin. > > He is? News to me :-) Apologies, I though you stated that to me in an earlier post, as shown below: > That's right. The current trunk version of avbin (not yet released) > exposes the reported frame rate of the video, so future versions of > pyglet will be able to use this to set a more appropriate interval. > >> Presumably, pyglet will be updated to support it as and when it gets >> into the avbin tree. >> >> In the meanwhile, you could look into the internals of >> pyglet.media.avbin and sub-class the pyglet.media.avbin.AVbinSource >> to >> figure out the frame rate. You could do this by calling the >> combination of self.get_next_video_frame() and >> self._last_video_timestamp() a few times. Examining the mean >> difference between the timestamps of the first few adjacent frames >> will tell you the FPS. But don't forget to call self._seek(0) when >> you're done to reset the video position. > > The current SVN trunk of pyglet exposes a frame_rate property in > VideoFormat, however this is not necessarily accurate, as it's merely > what's reported by the file's metadata. > > I think in general using pyglet for video manipulation is a really bad > idea -- the framework just isn't there, and what little video support > is there is heavily geared toward realtime playback. > > Alex. > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en -~----------~----~----~----~------~----~------~--~---
