ffmpeg problem with audio device
I have HDMI to USB Video Capture card , when i try to use ffmpeg to stream video/audio from device using the following command:
ffmpeg -re -rtbufsize 100M -i /dev/video0 -i hw:2,0 -f mpegts udp://127.0.0.1:1523?pkt_size=1024
i get the following error:
hw:2,0: Protocol not found
Did you mean file:hw:2,0?
and when trying the command like this:
ffmpeg -re -rtbufsize 100M -i /dev/video0 -f alsa -i hw:2,0 -f mpegts udp://127.0.0.1:1523?pkt_size=1024
i get:
cannot open audio device hw:2,0 (Device or resource busy)
hw:2,0: Input/output error
arecord -l output:
**** List of CAPTURE Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC262 Analog [ALC262 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 2: ALC262 Alt Analog [ALC262 Alt Analog]
Subdevices: 2/2
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
card 2: MS2109 [MS2109], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0
I used another version of ffmpeg from here:
johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz
i get :
ALSA lib ../../src/conf.c:3725:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so (/usr/lib/alsa-lib/libasound_module_conf_pulse.so: cannot open shared object file: No such file or directory)
ALSA lib ../../../src/pcm/pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM hw:2,0
[alsa @ 0x6314140] cannot open audio device hw:2,0 (No such file or directory)
hw:2,0: Input/output error
[video4linux2,v4l2 @ 0x6310980] Some buffers are still owned by the caller on close.
ioctl(VIDIOC_QBUF): Bad file descriptor
What could be the problem ?
Read more here: Source link
