Xpra: Ticket #1116: src.py is not able to record sound with the default codec mp3

src.py is not able to record sound and put in the provided filename with the default codec mp3.

I am using the command /usr/lib/python2.7/dist-packages/xpra/sound/src.py ~/Documents/Hello9.mp3

The xpra version is v0.16.2. The OS is Ubuntu 15.10.

However, the gstreamer.py is showing mp3 in codecs and decodec list. Please let me know if I am doing it wrong. Or, suggest me how this can be fixed.

I am attaching the src.py output log and the gstreamer_util.py output logs.



Thu, 11 Feb 2016 16:15:33 GMT - Kundan: attachment set

src.py log output


Thu, 11 Feb 2016 16:16:24 GMT - Kundan: attachment set

gstreamer_util.py output log.


Wed, 17 Feb 2016 16:31:22 GMT - Antoine Martin: owner, description changed

Just tried it and it worked fine. But since the command you posted is not executable, my guess is that you're doing something else, maybe using the wrong version of python. This works for me:

python /usr/lib/python2.7/dist-packages/xpra/sound/src.py ./test.mp3

Sat, 27 Feb 2016 13:26:59 GMT - Antoine Martin: status changed; resolution set

Not heard back, closing.


Sun, 28 Feb 2016 09:24:32 GMT - Kundan: status changed; resolution deleted

Issue is still there. I am not able to run this command without failures mentioned in log in Ubuntu 15.10 and xpra version v0.16.2. Will I need to collect some more logs here, and what will be that. The command used is.

prashant@prashant-VirtualBox:~$ python /usr/lib/python2.7/dist-packages/xpra/sound/src.py ~/Documents/Hello23.mp3
2016-02-28 14:54:12,533 using default codec: mp3
2016-02-28 14:54:13,194 found pulseaudio monitor devices: {'alsa_output.pci-0000_00_05.0.analog-stereo.monitor': 'Monitor of Built-in Audio Analog Stereo'}
2016-02-28 14:54:13,195 using pulseaudio source device:
2016-02-28 14:54:13,195  'alsa_output.pci-0000_00_05.0.analog-stereo.monitor'
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/xpra/sound/src.py", line 311, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/dist-packages/xpra/sound/src.py", line 269, in main
    ss = SoundSource(codecs=[codec])
  File "/usr/lib/python2.7/dist-packages/xpra/sound/src.py", line 54, in __init__
    raise InitExit(1, "no matching codecs between arguments '%s' and supported list '%s'" % (csv(codecs), csv(get_codecs().keys())))
xpra.scripts.config.InitExit: no matching codecs between arguments 'mp3' and supported list 'speex, wav, wavpack, flac, vorbis'
prashant@prashant-VirtualBox:~$

Also, As we had discussed in microphone forwarding case, We won't need a monitor device here. But we do try to select a monitor device here.


Sun, 28 Feb 2016 10:48:31 GMT - Antoine Martin:

Please post the output of those commands, running them from the latest up to date source tree:


Also, As we had discussed in microphone forwarding case, We won't need a monitor device here. But we do try to select a monitor device here.


The code in trunk already does that, but:


Sun, 28 Feb 2016 16:22:26 GMT - Kundan:

Hi Antoine,

I am attaching the src.py output and gstreamer_util.py after prepending XPRA_SOUND_DEBUG=1 in both of them.

Commands used are:-

XPRA_SOUND_DEBUG=1 python src/xpra/sound/src.py ~/Documents/Hello35.mp3
XPRA_SOUND_DEBUG=1 python src/xpra/sound/gstreamer_util.py

Sun, 28 Feb 2016 16:23:49 GMT - Kundan: attachment set

src.py output after prepending XPRA_SOUND_DEBUG=1


Sun, 28 Feb 2016 16:24:55 GMT - Kundan: attachment set

gstreamer output log after prepending XPRA_SOUND_DEBUG=1


Sun, 28 Feb 2016 17:29:16 GMT - Antoine Martin:

See ticket:1118#comment:6, this is probably fixed by r12090.


Wed, 16 Mar 2016 05:36:48 GMT - Antoine Martin: status changed; resolution set

Not heard back, closing.


Sat, 23 Jan 2021 05:15:25 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1116