Giter Site home page Giter Site logo

adb_forwarder's Introduction

THIS PROJECT IS ARCHIVED

This project is superseded by applications such as Droidcam OBS and many others. IT will remain public for anyone who may want to fork and modify this admittedly weak implemenation of automating the ADB tethering used here.

ADB_Forwarder

Use your Android device's camera as webcam over USB instead of WiFi.

This will cover the steps to set up IP Webcam on your device and be able to access it securely.

Simple IP Webcam app recommendation: IP Webcam

  1. Install ADB for your system if you don't already have it.
  2. Install Python 3 on your system if you don't already have it (recommended Python 3.6 to 3.8).
  3. On your device, open up Developer Options (you'll have to enable this if you device is running stock, look up the method for your device).
  4. Find the option called "USB Debugging" under Developer Options and enable it.
  5. Connect your device to your PC with a USB cable.
  6. A popup should appear on your device asking if you trust the connection to your PC. Check the "Always allow from this computer" box and select "Allow".
    • If the prompt does not appear, locate the ADB executable and open a console or powershell window in that location, then type adb devices. This should bring up the prompt and list the devices the ADB program can see.
  7. In the IP Webcam app, configure your setup and specify a port to use (or stick with the default 8080).
  8. Set up a username and password in the IP Webcam app, under the "Local broadcasting" section.
  9. On your PC, open the adb.json file and modify it to point to the adb executable, as well as put in the port that you specified in the IP Webcam app.
    • Example JSON:
    {
      "location": "C:\\Program Files\\something\\somewhere\\adb.exe",
      "port": "8080"
    }
    
  10. Open a console or powershell window and navigate to where you keep this repository.
  11. Run the following command and you should see the program's output: python adb_handler.py.
  12. If you do not see any errors, then follow the next set of steps. If you do see any errors, you didn't follow the steps above correctly.
  13. On your device, IP Webcam should list a URL at the bottom of the screen for you to access.
  • For example, if you used port 8080 then the URL might look like http://192.168.1.24:8080
  1. Open up that URL in a browser on your PC. It will ask for the username and password you set previously, and you'll be met with a page containing a lot of options for controlling your phone's camera.
    • If you wish to preview the video, select from the different "Video renderer" options listed at the top of the page. "Browser" usually works for me.
  2. Confirm that your camera works correctly on this webpage.
  3. To use your camera with OBS, create a new Browser Source and use the URL you got to connect to the IP Webcam browser page, use the following format to access it:
    • For example, with the normal URL of http://192.168.1.24:8080 the Browser Source URL should be http://username:[email protected]:8080/video.
    • Note that the username and password are used here, and they are completely visible when the Browser Source's properties are visible.

Voila, you're done!

ISSUES:

  • IP Webcam does not work in OBS as a Browser Source when using HTTPS URL's.
    • SOLUTION: Use the regular HTTP version of the URL instead of HTTPS.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.