Teams over IP

So, with remote working and hybrid teaming currently upsetting the status-quo, there are some new technical challenges presenting themselves.

It was all so easy when people were in the office. They went into a meeting room equipped with a big screen, a decent PTZ webcam, and maybe an audio setup on the table. When they were all hiding at home from the (other) Big C it was also pretty easy: everybody had a webcam they begrudgingly enabled and meetings proceeded.

But what to do when things go hybrid? How do you facilitate all-hands meetings in an office when some proportion of staff are remote? Camera setups in all-hands situations get weird.

There are off-the-shelf solutions for this, but they are eye-wateringly expensive. Cameras (especially PTZ) run into the thousands, and they’re still pretty poor. And then… how to connect them?! USB? A dedicated machine? Where do we power it from, particularly in an open-plan office? Hmm.

It turns out there are some outstanding 4K cameras out there. They’re called security cameras. They are neat, unobtrusive and easily powered and connected with PoE over large distances that would make USB or HDMI sweat. Oh, and they cost under £200.

The catch? They aren’t webcams, and so all our favourite conferencing software doesn’t know how to use them.

There is of course off-the-shelf software for this. The options are typically Windows-bound, apparently of questionable quality and reliability, and costs at least hundreds of pounds in licenses. That’s an OK starting point, but can we do better? Is it really that hard to bridge an RTSP stream into Teams?


So, here’s the four step plan to open-source success.

  1. Provision a Linux desktop machine (virtual or physical). All you need is RDP to be honest.
  2. Install V4L2 (Video 4 Linux) and FFmpeg.
  3. Configure however many virtual video devices you require.
  4. Run ffmpeg to stream each source (RTSP in this case) to each virtual video device.

Then just use those video devices as they are in Teams.

The commands?

# for Debian
sudo apt-get install v4l2loopback-dkms v4l2loopback-utils ffmpeg;
sudo modprobe v4l2loopback devices=2 video_nr=1,2 card_label="camera1","camera2";
sudo ffmpeg -re -rtsp_transport tcp -i rtsp://camera1:554/s0 -pix_fmt yuv420p -f v4l2 -vcodec rawvideo -vf scale=1280:720 /dev/video1 &
sudo ffmpeg -re -rtsp_transport tcp -i rtsp://camera2:554/s0 -pix_fmt yuv420p -f v4l2 -vcodec rawvideo -vf scale=1280:720 /dev/video2 &

If you’re wondering about the “-vf scale=1280:720”, that’s because (for Teams at least) it refuses to use the camera above that resolution. No, I don’t know why?!

The end result though: superb! RDP onto the machine to log into a Teams call (or any other provider that supports Linux or web-based calling) and enjoy seamless use of IP cameras as webcams.

Baby monitoring

I have CCTV deployed, including a couple of cameras internally. Occasionally I want to listen in to the kids while I’m outside, so the mobile app viewing a camera feed provides a handy facsimile of a baby monitor.

The thing is, I don’t want the video. I don’t need the video. I don’t want the bandwidth consumption of the (up to 4K) video. What I do want is the audio, only.

The cameras all output RTSP streams (which is how they bind to the NVR), so there must be a way.

Cue VLC running on a small VM.

It’s actually fairly simple (save for trial and error figuring out variations of codec that are properly supported for streaming on all devices and browsers). But, to save anybody else the hassle…


vlc ${rtsp_url_of_camera} --sout-keep --sout '#transcode{acodec=mp3,ab=128}:std{mux=mpeg1,access=http,mux=ogg,dst=:8080/camera.mp3},select="novideo"}' &


<!DOCTYPE html>

<audio controls autoplay src="http://vlc_machine:8080/camera.mp3" type="audio/mp3">
Your browser does not support the audio element.


Navigate to that HTML page (or run it from localhost, etc.) and you get a low-bandwidth audio-only stream.

I’ve got 12p, now STFU.

I’ve been extending a network, where the baseline requirement is for a comparatively cheap, POE-compliant (802.3af), gigabit, VLAN-capable switch.

A (now EOL) Netgear GS724TP is great! You need to be open-minded about using Firefox v3 Portable to talk to the web UI because it’s so old, but aside from that it’s got 24 ports and is functionally bang on the money.

Except for the noise.

It sounds like a Dyson vacuum on turbo mode. This thing is cheap. Like, £60 on eBay cheap. And there’s the reason!

Except, is that a reason? Really?

I’ve tried to order replacement fans – there are blog posts and videos about silencing these things, usually by hacking an ugly 12cm hole in the case and putting in a different fan altogether. I opted for near-silent 40mm fans to fit like-for-like, but I’m damned if I can find anything that matches the wattage (12V @ 0.18A).

But there is an elegant solution if you’re willing to wave a soldering iron about for a few minutes: add an in-line 200ohm resistor (£0.04 each) and those stupid fans will slow down to be near silent yet still pump through enough air. (Into the red-wire if you’ve Googled this looking for a solution).

And this is my gripe with Netgear. They produced a pretty neat piece of kit costing hundreds and couldn’t be bothered to put in 12p of resistors to make it right. Like the airline saving pennies by scrimping an olive from the in-flight meal on a £10k F ticket, they’re cheap bastards.