DroidCamX on Linux

I’ve been using DroidCamX to stream video from my phone onto my desktop. I can screenrecord my desktop and I don’t have to muck around with video editing; it’s all composed and done in one take.

I was recording my keyboard so I needed the lowest latency possible and using USB does much better than over WiFi. There are official native apps or you can (apparently) use other tools like VLC or ffmpeg. Here’s what I found to work for me:

That last command deserves some explanation. We curl the 4747 port on our local machine, which is forwarded to the DroidCamX app via ADB. We use a query string to control the size of the video. You can find the available values for this by:

We pipe that into tee so we write the video to a file. It’s good to be able to see what you’re recording too so we pipe into mpv, which will show the video. The params we pass to mpv make it low latency (no caching/buffering) and tell it that it’s a stream so don’t confuse it with a standalone video file.

To stop recording, either ctrl+c the command or close mpv.

comments powered by Disqus