-
Notifications
You must be signed in to change notification settings - Fork 0
/
sheet_streamer.scr
82 lines (79 loc) · 3.29 KB
/
sheet_streamer.scr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/bin/sh
H264_DEPAY_9="rtph264depay ! video/x-h264,width=720,height=1280,framerate=30/1"
H264_DECODE_9="nv_omx_h264dec ! video/x-nv-yuv,format=(fourcc)NV12,framerate=30/1,width=720,height=1280"
H264_CONVERT_9="nvvidconv ! video/x-raw-yuv,format=(fourcc)I420,framerate=30/1,width=450,height=800"
H264_DEPAY_10="rtph264depay ! video/x-h264,width=500,height=800,framerate=30/1"
H264_DECODE_10="nv_omx_h264dec ! video/x-nv-yuv,format=(fourcc)NV12,framerate=30/1,width=500,height=800"
H264_CONVERT_10="nvvidconv ! video/x-raw-yuv,format=(fourcc)I420,framerate=30/1,width=500,height=800"
H264_QUEUE="queue leaky=1 max-size-time=25000"
# ! videoflip method=rotate-180 \
DISPLAY=:0 xrandr --output HDMI-0 --mode 1920x1080 --rate 30
sleep 3
# Order : right first, left last
gst-launch-0.10 -e -v \
# Camera 1 - make sure you change your IP address/password/stream source to match your setup.
rtspsrc location=rtsp://root:PASSWORD@192.168.0.112:554/axis-media/media.amp?videocodec=h264 is-live=true \
! $H264_DEPAY_10 \
! $H264_DECODE_10 \
! $H264_CONVERT_10 \
! videobox fill=0 left=-1420 top=-280 border-alpha=0 \
! $H264_QUEUE \
! vmix.sink_4 \
# Camera 2
rtspsrc location=rtsp://root:PASSWORD@192.168.0.142:554/axis-media/media.amp?videocodec=h264 is-live=true \
! $H264_DEPAY_9 \
! $H264_DECODE_9 \
! $H264_CONVERT_9 \
! videobox fill=0 left=-970 top=-280 border-alpha=0 \
! $H264_QUEUE \
! vmix.sink_3 \
# Text file showing player names (yellow team), 4 lines (1 name per line)
filesrc location=/home/ubuntu/upper_right_text.txt \
! txtur. \
# Black background for the text, then show the text with textoverlay
filesrc location="/home/ubuntu/950x280_black.jpg" \
! decodebin \
! nvvidconv \
! imagefreeze \
! textoverlay font-desc="Sans 30px" name=txtur valignment=center deltay=0 shadow=false color=0xffffd700 \
! videobox fill=0 left=-970 border-alpha=0 \
! nvvidconv \
! vmix.sink_6 \
# 20px vertical black border between camera views
filesrc location="/home/ubuntu/20x1080_black.jpg" \
! decodebin \
! nvvidconv \
! imagefreeze \
! videobox fill=0 left=-950 border-alpha=0 \
! nvvidconv \
! vmix.sink_7 \
# Text file showing player names (red team), 4 lines (1 name per line)
filesrc location=/home/ubuntu/lower_left_text.txt \
! txtll. \
# Black background for the text, then show the text with textoverlay
filesrc location="/home/ubuntu/950x280_black.jpg" \
! decodebin \
! nvvidconv \
! imagefreeze \
! textoverlay font-desc="Sans 30px" name=txtll valignment=center deltay=0 shadow=false color=0xffff4500 \
! videobox fill=0 top=-800 border-alpha=0 \
! nvvidconv \
! vmix.sink_5 \
# Camera 3
rtspsrc location=rtsp://root:PASSWORD@192.168.0.132:554/axis-media/media.amp?videocodec=h264 is-live=true \
! $H264_DEPAY_9 \
! $H264_DECODE_9 \
! $H264_CONVERT_9 \
! videobox fill=0 left=-500 border-alpha=0 \
! $H264_QUEUE \
! vmix.sink_2 \
# Camera 4
rtspsrc location=rtsp://root:PASSWORD@192.168.0.122:554/axis-media/media.amp?videocodec=h264 is-live=true \
! $H264_DEPAY_10 \
! $H264_DECODE_10 \
! $H264_CONVERT_10 \
! videobox fill=0 border-alpha=0 \
! $H264_QUEUE \
! vmix.sink_1 \
videomixer name=vmix \
! nv_omx_hdmi_videosink sync=false