Hello,

This is all excellent news! Thanks for taking the time to give it a try.

Le mardi 14 mars 2017 03:23:11 UTC+1, Benjamin Moran a écrit :
>
> I had to do a small tweak to get it to run, which was to remove the 
> specifc library versions from the lib.load_library() statements in av.py 
> (change "avformat-57" to "avformat", etc). After that, the loader 
> function was able to properly pick up the system ffmpeg libraries. 
>

This is indeed something I (we ?) need to think about. When I downloaded 
the binaries from FFmpeg website, they had dll files with names containing 
the lib version at the end. As we anyway only provide a wrapper to these 
lib, but it's up to the user to provide the said libraries, should we maybe 
provide a way in the API to give the appropriate file names ? Or should we 
add in the documentation that pyglet expects the libs to have any version 
number stripped off from the file name?
 

> All worked OK, with very minor issues that were likely causes by my poor 
> graphics card on this test box. (Some minor stuttering with the mpeg2/ts, 
> but It's a semi-non-standard format that local DTV is broadcast in here). 
>

Maybe your graphic card is not the problem. I can see a few possible 
problems. Currently the code syncs the video to the audio. Depending how 
the packets are coming from the stream, it could be that some frames are 
skipped because the time moved passed the supposed *presentation timestamp*. 
Also the code only decodes one frame at a time. Maybe with this format this 
takes a bit too much time. Begin able to decode multiple frame ahead of 
time and buffering them would probably help. But this requires some drastic 
changes in avbin.py code. 

There's nothing pretty about wrapping libraries with ctypes, but you've 
> written some clean code here.  Let me know if there is anything you need 
> help on, once you start to stabilized things
>

 Thank you very much for these kind words. It's always good for the 
motivation! I was wondering if I should split the av.py file into multiple 
smaller files. Maybe one per lib I'm wrapping, and then one for the AVbin 
functions I re-created? Or should I just leave it like this?

My current goal is to correctly detect the end of the media. Then I'll look 
again at the seeking functions, because I'm not sure it's correct.

One thing you might do is run a video and see how memory is doing. I'm 
pretty sure I must have some leaks here and there. Some testing could help.

Cheers,
Dan

-- 
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 pyglet-users+unsubscr...@googlegroups.com.
To post to this group, send email to pyglet-users@googlegroups.com.
Visit this group at https://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to