Sharing Screen and Camera from Android to Linux

With all the video calls, twitch streaming and product demo work I’ve been doing recently, I’ve been building up a library of tricks for using my android devices within the video content I produce from my laptop, so I thought I’d share. I’ve worked remotely for many years but I think there’s more of us not going back to the office any time soon, so strong video communication skills are important!

My setup:
* Lenovo Thinkpad X1 running Ubuntu 20.04
* Android Moto G6 mostly, although I have screenshared my Samsung S2 tablet as well when I wanted to draw something!

(I also have the Behringer UMC404 audio interface, meaning I can route the phone headset audio directly in to my computer but honestly my earlier solution of plugging from 3.5mm headphone socket on the phone into a basic bluetooth speaker and turning that right up worked almost as nicely! It only matters because I work for a communications company and sometimes need to demo phone calls)

Screenshare

I tried scrcpy and it’s been great so far. It connects over USB and uses adb tools (that I had installed anyway). I have used this approach in a couple of different ways:

First: I wanted to draw something, and a stylus and a tablet is the easiest way for me to do that. Since I only want to use a local application on the tablet, I simply put the device into airplane mode to avoid any notifications, embarrassing or otherwise! That worked well (this picture from a stream about git that I did for work).

terrible drawing of git branches in different colours, shown on a landscape android tablet screen

The other time I use this approach is when I’m demoing something that is actually on my phone, such as the new WhatsApp Messaging Features from Vonage (I work there, so I am supposed to be able to operate this stuff and show it to others). There are desktop apps for most of these things but I think it’s nice to really have the phone in the video.

screenshare of a mobile phone window on a desktop

Do put the phone into “do not disturb” mode before you start – I use a work phone that has hardly anything installed on it so I don’t get notifications on that, which helps!

Android Phone as a Webcam.

I’ve been using DroidCam who seem to be much better at making android apps than they are at making marketing websites! It connects over USB (using adb again) or over wifi. I found that some days only one or the other will connect but once it’s stayed connected for 30 seconds then it has usually been rock solid for me – although it does seem to like to be reinstalled if Ubuntu has had updates!

I have been using it as a second camera, in addition to my built in laptop webcam, so that I can include my hardware projects in my Twitch streams. If I work on software, then I only need screensharing but for something that is not on a screen, the second webcam is really handy. At some point I might get an actual webcam, but I started doing this at the start of the pandemic and getting a webcam was pretty difficult – and the phone works fine for the hobby level stuff I’m doing.

screenshare of code, with both lorna and her streamdeck in different webcams on the right hand side

Again, this one is my basic work phone, so it doesn’t get much in the way of notifications or anything which I think helps.

Adding Android Devices into the Video Mix

It takes time to figure out the tools and set them up in advance of whatever you need them for, but I’ve found it to be worth it. I use the phone with a gorillapod and basic phone tripod mount and I’ve found it useful for sharing many different things (including a storybook at bedtime for the little ones that I can’t put to bed myself right now!). Let me know what you’re doing with your extra devices in your video setup? I would love to hear!

Leave a Reply

Please use [code] and [/code] around any source code you wish to share.

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