Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ffmpeg pulseaudio output options (device)

I need to use some of the documented pulseaudio options for ffmpeg such as the device. The example from the documentation works, but only sets the stream name:

ffmpeg -i INPUT -f pulse "stream name"

I have a sink named playback-device which I want to use. Based on the doc and googling, I tried various options to specify the device. They all give errors (or don't work):

ffmpeg -i INPUT -f pulse -device playback-device
# At least one output file must be specified

ffmpeg -i INPUT -f pulse -device=playback-device
# Unrecognized option 'device=playback-device'.  Error splitting the argument list: Option not found

ffmpeg -i INPUT -f pulse device=playback-device
# Plays to default device not the specified one

ffmpeg -i INPUT -device playback-device -f pulse
# At least one output file must be specified

The device is there:

$ pactl list short sinks | grep playback
3       playback-device module-null-sink.c      s16le 2ch 48000Hz       IDLE
like image 268
Roger Binns Avatar asked Nov 05 '25 02:11

Roger Binns


1 Answers

ffmpeg -i INPUT -f pulse -device playback-device
# At least one output file must be specified

This tells you that you are missing the argument which you had in your working example (ffmpeg -i INPUT -f pulse "stream name"). So the correct command is:

ffmpeg -i INPUT -f pulse -device playback-device "stream name"

Of course you can replace "stream name" with anything that doesn't look like an option.

like image 99
Leon Avatar answered Nov 09 '25 00:11

Leon