budtmo / docker-android

Android in docker solution with noVNC supported and video recording
Other
9.57k stars 1.27k forks source link

How to use /dev/video0 #298

Open alirezadigi opened 3 years ago

alirezadigi commented 3 years ago

Hi. I', trying to use /dev/video0 webcam for my emulator but it doesn't work. Please help me.

$ export EMULATOR_ARGS="-camera-back video0" 
$ docker run --privileged -d -p 6080:6080 -p 5554:5554 -p 5555:5555 -e DEVICE="Samsung Galaxy S6" --name android-container budtmo/docker-android-x86-5.1.1
scottwallacesh commented 2 years ago

Ensure you have the EMULATOR_ARGS environment variable set.

e.g.

-e EMULATOR_ARGS=-camera-back webcam0
AndreasWJ commented 1 year ago

Hi! Make sure you have the following in your docker run: EMULATOR_ADDITIONAL_ARGS="-camera-back webcam0" --device /dev/video0:/dev/video0 --group-add video

If it still doesn't work go into the container's shell and test webcam access with: emulator -webcam-list If your webcam is not listed you have another issue.