--
You received this message because you are subscribed to a topic in the Google Groups "pyglet-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pyglet-users/u1OTO2aYFLo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pyglet-users...@googlegroups.com.
To post to this group, send email to pyglet...@googlegroups.com.
Visit this group at https://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
The reason I would consider wrapping ffmpeg directly, despite the ABI difficulty, is only because avbin seems to be dropped or unavailable from many Linux distributions. If a maintainer stepped up, that could change.
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.
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).
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
find_library() searches along the system search path, and returns the full pathname, but since there is no predefined naming scheme a call like find_library("c") will fail and return None.for lib_name in pyglet.options.ffmpeg_libraries:
if lib_name.startswith("avcodec"):
new_lib_name = lib_name
avcodec = pyglet.lib.load_library("new_lib_name")One thing I have noticed, is that the video playback seems very slightly stuttery with the 1080p trailers only. I also tested a 1080p trailer (the *.mov one) with the audio track removed, and that one seemed to play completely smoothly. Do you see this at all on Windows? I wonder if there is some slight rounding errors somewhere that are not apparent in the SilentAudio player.
Also, just wanted to say that you've done a fantastic job on this.
For the second question, it seems like there might already be an easy way. I was looking over the pyglet.lib module, and I discovered a few things I was unaware of. First of all, it's possible to pass multiple library names to the pyglet.lib.load_library() method. For an example, pyglet/media/drivers/openal/lib_openal.py shows this in action. Basically, we can use kwargs for additional win32 library names. This might make "ffmpeg_libs_win" unnecessary.
In addition to that, pyglet already has the pyglet.options['search_local_libs'] option. If you look in the pyglet.lib module, it shows that this option will make pyglet also check for a subdirectory in the project path named "lib". If the ffmpeg libraries are placed there, it should be a solution for bundling ffmpeg libraries with applications. I'm interested if this works as expected on Windows.