I'm trying to send a combined video and audio stream to a crtmpserver. The audio quality isn't as important as having it be low-latency and in sync. I'm close right now with this:
raspivid -t 0 -w 640 -h 480 -fps 20 -b 2000000 -o - | ffmpeg -i - -f alsa -ac 1 -i hw:0,0 -map 0:0 -map 1:0 -vcodec copy -acodec aac -b:a 20k -ar 8000 -strict -2 -f flv -metadata streamName=myStream tcp://192.168.1.20:6666
Is there a way to improve upon this to fix the sync/latency issues? Is the RPi capable of streaming audio and video together?