Just an update that while I fixed the sound quality. I now get lag between the audio and video after an hour or two of streaming to youtube. Here's the command I am using:
The workaround is to kill the libcamera-vid process, wait five seconds then restart the stream. This doesn't change the url for the youtube livestream, just results in a short "hicup". I am using a Pi4B which should have enough power to handle this?
Code:
nohup libcamera-vid -t 0 --width 1920 --height 1080 --bitrate 2000000 --framerate 30 --autofocus-mode default --codec libav --libav-format flv --libav-audio --audio-source alsa --audio-device hw:1,0 --audio-bitrate 192000 --av-sync 200000 -n -o rtmp://a.rtmp.youtube.com/live2/xxxxxxx > /tmp/error.out 2>&1 &
Statistics: Posted by thisisalloneword — Mon May 06, 2024 3:47 pm