Nono
Nono

Reputation: 43

Combine video and audio stream with go2rtc

I have a Raspberry Pi with a camera module and a I2S MEMS microphone. On this raspberry Pi, I am running go2rtc.

On my Pi, I have 3 streams: one video only, one audio only (both work fine) and a third that combine both... or at least that's what I want to do. Unfortunately when I open the 3rd stream on the web UI, I get stuck on 'loading'.

Here is my config:

streams:  
 picam:  
   - "exec:rpicam-vid -t 0 --inline -o -#rtsp=8554/picam#ffmpeg=v4l2,format=h264,preset=ultrafast,tune=zerolatency,g=15,b:v=3500k,flags=nobuffer,rtsp_transport=tcp,analyzeduration=0,probesize=32,fps_mode=cfr"  
 audio:  
   - "exec:arecord -D plughw:2 -f S16_LE -r 48000 -c 1 -#rtsp=8554/audio#ffmpeg=format=s16le,acodec=pcm_s16le,ar=48000,ac=1,rtsp_transport=tcp"  
 picam_audio:  
   - "exec:ffmpeg -loglevel debug -rtsp\_transport tcp -i rtsp://localhost:8554/picam -rtsp\_transport tcp -i rtsp://localhost:8554/audio -c:v copy -c:a aac -strict experimental -f rtsp -rtsp\_transport tcp rtsp://localhost:8554/picam_audio"

webrtc:  
 listen: :1984  
 candidates:  
   - stun:stun.l.google.com:19302

rtsp:  
 listen: :8554

Upvotes: 0

Views: 148

Answers (0)

Related Questions