At the moment xpra-0.8.x has incomplete "vorbis" and "flac" audio forwarding support leaving only "mp3" as working alternative (I couldn't make "aac" work on client despite having the same packages installed).
MP3 is just retarded comparing to Vorbis in regards to bandwidth and audio quality (not to mention support for more than 2 channels).
AAC is not-so-free?
Flac is great license- and quality-wise (loseless) so IMHO the best order for codecs would be Vorbis > Flac > MP3 > AAC.
Please support Vorbis and Flac.
Yes, this is planned, in fact the code already supports specifying the codecs, the gstreamer support code is mostly there, etc - only needs a little bit more work. But there was not enough time to get this tested properly for 0.8, hopefully this can be completed in time for 0.9. There are other, more important issues to do with sound though: buffering and latency being the main problem.
As can be seen here: browser/tags/v0.8.x/src/xpra/sound/gstreamer_util.py, the codecs that are meant to be supported (eventually) are exactly what you ask for, namely: vorbis, flac, aac and mp3.
r2833 adds support for wav and flac. vorbis and aac just stubbornly refuse to work.
Here's how you can test the code from the command line. This is easier than starting a session with a pulseaudio server and all the codec arguments and then starting a media player, etc:
XPRA_SOUND_DEBUG=1 ./xpra/sound/src.py test.mp3
mplayer test.mp3
XPRA_SOUND_DEBUG=1 ./xpra/sound/sink.py test.mp3
xpra attach --speaker-codec=flac (...) using audio codec: FLAC
You can repeat this with the other supported file extensions: ".flac" and ".wav".
Now, to add support for more formats (say vorbis, ac3 or aac for example - or maybe even some more obscure ones like amr, gsm or dca?), here is what is needed:
gst-launch-0.10 pulsesrc device=alsa_output.pci-0000_00_14.2.analog-surround-51.monitor ! \ vorbisenc ! oggmux ! filesink location=test.vorbis
mplayer test.vorbis
gst-launch filesrc location=test.vorbis ! oggdemux ! vorbisdec ! \ audioconvert ! audioresample ! autoaudiosink
CODECS
and CODEC_ORDER
definitions in xpra.sound.gstreamer_util accordingly, ie:
#format: encoder, formatter, decoder, parser CODECS = { VORBIS : ("vorbisenc", "oggmux", "vorbisdec", "oggdemux"), ... CODEC_ORDER = [MP3, FLAC, WAV, VORBIS]
src.py
and sink.py
work as expected. The pipeline should be (almost) identical to the one used with gst-launch.
When it does not, like the "vorbis" example above, weep.
Notes:
Not going to bother with vorbis and aac since there are better alternatives.
As of now, we support:
win32 needs a newer build of gstreamer to support "opus", maybe #299 will help
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/246