Skip to content

How do I use the docker image to display my webcam's input #2

@gino0717

Description

@gino0717

hi, I'm using the ubuntu and I would try to use this example to display the video from my webcam

I follow the Readme to build the docker
I follow the command and It doesn't work because of wrong image name

docker run -p 8000:8000 -t example-yuv-websocket-stream-exe

so I use

docker run -p 8000:8000 -t example-yuv-websocket-stream

I open the webpage in browser in http://127.0.0.1:8000/v0/cam/stream, the terminal display error message:

E |2021-12-03 08:00:40 1638518440168926| V4L-Grabber:Cannot identify '/dev/video0': No such file or directory (2)
E |2021-12-03 08:00:40 1638518440168955| V4L-Grabber:Cannot identify '/dev/video1': No such file or directory (2)
E |2021-12-03 08:00:40 1638518440168965| V4L-Grabber:Cannot identify '/dev/video2': No such file or directory (2)
E |2021-12-03 08:00:40 1638518440168973| Cam:Non of the tested /dev/video devices could be opened
W |2021-12-03 08:00:40 1638518440169004| [oatpp::web::server::HttpProcessor::processNextRequest()]:Warning. ConnectionUpgradeHandler not set!

it seems that the program cannot find the /dev/video
so I give it the path by using volume

docker run -p 8000:8000 -v='/dev/:/dev/' -t example-yuv-websocket-stream

then it shows

E |2021-12-03 08:13:05 1638519185420066| V4L-Grabber:Cannot identify '': No such file or directory (2)
E |2021-12-03 08:13:09 1638519189091845| V4L-Grabber:Cannot identify '': No such file or directory (2)

what should I do to run the webcam?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions