4

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
Roger Binns
  • 3,203
  • 1
  • 24
  • 33

1 Answers1

6
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.

Leon
  • 31,443
  • 4
  • 72
  • 97
  • 2
    So the stream name parameter is mandatory, and when not present the error message refers to it as an "output file". And it can also be specified using -stream_name. It would be very helpful if the ffmpeg documentation made any of this clear! – Roger Binns Sep 14 '16 at 18:46