You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That's because the way that the mjpg launch command gets formatted is just wrong. I don't know what happened there but there was a commit (#245) that tried to fix this, which was reverted. One must launch a mjpg streamer instance for each camera device. I use this code which copies the unaccepted pull request
(mjpg-streamer/run)
#!/usr/bin/with-contenv bash# Check if the deprecated environment variable MJPEG_STREAMER_INPUT is setif [ -n"$MJPEG_STREAMER_INPUT" ];thenecho"Deprecation warning: the environment variable '$MJPEG_STREAMER_INPUT' was renamed to '$MJPG_STREAMER_INPUT'"
MJPG_STREAMER_INPUT=$MJPEG_STREAMER_INPUTfi# Ensure MJPG_STREAMER_INPUT contains a valid entryif!echo"$MJPG_STREAMER_INPUT"| grep -q "..so.";then
MJPG_STREAMER_INPUT="input_uvc.so $MJPG_STREAMER_INPUT"fi# Split the CAMERA_DEV variable into an array of devices
IFS=','read -ra CAMERA_DEVS <<<"$CAMERA_DEV"
PORT=8080 # Initial port# Start mjpg_streamer for each cameraforCAMERAin${CAMERA_DEVS[*]};doecho"Starting mjpg_streamer for camera ${CAMERA} on port ${PORT}"
mjpg_streamer -i "/usr/local/lib/mjpg-streamer/${MJPG_STREAMER_INPUT} -d ${CAMERA}" \
-o "/usr/local/lib/mjpg-streamer/output_http.so -w /usr/local/share/mjpg-streamer/www -p ${PORT}"&
PORT=$((PORT +1))# Increment the port for the next cameradone# Wait for all background processes to completewait
Describe the bug
Multiple webcams do not work when the CAMERA_DEV variable contains more than 1 entry
Container Details
2024-06-18T08:11:07.371Z
To Reproduce
Steps to reproduce the behavior:
Expected behavior
multiple camera streams are created
Additional context
docker compose file
I see this in the logs
The text was updated successfully, but these errors were encountered: