Created
July 7, 2023 14:23
-
-
Save SynAckFin/aeaa405b48becf1e83914e697ab63777 to your computer and use it in GitHub Desktop.
Video wall script using gstreamer
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 | |
# | |
# Basic gstreamer quad video wall viewer | |
# Displays 4 videos. | |
WIDTH=640 | |
HEIGHT=480 | |
((HW=WIDTH/2)) | |
((HH=HEIGHT/2)) | |
# SRC0="uridecodebin uri=rtsp://user:[email protected]/Stream1" | |
# SRC3="uridecodebin uri=rtsp://user:[email protected]/Stream1" | |
# SRC1="uridecodebin uri=rtsp://user:[email protected]/Stream1" | |
# SRC2="uridecodebin uri=rtsp://user:[email protected]/Stream1" | |
SRC0="videotestsrc is-live=true pattern=1" | |
SRC1="videotestsrc is-live=true pattern=11" | |
SRC2="videotestsrc is-live=true pattern=18" | |
SRC3="videotestsrc is-live=true pattern=0" | |
SINK="videoscale ! video/x-raw,width=$WIDTH,height=$HEIGHT ! xvimagesink sync=true" | |
gst-launch-1.0 compositor name=mix \ | |
sink_0::xpos=0 sink_0::ypos=0 sink_0::width=$HW sink_0::height=$HH \ | |
sink_1::xpos=$HW sink_1::ypos=0 sink_1::width=$HW sink_1::height=$HH \ | |
sink_2::xpos=0 sink_2::ypos=$HH sink_2::width=$HW sink_2::height=$HH \ | |
sink_3::xpos=$HW sink_3::ypos=$HH sink_3::width=$HW sink_3::height=$HH \ | |
! $SINK \ | |
$SRC0 ! mix. \ | |
$SRC1 ! mix. \ | |
$SRC2 ! mix. \ | |
$SRC3 ! mix. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment