How-To: Using an RTSP Stream as a Source for a WebRTC application

This post arises from a question posed by someone via Quora. I’m not all that engaged with that Q&A platform, but this question seemed novel, so I offered an answer. I thought the answer worth sharing in a little more depth, so I offer it here as well.

The question was, “How can I use the RTSP stream from an IP camera as a source for a WebRTC application?”

There are two parts to solving this puzzle; (1) Connect to the RTSP stream and (2) Make it appear like a webcam to the client application.

Obvious Answer: vMix

At the outset, let me say that I would address this using vMix. vMix solves both parts of the puzzle handily. If this is all that you needed to achieve, the $60 Basic HD license would suffice.

Of course, you’d need to learn a little about the application, which is deep. To my mind it’s fun, but some might find it daunting. Further, vMix requires a considerable host platform. You’re not going to run it on trivial hardware.

Let’s just say that we’d like to solve the problem with less spending and requiring less knowledge overhead.

Less Obvious Answer: VLC & NDI Tools

VLC is the ubiquitous, open source media player. Available on all platforms it can play anything I’ve every wanted to open. Beyond files, it can open network streams. I’ve used it to listen to my local PBS radio station. I’ve also used it to watch video streams from our Grandstream surveillance cameras, as shown below.

VLS viewing RTSP stream

NDI stands for Network Device Interface. It’s a network protocol, developed by Newtek of TriCaster and Video Toaster fame, that allows low-latency, lightly compressed video to be passed over a gigabit Ethernet network. NDI is impressive, but I won’t wax poetic about that here.

Continue reading “How-To: Using an RTSP Stream as a Source for a WebRTC application”

Pixel Receives Pie

Android Pie

Today my Pixel phone received an update that was reported to be Android Pie. This was the general rollout of Pie, which is Android 9.x. Since I participate in the beta program I’ve actually been running an earlier version of Pie for a couple of months.

USB Headsets

One of the new things in Pie is the ability to access the USB port for general purpose functions. Specifically, it now supports both generic UVC and UAC devices.

USB Audio support has been around for quite some time. Given a suitable USB-on-the-Go adapter I have connected a USB headset and it just worked. I’ve done this in the past, using a USB call center headset with my Nexus 5 and Pixel.

I’ve also used a miniDSP UMIK-1 calibrated microphone to make sound measurements using AudioTool. This combination worked especially well connected to the now discontinued nVidia Shield K1 tablet.

USB Cameras

Similarly, you can connect a USB webcam and it will be available to apps on the phone. Most apps will not have access to the USB camera. They simply aren’t aware that it’s possible to have such a device.

I’ve used USB Camera along with a common Logitech webcam. The USB-Type-C-to-A adapter that comes with the phone makes the physical connection possible. Once the app is running it can record and stream the camera output.

Webcam-via-Pixel

It can be added in vMix as a stream source using a simple URL as shown below.

Webcam-via-Pixel-in-vMix

With a little experimentation I suspect that this could be used to record or stream the output of a UVC compliant video capture dongle. That would make the phone effectively an RTMP encoder for live streaming.

USB Ethernet

While at Cluecon last month I had occasion to connect my Pixel to Ethernet. The main stage at Clueon was in the Lucerne Room at the Swissotel, which is in the basement. There’s no T-Mobile coverage down there so I had the Pixel connected to the Cluecon Wi-Fi.

The Wi-Fi for Cluecon attendees was sensibly configured with client isolation. No-one connected to the Wi-Fi could see anyone else also connected. As it should be.

That also meant that my desktop, connected via ethernet, could not see a live stream from the Pixel while on Cluecon Wi-Fi. This got in the way when I wanted to use RTSP Camera Server to turn the Pixel into a roaming wireless camera.

As a quick experiment, I connected a USB-Ethernet adapter to the Pixel. I’ve carried one of these ever since buying the Lenovo X1 Carbon, which lacks on-board ethernet.

Putting the Pixel into airplane mode it was thus on the same wired network as the desktop. So arranged, the desktop could “see” the RTSP stream from the app.

I later discovered that the Cluecon “Presenter” Wi-Fi, a separate network, had client isolation defeated, making it possible to roamed untethered with a phone acting as a wireless camera.

Greater USB device support in Android will doubtless be handy.

Logitech Rally: A New 4K PTZ Webcam

It was almost 5 years ago that I first posed the question, “Where are the USB 3.0 webcams.” They seem to have finally arrived. Logitech’s Brio is now over a year old. Their MeetUp product, not exactly a traditional webcam, is well suited to smaller meeting rooms, aka “huddle rooms.”

Vaddio and PTZ Optics each have several models available, although they remain focused on 1080p models. A USB 3.0 webcam can deliver uncompressed 1080p30 to a host application, which means that the application doesn’t need to specifically configure the camera for MJPEG or H264 modes.

Logitech Rally Camera

Earlier this year, Logitech teased the availability of a new webcam. This new model, known as Rally, rides atop their webcam lineup, a 4K PTZ camera for video conferencing applications.

As to the basics, Rally connects to a host via USB 3. The connection on the camera itself is USB 3 type C, with a 2.2m C-to-A type cable provided. USB is the sole interface, which sets Rally apart from some of its competition, which may also provide SDI or Ethernet interfaces.

The camera supports UVC 1.5, able to deliver uncompressed, MJPEG or H264 encoded streams. It can deliver 1080p, 720p at 30 fps and 60 fps.

A 15x lens with a 90 degree field-of-view fronts a 13 megapixel sensor delivering up to a 4k30 stream.

The PTZ mechanism provided +/- 90 degrees of movement left-right. Tilt range is from +50 to -90 degrees. When turned off the camera swings down to the –90 degree position effectively providing a privacy shutter.

When mounted upside down the camera automatically senses this, inverting the output image. This makes ceiling mounting a especially simple.

Continue reading “Logitech Rally: A New 4K PTZ Webcam”

Deal Alert: Amazon offering El Gato Camlink for just $89

Hey-ho there neighbor! You might recall some time back I reviewed the little El Gato Camlink, an inexpensive device to allow video capture from HDMI sources to a computer with a USB 3.0 port. Originally offered for $129, Camlink was notable for being about the cheapest way to get that done. Today Amazon’s Gold Box deals include the Camlink for just $89.99.

As I mentioned before, Camlink works well enough, within certain constraints:

  • It can’t scale the video size. If you feed it 1080p the host software on the computer will see only 1080p.
  • It doesn’t have an onboard compression engine. The software that you’re using must be able to handle YUY2 uncompressed video. Not a problem in most cases.
  • It requires a USB 3.0 port. Uncompressed video required big bandwidth, so in most cases the Camlink needs a USB 3.0 port. You might be able to get away with USB 2.0 if your source is SD or 720p30.

At the time it was launched CamLink did not deal with interlaced video. That means that SD or 1080i sources were a problem. I’m told that the company has since solved that problem with a firmware update. I installed the new software, but have not yet scrounged an interlaced source to test that claim.

Most recently, I’ve used it to capture the output of an older GoPro Hero2. It worked flawlessly in that role.

Webcams Where None Should be

It’s as if laptop makers have started playing a little game of hide-the-webcam. In their zeal to offer borderless displays the built-in webcam gets relocated to the most unfortunate places, often with terrible consequences.

Dell XPS

This trend started in 2015 with Dell’s XPS. While the InfinityEdge display was lovely, it forced them to move the webcam from the usual location in the top edge of the display. In their wisdom, Dell put it in the “chin” under the display, and even under the logo. It’s literally right above the keyboard.

xps13_c_3

This location makes for some odd viewing angles. It’s been referred to as the “Nosecam,” which seems appropriate. Others have more specific observations here, here and here.

Tom’s Guide even suggests you use a trick to rotate the webcam video and place the laptop on its side when making video calls.

Continue reading “Webcams Where None Should be”

Splyce: Intel NUC as a Host for vMix

Now that my video production activities are all desktop-based, my habit of handling video crosses paths with my long-standing affection for small form factor computers. For the past year I’ve used a fanless Airtop-PC from CompuLab as my primary desktop workstation. It has shown itself to be a very capable host for vMix, which is my very favorite live video production tool.

In considering the purchase of the Airtop I also looked long and hard at Intel’s NUC line-up. There’s a lot to like about the NUCs. In particular, the Skull Canyon NUC, with it’s i7-6770HQ CPU, presented an attractive price/performance combination. Others in the vMix user community have noted that it runs vMix handily, despite the lack of an nVidia GPU.

Continue reading “Splyce: Intel NUC as a Host for vMix”