You are not logged in.

#1 2019-01-20 19:31:21

Registered: 2013-07-11
Posts: 91

PyQt Multimedia -- missing 'audio/pcm' codec?

I'm working on a PyQt5 script that does audio recording, trying to just record plain old .wav files.  It appears that, at least on my system, 'audio/pcm' is missing from the codecs list.  I checked on Debian stable and it appears there, so it's not Linux-specific.

The following script returns a list of available codecs:

from PyQt5.QtCore import *
from PyQt5.QtMultimedia import *

app = QCoreApplication([])
recorder = QAudioRecorder()

On my system this prints:

['audio/x-adpcm, layout=(string)dvi', 'audio/x-alaw', 'audio/mpeg, mpegversion=(int)4', 'audio/x-flac', 'audio/x-gsm', 'audio/mpeg, mpegversion=(int)1, layer=(int)3', 'audio/x-mulaw', 'audio/x-opus', 'audio/x-speex', 'audio/mpeg, mpegversion=(int)1, layer=(int)2', 'audio/x-vorbis', 'audio/x-ac3', 'audio/x-adpcm, layout=(string)adx', 'audio/x-adpcm, layout=(string)quicktime', 'audio/x-adpcm, layout=(string)microsoft', 'audio/x-adpcm, layout=(string)swf', 'audio/x-adpcm, layout=(string)yamaha', 'audio/x-alac', 'audio/x-dts', 'audio/x-eac3', 'audio/G722', 'audio/x-adpcm, layout=(string)g726', 'audio/x-mlp', 'audio/x-nellymoser', 'audio/x-pn-realaudio, raversion=(int)1', 'audio/x-dpcm, layout=(string)roq', 'audio/x-smpte-302m', 'audio/x-true-hd', 'audio/x-tta', 'audio/x-wma, wmaversion=(int)1', 'audio/x-wma, wmaversion=(int)2', 'audio/mpeg, mpegversion=(int)2', 'audio/x-siren']

However, 'audio/pcm' is not among that mess, and none of the things that are appear to allow me to record a simple wav file.

According to the documentation, 'audio/pcm' should always be available.  Is it on your systems?


#2 2019-01-20 19:57:25

From: Netherlands
Registered: 2012-06-20
Posts: 874

Re: PyQt Multimedia -- missing 'audio/pcm' codec?

Well that depends on your DAC/card, I have a Justboom-DAC(RPI) and it has no PCM only 'Digital'.
For that I use MOC player, I need to recompile with different make options else I have the same problem.

Hope that helps..


Board footer

Powered by FluxBB