Use an image or video on host machine as webcam input for a guest VM?
Posted: 30. Jan 2020, 01:01
When running a Virtual Machine with VirtualBox, is it possible to specify a custom image or video as the input for the virtual webcam in the VM?
So if any application in the guest VM would access the webcam, it would get the contents of my image or video.
If this is possible, then is there also a way to do this from the command line, e.g. using VBoxManage?
Something like:
(Note that there is no actual 'setwebcaminput' command, it's just an imaginary example to illustrate what I'm looking for)
P.S. I did notice there is a 'webcam' command, supposedly to be used like this:
But if I specify an image or video file for <path> it doesn't seem to work, I'm getting this error:
So if any application in the guest VM would access the webcam, it would get the contents of my image or video.
If this is possible, then is there also a way to do this from the command line, e.g. using VBoxManage?
Something like:
Code: Select all
VBoxManage controlvm MyVirtualMachine setwebcaminput /Users/RocketNuts/selfie.jpgP.S. I did notice there is a 'webcam' command, supposedly to be used like this:
Code: Select all
VBoxManage controlvm MyMachine webcam attach <path>VBoxManage: error: Attach emulated USB webcam (VERR_PDM_NO_USBPROXY)
VBoxManage: error: Details: code VBOX_E_IPRT_ERROR (0x80bb0005), component ConsoleWrap, interface IConsole, callee nsISupports
VBoxManage: error: Context: "WebcamAttach(path.raw(), settings.raw())" at line 2029 of file VBoxManageControlVM.cpp