• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
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 986 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 12 Nov 2020, 05:24 11 Dec 2020, 05:22

      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!

      A 1 Reply Last reply 11 Dec 2020, 15:17 Reply Quote 0
      • A Offline
        AppLee @SwankyBarbecue4
        last edited by AppLee 12 Nov 2020, 15:18 11 Dec 2020, 15:17

        @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 11 Dec 2020, 16:46

          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.

          D 1 Reply Last reply 11 Dec 2020, 18:50 Reply Quote 1
          • S Offline
            SwankyBarbecue4
            last edited by 11 Dec 2020, 17:39

            @AppLee @Capsia Thanks!

            1 Reply Last reply Reply Quote 0
            • D Offline
              dobey @Capsia
              last edited by 11 Dec 2020, 18:50

              @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 11 Dec 2020, 18:57 Reply Quote 0
              • C Offline
                Capsia @dobey
                last edited by 11 Dec 2020, 18:57

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

                D 1 Reply Last reply 11 Dec 2020, 19:04 Reply Quote 0
                • D Offline
                  dobey @Capsia
                  last edited by 11 Dec 2020, 19:04

                  @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 13 Dec 2020, 08:42 Reply Quote 0
                  • S Offline
                    SwankyBarbecue4 @dobey
                    last edited by 13 Dec 2020, 08:42

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

                    A 1 Reply Last reply 13 Dec 2020, 11:15 Reply Quote 0
                    • A Offline
                      AppLee @SwankyBarbecue4
                      last edited by 13 Dec 2020, 11:15

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

                      D 1 Reply Last reply 14 Dec 2020, 15:32 Reply Quote 1
                      • D Offline
                        dobey @AppLee
                        last edited by 14 Dec 2020, 15:32

                        @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
                        1 out of 10
                        • First post
                          1/10
                          Last post