You can install FFmpeg for your platform by following the instructions found in the FFmpeg download page.
For Mac OS and Linux, the library is usually installed system-wide. For Windows users, it’s not recommended to install the library in one of the windows sub-folders.
Instead we recommend to use the pyglet.options
search_local_libs
:
This will allow pyglet to find the FFmpeg binaries in the lib
folder located in your running script folder.
Traceback (most recent call last):
File "D:\pyglet-1.4.0a1\examples\noisy\noisy.py", line 46, in <module>
from pyglet.gl import *
File "C:\Python27\lib\site-packages\pyglet\gl\__init__.py", line 219, in <module>
from .win32 import Win32Config as Config
File "C:\Python27\lib\site-packages\pyglet\gl\win32.py", line 6, in <module>
from pyglet.canvas.win32 import Win32Canvas
File "C:\Python27\lib\site-packages\pyglet\canvas\__init__.py", line 99, in <module>
from pyglet.canvas.win32 import Win32Display as Display
File "C:\Python27\lib\site-packages\pyglet\canvas\win32.py", line 7, in <module>
from pyglet.libs.win32 import _kernel32, _user32, types, constants
File "C:\Python27\lib\site-packages\pyglet\libs\win32\__init__.py", line 237, in <module>
_user32.GetRawInputData.argtypes = [HRAWINPUT, UINT, LPVOID, PUINT, UINT]
NameError: name 'PUINT' is not defined
--
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+unsubscribe@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.
loop
set, and then queue the intro file and the SourceGroup. With the change of SourceGroup into PlayList and migration of loop
to the Player, this no longer appears possible. I can handle this by e.g. setting loop
on the Player from on_player_next_source
, but this is less elegant and more prone to error than the earlier solution.Would it be possible to arrange things so that an infinite
iterator can be passed to get the effect of a looping group?
That seems like the most general and Pythonic solution to me.
It means you'd be able to set up any kind of looping structure
you wanted by making the iterator behave appropriately.
--
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/ah2I54BSrZg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pyglet-users+unsubscribe@googlegroups.com.
File "synthesizer.py", line 63, in play_note
note_wave.play()
File "/home/ben/Documents/PycharmProjects/pyglet/pyglet/media/sources/base.py", line 275, in play
player.play()
File "/home/ben/Documents/PycharmProjects/pyglet/pyglet/media/player.py", line 238, in play
self._set_playing(True)
File "/home/ben/Documents/PycharmProjects/pyglet/pyglet/media/player.py", line 190, in _set_playing
self._create_audio_player()
File "/home/ben/Documents/PycharmProjects/pyglet/pyglet/media/player.py", line 342, in _create_audio_player
setattr(self, attr, value)
File "/home/ben/Documents/PycharmProjects/pyglet/pyglet/media/player.py", line 124, in __set__
getattr(obj._audio_player, 'set_' + self.attribute)(value)
File "/home/ben/Documents/PycharmProjects/pyglet/pyglet/media/drivers/pulse/adaptation.py", line 418, in set_volume
with self.context:
AttributeError: __enter__
--
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+unsubscribe@googlegroups.com.
self.players = deque([pyglet.media.Player() for _ in range(5)])
is:
self.players[0].queue(note_wave)
self.players[0].play()
self.players.rotate()
Strangely,
this works fine. It doesn't seem like the fire and forget players are
getting collected to early, but maybe it's related.
Things are a lot better than they were before, though, so we're definitely going in the right direction!
If we do deprecate the fire-and-forget functionality, perhaps we can implement a slightly higher level abstraction for simplicity. Something along the lines of the KeyStateHandler. Simple to write yourself, but so common that it's nice to have a ready made class.
To me the fire and forget use of players had been a resource management headache from the first time I touched media. I am strongly in favor of deprecating it. So if you create a player but don't hold on to it, the player should be destroyed.Issue 105 is an example of the trouble it causes.Rob
On 2 Dec 2017 4:21 pm, "Daniel Gillet" <dan.gi...@gmail.com> wrote:
Benjamin, the bug was confirmed.--
I've corrected it (I hope) and it was not what I initially thought. The details are not super important and they can be found in my commit.
I've created a new pull request for you to review. Let me know if it solves the problem.
I don't forget the playlist feature. But I don't have the time right now. It will take a bit more time because I need to create some test cases for this new functionality. This means I need to first understand all the different test cases that exist for the media Player.
I'll let you know once I make some progresses. :)
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...@googlegroups.com.
libavutil 55. libavcodec 57. libavformat 57. libavdevice 57. libavfilter 6. libswscale 4. libswresample 2. libpostproc 54.
Hello,Claudio Canepa and myself have worked on a new wrapping of FFmpeg with ctypes to replace AVbin. Benjamin Moran helped also a lot with his opinions on various topics and to coordinate our work with pyglet main branch. Many bugs were also fixed in the Audio Drivers and in the Media Player itself. There should not be any breaking API changes but there are a couple of additional features. All is described in the documentation.
[...] At the moment I'm working on the player queue mechanism. The basics are implemented. I've adjusted the tests where needed. I would need now to add more tests to check if everything is working correctly when using an iterable (or iterator) of sources.
I'll push soon my work in progress on my repo: https://bitbucket.org/dangillet/pyglet/ Anyone who wants to give it a try can pull directly from there. I will only make a pull request once I'm happy with the code.Dan
Another is to have two methods, such as player.queue_source() and player.queue_playlist().