Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CAP: Device select() timeout #278

Open
Foxius opened this issue Jun 14, 2024 · 5 comments
Open

CAP: Device select() timeout #278

Foxius opened this issue Jun 14, 2024 · 5 comments

Comments

@Foxius
Copy link

Foxius commented Jun 14, 2024

-- INFO  [4318.843          ] -- Using V4L2 device: /dev/v4l/by-id/usb-SHENZHEN_AONI_ELECTRONIC_CO._LTD_Full_HD_webcam_AN20200521001-video-index0
-- INFO  [4318.843          ] -- CAP: Using capture type: single-planar
-- INFO  [4318.843          ] -- CAP: Using input channel: 0
-- INFO  [4318.909          ] -- CAP: Using resolution: 1280x720
-- INFO  [4318.909          ] -- CAP: Using format: MJPEG
-- INFO  [4318.971          ] -- CAP: Using HW FPS: 30
-- ERROR [4318.971          ] -- CAP: Device doesn't support setting of HW encoding quality parameters
-- INFO  [4318.971          ] -- CAP: Using IO method: MMAP
-- INFO  [4318.973          ] -- CAP: Requested 3 device buffers, got 3
-- INFO  [4318.993          ] -- CAP: Capturing started
-- INFO  [4318.993          ] -- Switching to HW encoder: the input is (M)JPEG ...
-- INFO  [4318.993          ] -- Using JPEG quality: encoder default
-- INFO  [4318.993          ] -- Creating pool JPEG with 1 workers ...
-- INFO  [4318.993          ] -- Capturing ...
^C-- INFO  [4319.055          ] -- ===== Stopping by SIGINT =====
-- INFO  [4319.055          ] -- HTTP: Eventloop stopped
-- ERROR [4319.995          ] -- CAP: Device select() timeout
-- INFO  [4320.000          ] -- Destroying workers pool JPEG ...
-- INFO  [4320.064          ] -- CAP: Capturing stopped
-- INFO  [4320.065          ] -- Bye-bye
saikonohack@raspberry:~/ustreamer $ v4l2-ctl -d /dev/v4l/by-id/usb-SHENZHEN_AONI_ELECTRONIC_CO._LTD_Full_HD_webcam_AN20200521001-video-index0 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
        Type: Video Capture

        [0]: 'MJPG' (Motion-JPEG, compressed)
                Size: Discrete 640x480
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                Size: Discrete 320x240
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                Size: Discrete 800x600
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                Size: Discrete 1280x720
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                Size: Discrete 1280x960
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                Size: Discrete 1920x1080
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
        [1]: 'YUYV' (YUYV 4:2:2)
                Size: Discrete 640x480
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                Size: Discrete 320x240
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                Size: Discrete 800x600
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                Size: Discrete 1280x720
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                        Interval: Discrete 0.333s (3.000 fps)
                Size: Discrete 1280x960
                        Interval: Discrete 0.200s (5.000 fps)
                        Interval: Discrete 0.333s (3.000 fps)
                Size: Discrete 1920x1080
                        Interval: Discrete 0.200s (5.000 fps)

./ustreamer --device=/dev/v4l/by-id/usb-SHENZHEN_AONI_ELECTRONIC_CO._LTD_Full_HD_webcam_AN20200521001-video-index0 --host=0.0.0.0 --port=8080 --resolution 1280x720 --desired-fps=30 --format=MJPEG --drop-same-frames=30

@mdevaev
Copy link
Member

mdevaev commented Jun 15, 2024

Is it working with other software like mjpg-streamer?

@Foxius
Copy link
Author

Foxius commented Jun 15, 2024

I honestly don't know how to use mjpeg-streamer. But I for example wrote a script in python and translated it to browser. it works but not for klipper. (but for example in telegram addon the same link works)

@mdevaev
Copy link
Member

mdevaev commented Jun 15, 2024

Wait a moment. Before you're hitting Ctrl+C, do you have a video stream?

@Foxius
Copy link
Author

Foxius commented Jun 15, 2024

no

@mdevaev
Copy link
Member

mdevaev commented Jun 15, 2024

Did you try --debug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants