Using webcam connected to MacBook inside a Docker container

Has anybody figured out yet how to use an external webcam which is connected to a MacBook inside a Docker container?

I read that I have to pass this flag --device /dev/video0 to docker run, but I have a MacBook and there is no /dev/video0.

Host Machine: MacBook Pro (15-inch, Mid 2012)
External Webcam: Logitech C922 Pro Stream
Docker container: wusuopu/python-opencv3-dlib:py3.5

PS: I do not have an iSight camera anymore, I took it out.


Solution 1:

According to https://docs.docker.com/docker-for-mac/faqs/#what-is-the-benefit-of-hyperkit this is not possible.

Similar question is https://stackoverflow.com/questions/41023827/accessing-usb-webcam-hosted-on-os-x-from-a-docker-container

And possible answer is stream the camera into the container using ffmpeg according to a comment in https://stackoverflow.com/questions/37960828/webcam-streaming-from-mac-using-ffmpeg