]> git.parisson.com Git - telecaster-server.git/commitdiff
fix loop
authorGuillaume Pellerin <guillaume.pellerin@free.fr>
Wed, 31 Jan 2024 21:22:44 +0000 (22:22 +0100)
committerGuillaume Pellerin <guillaume.pellerin@free.fr>
Wed, 31 Jan 2024 21:22:44 +0000 (22:22 +0100)
bin/streaming/tc_video_simple_webm_stream-gst1.sh

index 691ef00b82b75ca14eac9b48b5ffd963dbbf87b2..26d36feccad56f9b9b2b08a6d0186b46bcdb5d65 100755 (executable)
@@ -6,15 +6,6 @@ set -e
 
 source /etc/telecaster/telecaster.conf
 
-# V4L2 setup
-if [ ! -z "${V4L2_ZOOM-}" ]; then
-v4l2-ctl -d $ID -c power_line_frequency=1
-v4l2-ctl -d $ID -c zoom_absolute=$V4L2_ZOOM
-v4l2-ctl -d $ID -c focus_auto=0
-v4l2-ctl -d $ID -c focus_absolute=1
-v4l2-ctl -d $ID -c sharpness=$V4L2_SHARPNESS
-fi
-
 # GST launch
 if [ -z "${V4L2_ID_1-}" ]; then
        V4L2_IDS=(V4L2_ID, $V4L2_ID_1)
@@ -24,6 +15,15 @@ fi
 
 for ID in ${V4L2_ID[@]}; do
 
+# V4L2 setup
+if [ ! -z "${V4L2_ZOOM-}" ]; then
+v4l2-ctl -d $ID -c power_line_frequency=1
+v4l2-ctl -d $ID -c zoom_absolute=$V4L2_ZOOM
+v4l2-ctl -d $ID -c focus_auto=0
+v4l2-ctl -d $ID -c focus_absolute=1
+v4l2-ctl -d $ID -c sharpness=$V4L2_SHARPNESS
+fi
+
 gst-launch-1.0 v4l2src device=/dev/video$ID ! $V4L2_FORMAT, width=$VIDEO_WIDTH, height=$VIDEO_HEIGHT, framerate=$VIDEO_FRAMERATE/1  \
        ! queue ! $V4L2_DEC \
        ! queue ! videoflip method=$VIDEO_FLIP \