forked from timvideos/gst-switch
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun-demo.sh
executable file
·38 lines (31 loc) · 954 Bytes
/
run-demo.sh
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
#!/bin/bash -ex
# FIXME: Rewrite using the Python API so this is reliable.
VIDEO_CAPS="video/x-raw, format=(string)I420, pixel-aspect-ratio=(fraction)1/1, width=(int)300, height=(int)200, framerate=(fraction)25/1"
AUDIO_CAPS="audio/x-raw, rate=48000, channels=2, format=S16LE, layout=interleaved"
killall gst-switch-srv || true
sleep 2
./tools/gst-switch-srv -f "$VIDEO_CAPS" -r &
sleep 2
./tools/gst-switch-ui &
sleep 2
gst-launch-1.0 audiotestsrc is-live=true \
! audioconvert \
! $AUDIO_CAPS \
! gdppay \
! tcpclientsink port=4000 \
&
gst-launch-1.0 videotestsrc pattern=1 is-live=1 \
! timeoverlay \
! $VIDEO_CAPS \
! gdppay \
! tcpclientsink port=3000 \
&
gst-launch-1.0 videotestsrc pattern=18 is-live=1 \
! timeoverlay \
! $VIDEO_CAPS \
! gdppay \
! tcpclientsink port=3000 \
&
wait
killall gst-switch-srv || true
killall gst-switch-ui || true