webcamoid/akvcam

provide a docker usage

Closed this issue · 4 comments

provide a docker way of using this tool

  • docker image
  • input video source, say, input.mp4
  • virtual device, say, /dev/video9

Is similar to using a chroot image, you can check the build.sh file. Once you get module loaded with it's virtual devices you map the device with the --device option, check this.

Niek commented

You don't have access to a running kernel in Docker, so I guess this will not work unless there's a way to run this in userspace or use the host's kernel.

@Niek No, you can't run a kernel module in Docket, but... you can use Docker to build the module and then run it in Qemu 😉

I been investigating a bit more of this, and have found this. You just need to load the module in the host and then map the video device (either output or capture) to docker like:

docker run \
    --device=/dev/video0 \
    OTHER_OPTIONS \
    ...

Now, loading the module inside Docker and using it in the host, that's impossible without using some sort of black magic sorcery.
I don't see much reason to document it in the wiki, because it's already documented in the Docker documentation.