Facebook live video can only be watched with Mac screen streaming

I use the following ffmpeg command to share streaming video on Facebook.

enter image description here

ffmpeg -f avfoundation -r 10 -video_size 352x288 -i "0" -c:v h264 -f flv "rtmp://rtmp-api.facebook.com:80/rtmp/1269140699772419?ds=1&a=AaYsXcYcdHQrrrUF" 

then i see the video preview scenes enter image description here

however, as soon as I click on the β€œGo Live” button and go to my facebook page, I can find a message that says I'm alive now. When I press the play button, there are only black scenes lasting for 1 ~ 2 seconds and the video ends.

enter image description here

And there is also a strange thing, the video can be played when I finish the live broadcast. When you refresh the page, I can find a message saying that I am Live, a video of this message can be successfully played.

Does anyone know why video can be previewed and previewed in real time, but not in real time?

[updated]

During a live broadcast, if I press the play button, there are only 1 ~ 2 seconds black scenes, and the live broadcast ends. enter image description here

However, if I press the video cassette again, another modal view appears, then I see a live broadcast. Is this a bug on facebook? enter image description here

+5
source share
2 answers

I also ran into the same problem. In my case, I looped around the images to make a video and transfer it to facebook without sending an audio stream.

In accordance with the guidelines of facebook, streams of real-time video must contain an audio stream in it, otherwise the real-time video is considered complete.

Make sure the input file that you transfer to fb contains an audio stream. If it does not have an audio stream, you can use any other audio stream with it, and then you can see your video live after pressing the live button.

ffmpeg -loop 1 -re -y -f image2 -i "image_path" -i "silent_audio_or_any_other_audio" -codec:a aac -ac 1 -ar 44100 -b:a 128k -pix_fmt yuv420p -profile:v high -s 1280x720 -vb 400k -maxrate 400k -minrate 400k -bufsize 600k -deinterlace -vcodec libx264 -preset veryfast -g 30 -r 30 -strict -2 -f flv "rtmp_link"

I still use this code and it works great for me :)

Hope this can help someone.

+1
source

When you watch a video in real time, see the Chrome dashboard if there is anything there. There may be some warnings or errors why the video does not go through. I had the same problem when working with WebRTC via wss.

Another thing to try for the ffmpeg command: add: -c:v libx264 -profile:v baseline -level 3.1 -pix_fmt yuv420p

: ffmpeg -f avfoundation -r 10 -i "0" -c:v libx264 -profile:v baseline -level 3.1 -pix_fmt yuv420p -f flv "rtmp://rtmp-api.facebook.com:80/rtmp/1269140699772419?ds=1&a=AaYsXcYcdHQrrrUF"

You can see the video after a live event, when it is encoded, and it can be viewed in a browser and verified. For live broadcasts, only copying occurs and you play with the ffmpeg arguments to make it visible on this page.

+3
source

All Articles