Sorry for the slow response, Blaine. The short answer to your question is that there is no quick and easy way to do what you want, but it can be done in theory.
The longer answer is that most modern videos are encoded with occasional key frames (a complete picture, like an image file) and then the frames in between the key frames describe what _changes_ from the previous frame. So when you jump to a frame you have these options: - only jump to key frames, and always have a full picture to start with. - jump to any frame and start playing it, resulting in "blocky" odd-looking video until you hit the next key frame. - find the key frame previous to the intermediate frame you happened to pick, and quickly decode from the key frame to the frame you want to start with without playing the video out. ~ Nathan On Fri, Dec 21, 2012 at 10:16 AM, Blaine Booher <[email protected]> wrote: > Still haven't found a good solution to this =\ > > > On Tuesday, December 18, 2012 2:14:08 PM UTC-5, Blaine Booher wrote: >> >> hi guys, >> >> my solution to my previously mentioned memory leak is to only use >> specific codecs that AVBin0 apparently doesn't bug out on. By doing this I >> can use EOS_LOOP on the video and it restarts just fine. >> >> My question is - once I restart the video, it doesn't refresh all of the >> image, leaving it a bit choppy until there is a drastic change in the video >> to cause a full refresh of the sprite. Is there an easy way to force a full >> image blit? Or maybe clear out the sprite when I restart the video with a >> black box or similar? >> >> Here is how I'm drawing the frames now. thanks! >> def on_draw(self): >> if self.sprite is None: >> self.sprite = Sprite(self.player.get_**texture()) # *maybe >> we could flush the sprite with all black but this still wouldn't force the >> image to be a full video frame* >> win_width, win_height = director.get_window_size() >> self.sprite.position = (win_width / 2., win_height / 2.) >> self.sprite.scale = (win_width / self.sprite.width) >> else: >> self.sprite.image = self.player.get_texture() # *it >> would be nice if i could somehow force this to grab the entire frame, >> rather than the recently changed pixels* >> self.sprite.draw() >> >> any ideas? >> > -- > You received this message because you are subscribed to the Google Groups > "pyglet-users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/pyglet-users/-/L8ZIGyXk5I4J. > > 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. > -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pyglet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
