|
@@ -1,10 +1,13 @@
|
|
|
#!/bin/bash
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [ $# -lt 1 ]; then
|
|
if [ $# -lt 1 ]; then
|
|
|
- echo "1/2 arg, target host (120,151?) [trat]"
|
|
|
|
|
|
|
+ echo "1/2 arg, target host (120,151?) [options]"
|
|
|
|
|
+ echo "where options is a set of {proj,trat}"
|
|
|
exit 1
|
|
exit 1
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
|
|
+HOST="$1"
|
|
|
|
|
+shift
|
|
|
set -e
|
|
set -e
|
|
|
|
|
|
|
|
fps=24
|
|
fps=24
|
|
@@ -17,31 +20,30 @@ h=972
|
|
|
w=800
|
|
w=800
|
|
|
h=600
|
|
h=600
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-roi="0,0,1,1"
|
|
|
|
|
roi="roi-x=0.00 roi-y=0 roi-w=1.00 roi-h=1.00"
|
|
roi="roi-x=0.00 roi-y=0 roi-w=1.00 roi-h=1.00"
|
|
|
|
|
|
|
|
-roitrat="0.35,0,0.65,0.65"
|
|
|
|
|
-roitrat="roi-x=0.35 roi-y=0 roi-w=0.65 roi-h=0.65"
|
|
|
|
|
-roitrat="roi-x=0.25 roi-y=0 roi-w=0.75 roi-h=0.75"
|
|
|
|
|
-
|
|
|
|
|
novideo="-n"
|
|
novideo="-n"
|
|
|
-preview=0
|
|
|
|
|
-if [ $# -eq 2 ]; then
|
|
|
|
|
- novideo=""
|
|
|
|
|
- preview=1
|
|
|
|
|
- roi=$roitrat
|
|
|
|
|
-fi
|
|
|
|
|
|
|
+PREVIEW=""
|
|
|
|
|
+
|
|
|
|
|
+while [ $# -gt 0 ]; do
|
|
|
|
|
+ if [ "$1" == "proj" ]; then
|
|
|
|
|
+ echo "proj!"
|
|
|
|
|
+ novideo=""
|
|
|
|
|
+ PREVIEW="preview=1 preview-encoded=0"
|
|
|
|
|
+ fi
|
|
|
|
|
+ if [ "$1" == "trat" ]; then
|
|
|
|
|
+ echo "trat!"
|
|
|
|
|
+ roitrat="roi-x=0.35 roi-y=0 roi-w=0.65 roi-h=0.65"
|
|
|
|
|
+ roitrat="roi-x=0.25 roi-y=0 roi-w=0.75 roi-h=0.75"
|
|
|
|
|
+ roi=$roitrat
|
|
|
|
|
+ fi
|
|
|
|
|
+ shift
|
|
|
|
|
+done
|
|
|
|
|
|
|
|
-#set -x
|
|
|
|
|
#raspivid $novideo -roi $roi -vs -ih -rot 125 -pf high -t 0 -awb fluorescent --brightness 55 -w $w -h $h -fps $fps -g $gop -qp $qp -o - |
|
|
#raspivid $novideo -roi $roi -vs -ih -rot 125 -pf high -t 0 -awb fluorescent --brightness 55 -w $w -h $h -fps $fps -g $gop -qp $qp -o - |
|
|
|
# gst-launch-1.0 -v -e fdsrc do-timestamp=1 ! h264parse ! rtph264pay config-interval=10 pt=96 ! udpsink host=$1 port=5000
|
|
# gst-launch-1.0 -v -e fdsrc do-timestamp=1 ! h264parse ! rtph264pay config-interval=10 pt=96 ! udpsink host=$1 port=5000
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-#exit 1
|
|
|
|
|
-
|
|
|
|
|
-#THIS WORKS
|
|
|
|
|
-
|
|
|
|
|
FORMAT="video/x-h264, width=$w, height=$h, framerate=24/1, profile=high"
|
|
FORMAT="video/x-h264, width=$w, height=$h, framerate=24/1, profile=high"
|
|
|
-echo gst-launch-1.0 rpicamsrc rotation=90 preview=$preview $roi bitrate=2000000 ! queue ! $FORMAT ! h264parse ! rtph264pay config-interval=1 ! udpsink host=$1 port=5000
|
|
|
|
|
- gst-launch-1.0 rpicamsrc rotation=90 preview=$preview $roi bitrate=2000000 ! queue ! $FORMAT ! h264parse ! rtph264pay config-interval=1 ! udpsink host=$1 port=5000
|
|
|
|
|
|
|
+#annotation-mode=0x8
|
|
|
|
|
+echo gst-launch-1.0 rpicamsrc rotation=90 $PREVIEW $roi bitrate=2000000 do-timestamp=true ! queue ! $FORMAT ! h264parse ! rtph264pay config-interval=1 ! udpsink host=$HOST port=5000
|
|
|
|
|
+ gst-launch-1.0 rpicamsrc rotation=90 $PREVIEW $roi bitrate=2000000 do-timestamp=true ! queue ! $FORMAT ! h264parse ! rtph264pay config-interval=1 ! udpsink host=$HOST port=5000
|