Yes, FFmpeg is rather twitchy with audio syncing. It used to desync for me too, but nowadays that happens pretty rarely, though I have no idea why it has been working like it should.
If the desyncs happen rarely and not immediately, you can always restart the stream and see if that fixes it. It's not a perfect or clean solution, but it might be worth trying before we find a good and stable solution to the problem.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My stream audio is out of sync. I've read up on a couple of forums and found a couple of apparent solutions regarding the ffmpeg script:
Changing -ar 44100 to -a 44100
Setting FPS on output rather than input
Can't confirm these are fixes, but there's certainly an issue.
Yes, FFmpeg is rather twitchy with audio syncing. It used to desync for me too, but nowadays that happens pretty rarely, though I have no idea why it has been working like it should.
On my laptop with Manjaro it does desync however, so I might test some of those solutions you got and see if that fixes anything. Also one guy sent this to me over IRC for another guy's SSR problems, might be applicable to Castawesome too: http://www.maartenbaert.be/simplescreenrecorder/troubleshooting/#slowed-down-out-of-sync-audio-when-recording-the-speakers-with-pulseaudio
If the desyncs happen rarely and not immediately, you can always restart the stream and see if that fixes it. It's not a perfect or clean solution, but it might be worth trying before we find a good and stable solution to the problem.