0

I am trying to acquire the very basic understandings of Android "development" and I need to use a static .jpg image as fake camera input in AVD Manager.

I've looked up for a solution but I can't find one that works, although I found this video on YouTube but it is simply a demonstration using v4l2loopback and not a tutorial : https://www.youtube.com/watch?v=E89XQXrA_t

Apps like Fake Camera on Google Play won't do the trick because I want to use it in whatever apps like Instagram which have an integrated camera app, and this seems like exactly what I need but I am unable to understand some of the commands written in the description of the video (pretty much everything after $sudo make install)

Pardon my ignorance x) I feel like this is a dumb problem but I thought I would try asking anyway ;)

EDIT : I can use the VirtualScene feature which spawns a scene in which I can walk around when using the rear camera of the virtual device but the result is unsatisfying, I have to crop the images and it also reduces the quality.

  • 1. [Android emulator can support webcam as input](https://stackoverflow.com/a/30792615/295004) 2. [Use free software like OBS to feed in a static image to virtual webcam](https://softwarerecs.stackexchange.com/a/74002/2543) – Morrison Chang Nov 14 '20 at 04:04
  • Hm I didn't think about it, it was a great idea but AVD Manager doesn't let me select the virtual camera the only option is "Webcam0"... I made a test with https://webcamtests.com/ and it let me choose between my real webcam and all my virtual cameras, so I tried to figure out what to change in the config.ini file of my virtual Android device and I found this line `hw.camera.front=webcam0` and tried to edit it but nothing works... I tried "webcam1", "webcam5", "OBS-Camera", etc. – machomuchacho Nov 14 '20 at 07:34
  • Hmm, I'm trying this on a older Mac (MacBook Pro 2012/10.13.6) and having difficulty as well, but I've narrowed it down to something between the virtual camera plugin (https://github.com/johnboiles/obs-mac-virtualcam) i'm using and QEMU emulator. You might want to list out what webcams the emulator sees: `./emulator -avd yourAVD -webcam-list`. You may want to sudo to see if anything different appears. As well as list out which host OS you are running (Win/Mac/Linux). – Morrison Chang Nov 14 '20 at 08:09

0 Answers0