Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Playing mp3 with pyglet
#1
Hi

I use pyglet to play songs in wav and mp3 formats. According to docs of Pyglet, I should install ffmpeg, so I did it but problem is:


p = pyglet.media.Player()
file = pyglet.media.load(r'C:\Zeta.mp3')

TraceBack (most recent call last):

...

  File "C:\Python3\lib\site-packages\pyglet\media\codecs\wave.py", line 59, in __init__
    raise WAVEDecodeException(e)
pyglet.media.codecs.wave.WAVEDecodeException: file does not start with RIFF id
What is wrong? Probably, I installed ffmpeg in wrong way? What I do: install windows built from here: https://www.ffmpeg.org/ and then copy files into folder 'ffmpeg' in C:\ , after it I set a path in environment variables. How to check whether I installed ffmpeg correctly?

To be presice:

Windows 10 64x

>>> pyglet.version
'2.0.dev0'
Reply


Messages In This Thread
Playing mp3 with pyglet - by constantin01 - Jan-11-2020, 10:42 AM
RE: Playing mp3 with pyglet - by snippsat - Jan-11-2020, 07:38 PM
RE: Playing mp3 with pyglet - by constantin01 - Jan-12-2020, 04:10 AM
RE: Playing mp3 with pyglet - by Legumen - Dec-17-2021, 01:14 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  pyglet problem deansenecal 1 1,965 Feb-15-2021, 11:15 PM
Last Post: Larz60+
  How many times was the button pressed in pyglet rama27 0 1,936 Oct-10-2020, 10:26 AM
Last Post: rama27
  Pyglet installation problems LostinPy 3 5,597 Feb-07-2018, 08:47 PM
Last Post: LostinPy
  Game in Pycharm using pyglet pierrem13 0 3,215 Nov-29-2017, 01:54 AM
Last Post: pierrem13
  Pyglet Media: unjustifiable memory usage hbknjr 4 4,627 Aug-20-2017, 02:08 AM
Last Post: hbknjr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020