When I run this like this, it works:
ffmpeg -re -y -i /home/video.webm -ss 2 \
-i /home/audio.ogg -map 0:0 -map 1:0 \
-c:v libx264 -preset veryfast -b:v 3000k -maxrate 3000k \
-bufsize 6000k -pix_fmt yuv420p -g 50 -c:a aac -b:a 160k -ac 2 -ar 44100 -async 1 \
-f flv "rtmps://live-api-s.facebook.com:443/rtmp/xxx"
However, when I introduce a variable I have a problem:
STREAM=-f flv \"rtmps://live-api-s.facebook.com:443/rtmp/xxx\"
ffmpeg -re -y -i /home/video.webm -ss 2 \
-i /home/audio.ogg -map 0:0 -map 1:0 \
-c:v libx264 -preset veryfast -b:v 3000k -maxrate 3000k \
-bufsize 6000k -pix_fmt yuv420p -g 50 -c:a aac -b:a 160k -ac 2 -ar 44100 -async 1 \
$STREAM
When I run this, I get:
At least one output file must be specified
I've tried a number of different ways of doing this, but they all have errors.