David пре 10 година
родитељ
комит
e6a6b222bf
1 измењених фајлова са 7 додато и 5 уклоњено
  1. 7 5
      camera1/cam-to-udp.sh

+ 7 - 5
camera1/cam-to-udp.sh

@@ -6,8 +6,9 @@ if [ $# -lt 1 ]; then
 	exit 1
 fi
 
-HOST="$1"
-shift
+#HOST="$1"
+HOST="224.1.1.1"
+#shift
 set -e
 
 fps=24
@@ -33,8 +34,8 @@ while [ $# -gt 0 ]; do
 	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"
+		roitrat="roi-x=0.35 roi-y=0 roi-w=0.65 roi-h=0.65"
 		roi=$roitrat
 	fi
 	shift
@@ -45,5 +46,6 @@ done
 
 FORMAT="video/x-h264, width=$w, height=$h, framerate=24/1, profile=high"
 #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
+rotation=180
+echo gst-launch-1.0 rpicamsrc rotation=$rotation $PREVIEW $roi bitrate=2000000 do-timestamp=true ! queue ! $FORMAT ! h264parse ! rtph264pay config-interval=1 ! udpsink host=$HOST auto-multicast=true port=5000
+     gst-launch-1.0 rpicamsrc rotation=$rotation $PREVIEW $roi bitrate=2000000 do-timestamp=true ! queue ! $FORMAT ! h264parse ! rtph264pay config-interval=1 ! udpsink host=$HOST auto-multicast=true port=5000