UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Use Nexus 5 or OnePlus One as PC Webcam?

    Scheduled Pinned Locked Moved General
    10 Posts 4 Posters 990 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • S Offline
        SwankyBarbecue4
        last edited by SwankyBarbecue4

        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!

        AppLeeA 1 Reply Last reply Reply Quote 0
        • AppLeeA Offline
          AppLee @SwankyBarbecue4
          last edited by AppLee

          @swankybarbecue4
          Hi

          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.

          1 Reply Last reply Reply Quote 1
          • C Offline
            Capsia
            last edited by

            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?_=1607703957051

            I've also tried without success for the camera. If you'd like to investigate what went wrong, here are the steps I tried:

            1. 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/
            
            1. Read the video stream on /dev/videoX using ffmpeg ( to check try the following )
            ffplay /home/USER/utcam/dev/videoX
            
            1. 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.

            dobeyD 1 Reply Last reply Reply Quote 1
            • S Offline
              SwankyBarbecue4
              last edited by

              @AppLee @Capsia Thanks!

              1 Reply Last reply Reply Quote 0
              • dobeyD Offline
                dobey @Capsia
                last edited by

                @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.

                C 1 Reply Last reply Reply Quote 0
                • C Offline
                  Capsia @dobey
                  last edited by

                  @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?

                  dobeyD 1 Reply Last reply Reply Quote 0
                  • dobeyD Offline
                    dobey @Capsia
                    last edited by

                    @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.

                    S 1 Reply Last reply Reply Quote 0
                    • S Offline
                      SwankyBarbecue4 @dobey
                      last edited by

                      @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?

                      AppLeeA 1 Reply Last reply Reply Quote 0
                      • AppLeeA Offline
                        AppLee @SwankyBarbecue4
                        last edited by

                        @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.

                        dobeyD 1 Reply Last reply Reply Quote 1
                        • dobeyD Offline
                          dobey @AppLee
                          last edited by

                          @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.

                          1 Reply Last reply Reply Quote 2
                          • First post
                            Last post