I'm using ffmpeg
to try to stream a Facebook live, using the concat
function to stream multiple video files, but at the end of the first file, Facebook crashes and does not continue playing the rest of the files. p>
This is my list.txt
file 'media/inicio.mp4'
file '../../video/arquivo01.mp4'
file '../../video/arquivo02.mp4'
file '../../video/arquivo03.mp4'
file 'media/encerramento.mp4'
And I'm using the page below to broadcast:
$chave = "chave-do-facebook";
ffmpeg -f concat -safe 0 -re -i lista.txt -vcodec libx264 -preset veryfast -maxrate 3000k -bufsize 6000k -pix_fmt yuv420p -g 50 -c:a aac -b:a 160k -ac 2 -ar 44100 -f flv "'.$chave.'" 2> log.txt
When you start a transmission in the preview, you can already see the start-up video, but when it finishes, the live hangs and playback does not continue.
When parsing the logs from ffmpeg
, to the end first video the following message appears:
[mov,mp4,m4a,3gp,3g2,mj2 @ 000000000123ef40] Auto-inserting h264_mp4toannexb bitstream filter
[h264 @ 00000000008f08e0] top block unavailable for requested intra mode
[h264 @ 00000000008f08e0] error while decoding MB 34 0
[h264 @ 00000000008f08e0] concealing 3600 DC, 3600 AC, 3600 MV errors in I frame
And then it keeps repeating itself until I close the live:
[h264 @ 00000000008f1740] QP 4294967211 out of range
[h264 @ 00000000008f1740] decode_slice_header error
[h264 @ 00000000008f1740] no frame!
I came to think that the error was in the encoding of the files I made using Sony Vegas, which in this case are inicio.mp4
and encerramento.mp4
, however, I coded them in three different programs and even Youtube and downloaded again, and still still giving the same error.