Open michaeltoohig opened 4 years ago
You might have found a solution until you asked, but for all others, maybe this woks (i dont stream to fb yet)
application facebook {
live on;
record off;
allow publish all;
# Transcode and push the stream to stunnel for FB Live RMTPS requirements
exec ffmpeg -i rtmp://localhost:1935/facebook/$name
-c:a libfdk_aac -b:a 128k -c:v libx264 -b:v 2500k -f flv -g 30 -r 30 -s 1280x720 -preset superfast -profile:v baseline -f flv rtmp://localhost:1935/fbpush/$name;
}
application fbpush {
live on;
on_publish http://myapi.host.com/fbpush; # response with 303 redirect to rtmp://stunnel:19350/rtmp/dynamic_key
}
There are some issues already about this very question but without an answer spanning back a few years.
929
1190
1459
1397 (the conversation turned into stunnel configuration. which already works for me if I statically place the FB streamkey into the
exec
command.)The
$name
variable does not seem to contain all of the query args included in a Facebook live stream key. Example key1234878994578373?s_bl=4&s_ps=2&s_sw=1&s_vt=api-s&a=ANk-6kdQfURTY3ss
. In the Nginx logs I see the following:This is my
rtmp
application block. If I put the full key in the place of$name
at the end of theexec
call then it does work but there is no dynamic key support.Thank you for clearing this up if possible.