A4tech Camera Compatibility Issues

Camera model
a4tech PK-910H 1080p

What is the problem?
Not working at all with Octopi. Works on a macOS so confirmed good

What did you already try to solve it?
Edited octopi.txt
1st try uncommented and set @
camera_usb_options="-r 1920x1080 -f 30"
2nd try uncommented
camera="auto"

Logs (/var/log/webcamd.log, syslog, dmesg, ... no logs, no support)
No logs

Additional information about your setup (OctoPrint version, OctoPi version, ...)
Octoprint 1.5.2 installed via raspberry pi imager.
OctoPi version 0.18.0
Raspberry Pi 4B
Ender 5 Pro

Those logs mentioned in the template would be really helpful here, especially /var/log/webcamd.log.

Otherwise, the best anyone can do is take guesses or ask you for more info.

With that said, is the camera listed if you run v4l2-ctl --list-devices over ssh? Also, please provide your /var/log/webcamd.log.

var/log/webcamd.log says no such directory or file


Here is what I get when I run journalctl -u webcamd

Ok, so it's recognized but mjpg-streamer isn't able to access it for some reason.

According to the manufacturer, it supports MJPEG format, so it should just 'work,' but obviously not...

Does the output of v4l2-ctl --list-formats-ext have MJP(E)G?

It should be something like:

taylor@printerpi:~ $ v4l2-ctl --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
        Type: Video Capture

        [0]: 'MJPG' (Motion-JPEG, compressed)
                Size: Discrete 320x240
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
...
                Size: Discrete 1440x1080
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                Size: Discrete 1920x1080
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
...

If so, is 1920x1080 @ 30fps a listed mode?

1 Like

So you're saying theres a chance? Lol. I appreciate all the help. Yes it's listed under MJPG. Twice actually.

Haha, yeah, it definitely looks like it should work.

If you run sudo systemctl restart webcamd and then go to http://octopi.local/webcam does it work? (substitute your pi's IP for octopi.local if necessary).

If that works, then it's possible that mjpg-streamer started up before the webcam was ready.

1 Like

It's working. Awesome!! Would there be a way for me to ensure the streamer is going before it sends the webcamd cmd?

I'm not familiar enough with exactly how OctoPi starts the service up to answer that, unfortunately.

On my own custom setup, I have the streamer service wait to start until networking is started up (but not necessarily connected), which seems to have the desired effect, but I wouldn't know offhand how/where to do that on the OctoPi setup.

For your situation, it's probably just going to be easier to restart webcamd when it needs it. You can even add it to the system menu in the web UI, and there appears to be a plugin that can help with that too: System Command Editor