Running 2 "cam_with_audio" streams - is this possible? #3995
Unanswered
HelpMePlsOkNow
asked this question in
Questions
Replies: 1 comment
-
Ok, has anyone had any success running 2 cams and getting at least one stream that has audio? I can't even manage to get audio now with either stream even if I assign only one cam_with_audio setting (per Mediamtx README) to a single cam. BTW, I have no problems running audio on a single camera setup. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Question
Not sure if my entries below are correct, but it seems as though each camera needs a separate USB microphone, Has anyone had success running 2 cameras (2 streams with audio) using same USB microphone?
Using v1.9.3, with the following .yml code:
paths:
cam1:
source: rpiCamera
rpiCameraCamID: 0
cam1_with_audio:
runOnInit: >
gst-launch-1.0
rtspclientsink name=s location=rtsp://localhost:$RTSP_PORT/cam1_with_audio
rtspsrc location=rtsp://127.0.0.1:$RTSP_PORT/cam latency=0 ! rtph264depay ! s.
alsasrc device=hw:CARD=II,DEV=0 ! opusenc bitrate=16000 ! s.
runOnInitRestart: yes
cam2:
source: rpiCamera
rpiCameraCamID: 1
cam2_with_audio:
runOnInit: >
gst-launch-1.0
rtspclientsink name=s location=rtsp://localhost:$RTSP_PORT/cam2_with_audio
rtspsrc location=rtsp://127.0.0.1:$RTSP_PORT/cam latency=0 ! rtph264depay ! s.
alsasrc device=hw:CARD=II,DEV=0 ! opusenc bitrate=16000 ! s.
runOnInitRestart: yes
And get the following error:
ERROR: from element /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: Could not open audio device for recording. Device is being used by another application.
Additional debug info:
../ext/alsa/gstalsasrc.c(785): gst_alsasrc_open (): /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0:
Device 'hw:CARD=II,DEV=0' is busy
Any help wb greatly appreciated, thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions