- #!/bin/sh
- confdir="`dirname "$0"`/../"
- . $confdir/default-config.sh
- if [ -f $confdir/config.sh ]; then
- . $confdir/config.sh
- fi
- VSOURCECAPS="video/x-raw, format=I420, width=640, height=360, pixel-aspect-ratio=1/1, interlace-mode=progressive, framerate=30/1"
- VSOURCE="v4l2src device=/dev/video0 ! $VSOURCECAPS"
- VOVERLAY="clockoverlay halignment=right valignment=top time-format=\"%Y/%m/%d %H:%M:%S\""
- #VOVERLAY="timeoverlay halignment=right valignment=top ! clockoverlay halignment=left valignment=top time-format=\"%Y/%m/%d %H:%M:%S\""
- ASOURCE="audiotestsrc freq=660"
- LOCALWIDTH=$(cat /sys/class/graphics/fb0/virtual_size | cut -d, -f1)
- LOCALHEIGHT=$(cat /sys/class/graphics/fb0/virtual_size | cut -d, -f2)
- LOCALVCAPS="video/x-raw, width=$LOCALWIDTH, height=$LOCALHEIGHT"
- LOCALVTRANSFORM="videoscale ! videoconvert ! $LOCALVCAPS"
- LOCALVSINK="fbdevsink sync=false"
- REMOTEVCAPS="video/x-raw, format=I420, width=$WIDTH, height=$HEIGHT, pixel-aspect-ratio=1/1, interlace-mode=progressive, framerate=$FRAMERATE/1"
- REMOTEVTRANSFORM="videorate ! videoscale ! videoconvert ! $REMOTEVCAPS"
- REMOTEACAPS="audio/x-raw,format=S16LE,channels=$AUDIOCHANNELS,layout=interleaved,rate=$AUDIORATE"
- REMOTEATRANSFORM="$REMOTEACAPS"
- REMOTEMUX="matroskamux streamable=true"
- REMOTESINK="tcpclientsink host=$MIXHOST port=10002"
- gst-launch-1.0 \
- $VSOURCE !\
- $VOVERLAY !\
- tee name=videolayers \
- videolayers. ! queue !\
- $LOCALVTRANSFORM !\
- $LOCALVSINK \
- videolayers. ! queue !\
- $REMOTEVTRANSFORM !\
- remotemux. \
- $ASOURCE !\
- $REMOTEATRANSFORM !\
- remotemux. \
- $REMOTEMUX name=remotemux !\
- $REMOTESINK
|