-
-
Save denpamusic/f18e77f176700672a8ef701963cea6b7 to your computer and use it in GitHub Desktop.
Grid/mosaic view RTSP streams with ffmpeg based on https://trac.ffmpeg.org/wiki/Create%20a%20mosaic%20out%20of%20several%20input%20videos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -rtsp_transport tcp \ | |
-i rtsp://smartiptv:[email protected]:6911/Streaming/Channels/101 \ | |
-i rtsp://smartiptv:[email protected]:6911/Streaming/Channels/201 \ | |
-i rtsp://smartiptv:[email protected]:6911/Streaming/Channels/301 \ | |
-i rtsp://smartiptv:[email protected]:6911/Streaming/Channels/401 \ | |
-filter_complex " | |
nullsrc=size=1920x1080 [base]; | |
[0:v] setpts=PTS-STARTPTS, scale=960x540 [upperleft]; | |
[1:v] setpts=PTS-STARTPTS, scale=960x540 [upperright]; | |
[2:v] setpts=PTS-STARTPTS, scale=960x540 [lowerleft]; | |
[3:v] setpts=PTS-STARTPTS, scale=960x540 [lowerright]; | |
[base][upperleft] overlay=shortest=1 [tmp1]; | |
[tmp1][upperright] overlay=shortest=1:x=960 [tmp2]; | |
[tmp2][lowerleft] overlay=shortest=1:y=540 [tmp3]; | |
[tmp3][lowerright] overlay=shortest=1:x=960:y=540 | |
" \ | |
-c:v libx264 -preset superfast -crf 18 -f matroska - | ffplay - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment