Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jthomaschewski/3bbc2e703ec467e4f3c19055fb0c20e3 to your computer and use it in GitHub Desktop.
Save jthomaschewski/3bbc2e703ec467e4f3c19055fb0c20e3 to your computer and use it in GitHub Desktop.
Streaming audio output from Linux (Pulseaudio/Pipewire) to Windows (ffmpeg 7)

Windows (receiver) side:

ffplay.exe -nodisp -acodec pcm_s16le -ar 48000 -flags low_delay -fflags nobuffer -framedrop -analyzeduration 0 -probesize 32 -max_delay 0 -f s16le -ch_layout '2 channels' -i udp://0.0.0.0:18181?listen=1

Linux (transmitter) side:

pactl load-module module-null-sink sink_name=remote


# re-encode
ffmpeg -f pulse -i "remote.monitor" -ac 2 -c copy -tune zero_latency -fflags nobuffer -ar 48000 -f s16le "udp://RECEIVER:18181"

# no re-encode
ffmpeg -f pulse -i "remote.monitor" -ac 2 -c copy -tune zero_latency -fflags nobuffer -f wav "udp://RECEIVER:18181"
(might needs change of codec/properties on receiving side)

pavucontrol # Change the default output to the Null sink or move single applications to this "output" device.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment