Hi,
I am trying to create a Mosaic with 4 live streams.
1 - I have tried OBS on a Windows Machine, but as soon as 1 stream of the 4 stops, that same stream never comes back live again (it does not restart itself).
2 - I have tried using "ffmpeg" on a Ubuntu Server, but with the same outcome, as soon as 1 stream of the 4 stops, that same stream never comes back live again (it does not restart itself).
I have used this command:
ffmpeg -i http://first-stream -i http://second-stream -i http://third-stream -i http://forth-stream -filter_complex "nullsrc=size=1280x720 [base]; [0:v] setpts=PTS-STARTPTS, scale=640x320 [upperleft]; [1:v] setpts=PTS-STARTPTS, scale=640x320 [upperright]; [2:v] setpts=PTS-STARTPTS, scale=640x320 [lowerleft]; [3:v] setpts=PTS-STARTPTS, scale=640x320 [lowerright]; [base][upperleft] overlay=shortest=0 [tmp1]; [tmp1][upperright] overlay=shortest=0:x=640 [tmp2]; [tmp2][lowerleft] overlay=shortest=0:y=320 [tmp3]; [tmp3][lowerright] overlay=shortest=0:x=640:y=320" -c:v libx264 -c:a aac -f flv rtmp://RTPMSERVERIP/live/mosaic
Does anyone can please help me on this one?
Thank you very much
I am trying to create a Mosaic with 4 live streams.
1 - I have tried OBS on a Windows Machine, but as soon as 1 stream of the 4 stops, that same stream never comes back live again (it does not restart itself).
2 - I have tried using "ffmpeg" on a Ubuntu Server, but with the same outcome, as soon as 1 stream of the 4 stops, that same stream never comes back live again (it does not restart itself).
I have used this command:
ffmpeg -i http://first-stream -i http://second-stream -i http://third-stream -i http://forth-stream -filter_complex "nullsrc=size=1280x720 [base]; [0:v] setpts=PTS-STARTPTS, scale=640x320 [upperleft]; [1:v] setpts=PTS-STARTPTS, scale=640x320 [upperright]; [2:v] setpts=PTS-STARTPTS, scale=640x320 [lowerleft]; [3:v] setpts=PTS-STARTPTS, scale=640x320 [lowerright]; [base][upperleft] overlay=shortest=0 [tmp1]; [tmp1][upperright] overlay=shortest=0:x=640 [tmp2]; [tmp2][lowerleft] overlay=shortest=0:y=320 [tmp3]; [tmp3][lowerright] overlay=shortest=0:x=640:y=320" -c:v libx264 -c:a aac -f flv rtmp://RTPMSERVERIP/live/mosaic
Does anyone can please help me on this one?
Thank you very much