Use Nexus 5 or OnePlus One as PC Webcam?
-
Hi!
I need to use Zoom and MS Teams for school. I assume these apps will not run reliably with the current development state anbox is in. Please correct me if I am wrong!
To work around this, is it possible to tether my phone to my PC running Arch Linux to use as a webcam and microphone?
Thanks!
-
You're right, those apps won't be useable on UT.
You can share the data connection of your cell phone with hotspot wifi or using the modem feature over USB.Edit: I don't think you can use the camera of your phone as a webcam for your computer.
-
Hi @SwankyBarbecue4 ,
I've written a post about microphone sharing to pc some time ago.
https://forums.ubports.com/topic/4181/don-t-have-a-microphone-don-t-worry-ut-can-do-this-for-you?_=1607703957051I've also tried without success for the camera. If you'd like to investigate what went wrong, here are the steps I tried:
- Mount using sshfs the ut root on pc.
sudo sshfs -o allow_other,default_permissions,IdentityFile=/home/USER/.ssh/id_rsa phablet@IP_ADDRESS:/ /home/USER/utcam/
- Read the video stream on /dev/videoX using ffmpeg ( to check try the following )
ffplay /home/USER/utcam/dev/videoX
- Push video to /dev/videoX on pc using v4l2loopback ( you'll need v4l2loopback set up on the pc )
ffmpeg -i /home/USER/utcam/dev/videoX -f v4l2 /dev/video2
I've never found the right /dev/videoX, all of them said unauthorized, but I think it should in theory work. Someone who knows the structure of UT would understand this better than I do.
-
-
@capsia said in Use Nexus 5 or OnePlus One as PC Webcam?:
I've never found the right /dev/videoX, all of them said unauthorized, but I think it should in theory work. Someone who knows the structure of UT would understand this better than I do.
Android based devices don't use V4L for video access, hence why also webcam doesn't work in Morph Browser already.
-
@dobey Oh.. ok, thank you. I thought to use v4l2 on the desktop to push the video in it using ffmpeg. Do you know if there is some way to read the UT camera with ffmpeg?
-
@capsia said in Use Nexus 5 or OnePlus One as PC Webcam?:
Do you know if there is some way to read the UT camera with ffmpeg?
There is no way AFAIK. One would need to implement support for using libhybris to talk to android camera service in ffmpeg, or provide some shim that exposes camera service as a v4l device so that ffmpeg can use it without libhybris.
-
@dobey Is there any way to use the camera and microphone for video calls on my pc? Are there any other tethering methods? Can I stream the camera over wifi?
-
@swankybarbecue4
None exists at the moment.It is not as simple as piping a device to something else.
One would need to modify heavily the system to accommodate for such new feature.You're welcome to try and if you do you might find help for specific questions but it's not something anyone (AFAIK) had tried yet.
-
@applee said in Use Nexus 5 or OnePlus One as PC Webcam?:
One would need to modify heavily the system to accommodate for such new feature.
Not necessarily. One could write an app I guess, which uses QML/Qt components to control the camera, and serve the video and audio streams over rtsp or something on WiFI.