xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.

Version 33 (modified by Antoine Martin, 7 years ago) (diff)




Sound support has been stable since version 0.14, later versions add support for more codecs and better process isolation. If you are having issues with sound forwarding, please see Sound/Debugging.

Unless you disable sound forwarding, you can start or stop it from the system tray at any time.

The client and server will negotiate which codec to use. The most widely tested and supported codecs are vorbis, flac and mp3.

As of version 0.16, we use gstreamer 1.x by default if it is available, earlier versions used version 0.10.

Unlike screen updates which are discrete events, sound compression processes the operating system's sound data stream and so this is a continuous process which will take up a little bit of CPU and bandwidth.

If you want to turn off speaker forwarding, set speaker = off in your system wide xpra.conf (to disable it globally) or in the per-user configuration file.


The main controls are found in the configuration file or on the command line, documented in the manual:

  • speaker=on|off|disabled / microphone=on|off|disabled: sound input and output forwarding support: on will start the forwarding as soon as the connection is established, off will require the user to enable it via the menu, disabled will prevent it from being used and the menu entry will be disabled
  • speaker-codec=CODEC / microphone-codec=CODEC: Specify the codec(s) to use for sound output (speaker) or input (microphone). This parameter can be specified multiple times and the order in which the codecs are specified defines the preferred codec order. Use the special value ’help’ to get a list of options. When unspecified, all the available codecs are allowed and the first one is used.
  • sound-source=PLUGIN: Specifies the GStreamer sound plugin used for capturing the sound stream. This affects "speaker forwarding" on the server, and "microphone" forwarding on the client. To get a list of options use the special value help. It is also possible to specify plugin options using the form "−−sound−source=SOURCE name1=value1,name2=value2,etc", ie: "−−sound−source=pulse device=device.alsa_input.pci−0000_00_14.2.analog−stereo"

Other controls only available through environment variables for fine tuning - which should rarely be needed:

  • XPRA_GSTREAMER1 (defaults to 1) set to 0 to try to use GStreamer 0.10 instead of 0.10
  • XPRA_ALLOW_SOUND_LOOP (defaults to 0) can be set to 1 to forward sound to / from the same pulseaudio server, potentially creating a loop (not recommended)
  • XPRA_MONITOR_DEVICE_NAME to use a specific device if there is more than one device to choose from (can happen when using an existing pulseaudio server with more than one output device attached)
  • XPRA_SOUND_CODEC_ENABLE_xxxx (replace xxxx with a codec name): can be used to force enable a specific codec (not recommended)
  • XPRA_SOUND_QUEUE_TIME can be used to control the default amount of buffering on the receiver.
  • XPRA_SOUND_GRACE_PERIOD (defaults to 2000, in milliseconds) errors will be ignored during this grace period after starting sound forwarding, to allow the sound forwarding to settle down
  • XPRA_SOUND_SINK: the default sink to use (auto-detected)
  • XPRA_SOURCE_APPSINK: the "appsink" to use for capturing sound
  • XPRA_SOUND_SOURCE_JITTER (defaults to 0) fault injection which can be used to simulate jitter


  • Sound information displayed on session info (with speaker enabled and running and microphone disabled):


  • A Linux client's pavucontrol showing the Xpra application connected to the local pulseaudio server:


  • pavucontrol running within the xpra session ("on the server"), showing xpra recording the session's sound:


Attachments (3)

Download all attachments as: .zip