xpra icon
Bug tracker and wiki

Opened 4 years ago

Closed 4 years ago

#1116 closed defect (worksforme)

src.py is not able to record sound with the default codec mp3

Reported by: Kundan Owned by: Kundan
Priority: major Milestone: 0.17
Component: sound Version: trunk
Keywords: Cc:

Description (last modified by Antoine Martin)

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.

Attachments (4)

src.py.log (811 bytes) - added by Kundan 4 years ago.
src.py log output
gstreamer_util.py.log (4.7 KB) - added by Kundan 4 years ago.
gstreamer_util.py output log.
src.py.log.output (9.0 KB) - added by Kundan 4 years ago.
src.py output after prepending XPRA_SOUND_DEBUG=1
gstreamer_output.log (11.6 KB) - added by Kundan 4 years ago.
gstreamer output log after prepending XPRA_SOUND_DEBUG=1

Download all attachments as: .zip

Change History (11)

Changed 4 years ago by Kundan

Attachment: src.py.log added

src.py log output

Changed 4 years ago by Kundan

Attachment: gstreamer_util.py.log added

gstreamer_util.py output log.

comment:1 Changed 4 years ago by Antoine Martin

Description: modified (diff)
Owner: changed from Antoine Martin to Kundan

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

comment:2 Changed 4 years ago by Antoine Martin

Resolution: worksforme
Status: newclosed

Not heard back, closing.

comment:3 Changed 4 years ago by Kundan

Resolution: worksforme
Status: closedreopened

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.

comment:4 Changed 4 years ago by Antoine Martin

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

  • ./xpra/sound/gstreamer_util.py
  • XPRA_SOUND_DEBUG=1 ./xpra/sound/src.py ./test.mp3

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:

  • it is unlikely to be applied to v0.16.x or ealier branches
  • when running from the command line, there is no way of knowing if a monitor device should be used or not (the server does want to use monitor devices, the client does not - a command line tool can be either)

comment:5 Changed 4 years ago by 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

Changed 4 years ago by Kundan

Attachment: src.py.log.output added

src.py output after prepending XPRA_SOUND_DEBUG=1

Changed 4 years ago by Kundan

Attachment: gstreamer_output.log added

gstreamer output log after prepending XPRA_SOUND_DEBUG=1

comment:6 Changed 4 years ago by Antoine Martin

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

comment:7 Changed 4 years ago by Antoine Martin

Resolution: worksforme
Status: reopenedclosed

Not heard back, closing.

Note: See TracTickets for help on using tickets.