Three ways to receive a Stream from your Android phone as a Video/Audio Source in OBS on Ubuntu 18.10 using IP Webcam

Read my previous article to install obs:…

I will be using the app called IP webcam.…

1. Start and configure IP webcam. Run the server.

You can use either USB or Wi-Fi. My Wi-Fi is rather slow, so I’ll be using a USB cable to connect my Android phone to my computer.

2. The second step is to plug your phone into your computer using the USB micro or USB C cable. Then turn on USB tethering on your phone.

Option 1 – VLC

The easiest way is by using VLC, but it seems to create a delay on my machine. Does anyone have suggestions?

sudo apt --yes install vlc

Screenshot from 2018-11-30 22-40-20

Then add a VLC media source in OBS, Click the small “+” sign, and “Add Path/URL” then paste your IP Webcam url. See below examples:






Option 2 – Gstreamer with v4l2loopback

Gstreamer seems to have less delay. The loopback is sweet, because it let’s you treat your phone just like any other v4l2 device, like a UVC webcam.

Make sure you have gestreamer plugins installed:

sudo apt --yes install gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-plugins-rtp

You can test to make sure that gstreamer connects with the IP webcam from your Android phone by issuing the below command.

gst-launch-1.0 souphttpsrc location="" do-timestamp=true is-live=true ! multipartdemux ! jpegdec ! videoconvert ! ximagesink

Install v4loopback

sudo apt install --yes v4l2loopback-utils
sudo modprobe v4l2loopback

Create the virtual webcam

This seems to work with the MPEG stream:

gst-launch-1.0 souphttpsrc location="" do-timestamp=true is-live=true ! multipartdemux ! jpegdec ! videoconvert ! v4l2sink device="/dev/video2"

I can’t get this one to work yet.

gst-launch-1.0 souphttpsrc location="" do-timestamp=true is-live=true \
    ! multipartdemux \
    ! decodebin3 \
    ! videoconvert \
    ! videoscale \
    ! videorate \
    ! video/x-raw,format=YUY2,width=640,height=480,framerate=24/1 \
    ! v4l2sink device="/dev/video2"

I wonder how you would receive the IP Webcam H264 stream with gstreamer? maybe:

`gst-launch-1.0 rtspsrc location=’rtsp://’ ! rtph264depay ! h264parse ! avdec_h264 ! v4l2sink device=”/dev/video2″`
Read more here:…

If you want more than one Android phone streaming to your computer using the loop-back method. You’ll have to reload the loopback module inter kernel with a variable telling it how many loopback devices to make. For two, use the commands below:

sudo modprobe -r v4l2loopback
sudo modprobe v4l2loopback devices=2

NOTE: All this needs to be done before you add the Video Capture Device (V4L2) in OBS. If you make any changes to the video stream after you add the source, you will need to remove the source or close OBS in order to create the loopback again.

For automated script for Ubuntu see here:…

See also:

Option 3 – Gstreamer with OBS gstreamer plugin

I noticed someone has made a Gstreamer plugin for OBS.…

I’ll try this out later.

iPhone and

For iPhone see:…

For Windows see here:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.