Raspberry Pi 4 trying to stream live to youtube using an external USB mic and the raspberry camera.

The audio slowly gets out of sync (ahead of the video). Here is my command. Any suggestions on tweaks to keep the audio in sync?

/usr/bin/raspivid -md 4 -w 1280 -h 720 --preview 10,8,780,500 --opacity 85 -fps 15 -t 0 -b 4000000 -g 30 -o - |  ffmpeg -hide_banner -loglevel panic -nostats -y -xerror -thread_queue_size 32K -f h264 -r 15 -itsoffset 0 -i - -f alsa -ar 11025 -itsoffset 5.5 -async 1 -ac 1 -thread_queue_size 32K -i hw:2,0 -c:a aac -b:a 32k -async 1  -c:v copy  -f flv -flags:v +global_header -rtmp_buffer 10000 -r 15 -async 1 rtmp://a.rtmp.youtube.com/live2/$stream_key &
  • 1
    Think it may be settings now 'allowed' by Google in the new version of the control room support.google.com/youtube/answer/2853702?hl=en If your old stream settings have been migrated YT can get a bit 'lost' when it does the conversion on the fly. A couple of the streams I watch had to delete everything and set up again matching their settings to Google. Sorry it's very waffle as an answer - I do not stream and going on the issues a few channels had. – user115418 Nov 16 '20 at 0:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.