here is how you can restream a source video from one RTMP to Facebook live

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
ffmpeg -i "rtmp://yourInputStream.stream" \
-r 30 \
-ar 44100 \
 -s 1280x720 \
 -c:a libfdk_aac -b:a 90k \
 -movflags +faststart \
 -preset veryfast -crf 28 \
 -tune zerolatency \
 -profile:v baseline \
-maxrate 1000k \
-vcodec libx264 \
-bufsize 10000k \
-g 60 \
-max muxing_queue_size 1024 \
-f flv "rtmp://live-api-s.facebook.com:80/rtmp/YOURAPIKEY"

ok lets break this down a bit:

-r is for output framerate

-ar is for audio rate

-s is for scale – i.e. the size of the video

-c:a is for audio encoding – note that this can be replaced by aac on some distribution