beetbox / audioread

cross-library (GStreamer + Core Audio + MAD + FFmpeg) audio decoding for Python
MIT License
483 stars 108 forks source link

i try to open an audio with m4a format and i got NoBackendError #67

Open Dashu-Xu opened 6 years ago

Dashu-Xu commented 6 years ago

hi ! thanks for this lib! i have a audio with m4a format and i want get the content through audioread , but when i doing this i get an error , my code like this:

import audioread
file = './tingting.m4a'
with audioread.audio_open(file) as f:
    print(f.duration, f.channels)
    for buf in f:
        print(f)

the error like this:

NoBackendError                            Traceback (most recent call last)
<ipython-input-8-da9eca8a7457> in <module>()
      1 import audioread
      2 file = './tingting.m4a'
----> 3 with audioread.audio_open(file) as f:
      4     print(f.duration, f.channels)
      5     for buf in f:

D:\Users\keltsing\Anaconda3\lib\site-packages\audioread\__init__.py in audio_open(path)
    114 
    115     # All backends failed!
--> 116     raise NoBackendError()

NoBackendError: 

do i choice a wrong audio format? if that's true, which format audioread support?

sampsyo commented 6 years ago

Hello! It supports all the formats that all the backends support. So depending on your OS, you may consider installing ffmpeg or GStreamer with its full suite of plugins.

ghost commented 6 years ago

thanks