Created
August 5, 2025 14:19
-
-
Save neontuna/d1ba0c771aa89c42910f21c0aae628b8 to your computer and use it in GitHub Desktop.
bash script ffmpeg rtsp monitor
This file contains hidden or 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
| #!/bin/bash | |
| ffmpeg -rtsp_transport tcp \ | |
| -i 'rtsp://camera-1' \ | |
| -i 'rtsp://camera-2' \ | |
| -i 'rtsp://camera-3' \ | |
| -filter_complex " | |
| color=s=1920x1080:c=black [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]; | |
| [base][upperleft] overlay=shortest=1 [tmp1]; | |
| [tmp1][upperright] overlay=shortest=1:x=960 [tmp2]; | |
| [tmp2][lowerleft] overlay=shortest=1:y=540 | |
| " \ | |
| -c:v libx264 -preset superfast -crf 18 -f matroska - | ffplay -fs -an - |
Author
neontuna
commented
Aug 5, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment