fix(ustreamer.sh): fixes duplicate format setting

mjpg detection adds format twice if device is a raspicam.

Signed-off-by: Stephan Wendel <me@stephanwe.de>
This commit is contained in:
Stephan Wendel 2022-09-04 11:30:32 +02:00
parent e2680909ab
commit aab54f8ab2
No known key found for this signature in database
GPG Key ID: F465B83ACBA45639

View File

@ -40,12 +40,12 @@ function run_ustreamer {
start_param+=( -m MJPEG --device-timeout=5 --buffers=3 )
else
start_param+=( -d "${dev}" --device-timeout=2 )
# Use MJPEG Hardware encoder if possible
if [ "$(detect_mjpeg "${cam_sec}")" = "1" ]; then
start_param+=( -m MJPEG --encoder=HW )
fi
fi
start_param+=( -r "${res}" -f "${fps}" )
# Use MJPEG Hardware encoder if possible
if [ "$(detect_mjpeg "${cam_sec}")" = "1" ]; then
start_param+=( -m MJPEG --encoder=HW )
fi
# webroot & allow crossdomain requests
start_param+=( --allow-origin=\* --static "${BASE_CN_PATH}/ustreamer-www" )
# Custom Flag Handling (append to defaults)