Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- source $(dirname $_)/vars
- ${FFMPEG} \
- -i <(ffmpeg -i "rtsp://${HOST}:554/user=${USER}&password=${PASS}&channel=1&stream=0.sdp" -c:v rawvideo -c:a copy -ac 1 -f nut -) \
- -i <(ffmpeg -i "rtsp://${HOST}:554/user=${USER}&password=${PASS}&channel=2&stream=0.sdp" -c:v rawvideo -f nut -) \
- -i <(ffmpeg -i "rtsp://${HOST}:554/user=${USER}&password=${PASS}&channel=3&stream=0.sdp" -c:v rawvideo -f nut -) \
- -i <(ffmpeg -i "rtsp://${HOST}:554/user=${USER}&password=${PASS}&channel=4&stream=0.sdp" -c:v rawvideo -f nut -) \
- -i <(ffmpeg -i "rtsp://${HOST}:554/user=${USER}&password=${PASS}&channel=5&stream=0.sdp" -c:v rawvideo -f nut -) \
- -i <(ffmpeg -i "rtsp://${HOST}:554/user=${USER}&password=${PASS}&channel=6&stream=0.sdp" -c:v rawvideo -f nut -) \
- -map 0:a:0 \
- -filter_complex "
- color=black:s=960x480 [base]; \
- [0:v] setpts=PTS-STARTPTS, scale=320x240 [cam1]; \
- [1:v] setpts=PTS-STARTPTS, scale=320x240 [cam2]; \
- [2:v] setpts=PTS-STARTPTS, scale=320x240 [cam3]; \
- [3:v] setpts=PTS-STARTPTS, scale=320x240 [cam4]; \
- [4:v] setpts=PTS-STARTPTS, scale=320x240 [cam5]; \
- [5:v] setpts=PTS-STARTPTS, scale=320x240 [cam6]; \
- [base][cam1] overlay=shortest=1:x=0:y=0 [tmp1]; \
- [tmp1][cam2] overlay=shortest=1:x=320:y=0 [tmp2]; \
- [tmp2][cam3] overlay=shortest=1:x=640:y=0 [tmp3]; \
- [tmp3][cam4] overlay=shortest=1:x=0:y=240 [tmp4]; \
- [tmp4][cam5] overlay=shortest=1:x=320:y=240 [tmp5]; \
- [tmp5][cam6] overlay=shortest=1:x=640:y=240 \
- " \
- -c:v rawvideo -c:a copy -ac 1 -f nut - | ${MPV} -
- reset
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement