jacksonliam / mjpg-streamer

Fork of http://sourceforge.net/projects/mjpg-streamer/
2.96k stars 1.21k forks source link

V4L2 device.: (null) when starting on boot as a service #366

Closed SaintTaint closed 1 year ago

SaintTaint commented 1 year ago

Currently setting up Octoprint on a Jetson Nano, using a USB webcam on /dev/video1. Mjpg-streamer runs fine if i start it from the terminal with this command:
./mjpg_streamer`` -i "input_uvc.so -d /dev/video1" -o "output_http.so"

When the same command runs from an init.d startup script, mjpg-streamer returns: MJPG-streamer [4003]: Using V4L2 device.: (null)

When run from the terminal, "Using V4L2 device" returns /dev/video1 like it should.

I'm very confused. Any ideas?

jacksonliam commented 1 year ago

This is not an mjpg-streamer issue. As you said it works when running it from the terminal.

This is likely due to the user the startup script is running under not having permissions to access the /dev/video1 device. I think it has to be a member of the video group. Try finding out which user is running the init script and add it to the video group.

SaintTaint commented 1 year ago

Thank you. I'll try it out and get back to you.

On Fri, Oct 14, 2022 at 10:12 AM jacksonliam @.***> wrote:

This is not an mjpg-streamer issue. As you said it works when running it from the terminal.

This is likely due to the user the startup script is running under not having permissions to access the /dev/video1 device. I think it has to be a member of the video group. Try finding out which user is running the init script and add it to the video group.

— Reply to this email directly, view it on GitHub https://github.com/jacksonliam/mjpg-streamer/issues/366#issuecomment-1279064900, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANEZUSO624KXQHYV7MWLCRLWDFS5FANCNFSM6AAAAAARETDKWI . You are receiving this because you authored the thread.Message ID: @.***>