Advertisement
Guest User

Untitled

a guest
Dec 20th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. source $(dirname $_)/vars
  4.  
  5. ${FFMPEG} \
  6. -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 -) \
  7. -i <(ffmpeg -i "rtsp://${HOST}:554/user=${USER}&password=${PASS}&channel=2&stream=0.sdp" -c:v rawvideo -f nut -) \
  8. -i <(ffmpeg -i "rtsp://${HOST}:554/user=${USER}&password=${PASS}&channel=3&stream=0.sdp" -c:v rawvideo -f nut -) \
  9. -i <(ffmpeg -i "rtsp://${HOST}:554/user=${USER}&password=${PASS}&channel=4&stream=0.sdp" -c:v rawvideo -f nut -) \
  10. -i <(ffmpeg -i "rtsp://${HOST}:554/user=${USER}&password=${PASS}&channel=5&stream=0.sdp" -c:v rawvideo -f nut -) \
  11. -i <(ffmpeg -i "rtsp://${HOST}:554/user=${USER}&password=${PASS}&channel=6&stream=0.sdp" -c:v rawvideo -f nut -) \
  12. -map 0:a:0 \
  13. -filter_complex "
  14. color=black:s=960x480 [base]; \
  15. [0:v] setpts=PTS-STARTPTS, scale=320x240 [cam1]; \
  16. [1:v] setpts=PTS-STARTPTS, scale=320x240 [cam2]; \
  17. [2:v] setpts=PTS-STARTPTS, scale=320x240 [cam3]; \
  18. [3:v] setpts=PTS-STARTPTS, scale=320x240 [cam4]; \
  19. [4:v] setpts=PTS-STARTPTS, scale=320x240 [cam5]; \
  20. [5:v] setpts=PTS-STARTPTS, scale=320x240 [cam6]; \
  21. [base][cam1] overlay=shortest=1:x=0:y=0 [tmp1]; \
  22. [tmp1][cam2] overlay=shortest=1:x=320:y=0 [tmp2]; \
  23. [tmp2][cam3] overlay=shortest=1:x=640:y=0 [tmp3]; \
  24. [tmp3][cam4] overlay=shortest=1:x=0:y=240 [tmp4]; \
  25. [tmp4][cam5] overlay=shortest=1:x=320:y=240 [tmp5]; \
  26. [tmp5][cam6] overlay=shortest=1:x=640:y=240 \
  27. " \
  28. -c:v rawvideo -c:a copy -ac 1 -f nut - | ${MPV} -
  29.  
  30. reset
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement