boltgolt / howdy

🛡️ Windows Hello™ style facial authentication for Linux
MIT License
5.71k stars 297 forks source link

Lenovo 510 FHD Webcam IR Emitter #699

Open juneidy opened 2 years ago

juneidy commented 2 years ago

Hi there, first of all, I'd like to thank you for creating such an awesome linux application.

I have some slight issue with my IR emitter, specifically the Lenovo 510 FHD Webcam

I started configuring the IR emitter by using linux-enable-ir-emitter:

$ sudo linux-enable-ir-emitter -V
linux-enable-ir-emitter 4.2.1
Developped by Maxime Dirksen - EmixamPP
MIT License

$ sudo linux-enable-ir-emitter -d /dev/video4 configure
INFO: Ensure to not use the camera during the execution.
INFO: Warning to do not kill the process !
Is the ir emitter flashing (not just turn on) ? Yes/No ? Yes
ERROR: Your emiter is already working, skipping the configuration.
ERROR: The configuration has failed.
INFO: Do not hesitate to visit the GitHub ! https://github.com/EmixamPP/linux-enable-ir-emitter/wiki

And it would seemed that my IR was working fine because it was flashing.

However, running the gstreamer test failed immediately:

$ sudo gst-launch-1.0 v4l2src device=/dev/video4 num-buffers=10 ! image/jpeg ! multifilesink location="frame-%02d.jpg"
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
../gstreamer/subprojects/gstreamer/libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Execution ended after 0:00:00.000055762
Setting pipeline to NULL ...
Freeing pipeline ...

MPV seems to give blank feed. I can see that the webcam light is on, but the IR emitter is not flashing.

$ mpv av://v4l2:/dev/video4 --profile=low-latency --untimed
 (+) Video --vid=1 (rawvideo 640x480 30.000fps)
[autoconvert] Converting yuyv422 -> yuv422p
VO: [gpu] 640x480 yuv422p
V: 03:23:58 / 03:23:58 (100%)
[ffmpeg/demuxer] video4linux2,v4l2: Some buffers are still owned by the caller on close.
[ffmpeg] ioctl(VIDIOC_QBUF): Bad file descriptor

Running howdy test seems to yield the same result, blank feed.

$ sudo howdy test

Opening a window with a test feed

Press ctrl+C in this terminal to quit
Click on the image to enable or disable slow mode

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'

Closing window

See 2022-08-13-181829_640x528_scrot

Running howdy snapshot also yield the same blank feed:

$ sudo howdy snapshot
[sudo] password for juneidy:
Generated snapshot saved as
/usr/lib/security/howdy/snapshots/20220813T102051.jpg

See 20220813T102051

The only thing I've changed in my config file is device_path = /dev/video4


I've searched for similar issues already, and my issue has not been reported yet.

Linux distribution (if applicable): Arch Linux

Howdy version (sudo howdy version): From howdy-git AUR which I think pulls from latest commit (943f1e1)

$ sudo howdy version
[sudo] password for juneidy:
Howdy 3.0.0 BETA
intrapt commented 10 months ago

I've got the same webcam, it seems that the IR Emitter only works with the GREY pixel format