Hello,
The YouTube live stream doesn't start automatically after posting.
The log after posting is as follows:
[8-Mar-2022 15:39:30 UTC] Found URLs in post: Array
(
[0] => https://www.youtube.com/watch?v=IUX1GNpdilA
)
<br/>^M
[8-Mar-2022 15:39:31 UTC] Found video URLs in post: Array
(
[xmlsbIUX1GNpdilA] => /var/www/html/wp-content/uploads/2022/03/youtubetempupload6226fa2389eca.mp4
)
<br/>^M
[8-Mar-2022 15:39:31 UTC] Starting streaming for file /var/www/html/wp-content/uploads/2022/03/youtubetempupload6226fa2389eca.mp4 ffmpeg params: /usr/bin/ffmpeg -re -i /var/www/html/wp-content/uploads/2022/03/youtubetempupload6226fa2389eca.mp4 -codec:a aac -ar 44100 -b:a 128k -pix_fmt yuv420p -profile:v baseline -bufsize 6000k -vb 2048k -strict -2 -vcodec libx264 -preset ultrafast -g 60 -r 30 -loglevel error -maxrate 4500k -minrate 3000k -f flv "rtmp://a.rtmp.youtube.com/live2/***********" 2>&1<br/>^M
[8-Mar-2022 15:39:31 UTC] Streaming to live websites started: https://mydomain/?mlsb_cronjob=1&mlsb_key=******** - video path: /var/www/html/wp-content/uploads/2022/03/youtubetempupload6226fa2389eca.mp4 - ffmpegcomm: /usr/bin/ffmpeg -re -i /var/www/html/wp-content/uploads/2022/03/youtubetempupload6226fa2389eca.mp4 -codec:a aac -ar 44100 -b:a 128k -pix_fmt yuv420p -profile:v baseline -bufsize 6000k -vb 2048k -strict -2 -vcodec libx264 -preset ultrafast -g 60 -r 30 -loglevel error -maxrate 4500k -minrate 3000k -f flv "rtmp://a.rtmp.youtube.com/live2/************" 2>&1<br/>^M
If I move to the url recorded in the log(https://mydomain/?mlsb_cronjob=1&mlsb_key=*****) with web browser manually, the live stream starts immediately. After a certain period of time, the live stream ends and the log below is appended.
[8-Mar-2022 15:40:09 UTC] Sending command to ffmpeg (1): /usr/bin/ffmpeg -re -i /var/www/html/wp-content/uploads/2022/03/youtubetempupload6226fa2389eca.mp4 -codec:a aac -ar 44100 -b:a 128k -pix_fmt yuv420p -profile:v baseline -bufsize 6000k -vb 2048k -strict -2 -vcodec libx264 -preset ultrafast -g 60 -r 30 -loglevel error -maxrate 4500k -minrate 3000k -f flv "rtmp://a.rtmp.youtube.com/live2/***********" 2>&1<br/>^M
[8-Mar-2022 15:41:12 UTC] Streaming finished (1): <br/>^M
Why is the live stream not starting automatically?