3

I'm using Ubuntu 14.04. The aplay -L command produces the following output.

**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC269VB Analog [ALC269VB Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: USB [Jabra SPEAK 510 USB], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

When I play live audio stream produced by an ip camera through the default output audio device using the following command:

ffmpeg -i rtsp://operator:operator@10.10.210.2/axis-media/media.amp?audio=1 -f alsa default

it works fine.

But when I try to play it in a defined audio output device as the following:

ffmpeg -i rtsp://operator:operator@10.10.210.2/axis-media/media.amp?audio=1 -f alsa hw:0,0

I get the error:

cannot open audio device hw:0,0 (Device or resource busy)
Could not write header for output file #0 (incorrect codec parameters ?): Input/output error

When I try another device:

ffmpeg -i rtsp://operator:operator@10.10.210.2/axis-media/media.amp?audio=1 -f alsa hw:2,0

This time again I get error but a slightly different one:

cannot set channel count to 1 (Invalid argument)
Could not write header for output file #0 (incorrect codec parameters ?): Input/output error

I read the documentation, but couldn't manage to solved. What do you think I'm doing wrong?

Thanks.

the_naive
  • 265

0 Answers0