Hathor Logo

Preface

This entry is part 1 of 7 in the series The Streaming Chronicles

It all started with a bug.

I am in the process of writing a library that will act as an ONVIF driver for Apple operating systems, and had gotten to writing a test harness for tvOS.

My test harnesses use the excellent VLCKit to display streams from devices. This is a library that is designed to be integrated into software projects, giving them the ability to display video of almost any format.

It’s an excellent resource, but is quite “heavy,” in its requirements for resources, and has licensing issues. The licensing issues aren’t that big a deal for me, but the “heavy” is, so I knew that I’d need to find a different streaming library before trying to do anything that even smelled commercial; especially for mobile devices.

In any case, I finally got around to including the TVVLCKit library (the VLCKit variant for tvOS) into my latest test harness, and ran into a small bug. There was a missing file in the package. It’s not a big deal, but I didn’t know it when I first encountered it.

So I did what I always do when I encounter mysterious new problems: I Googled it, and came upon this posting by Martin Riedl. In it, he mentions the issue, and the (very simple) fix.

While I was there, I liked his style, and decided to poke around the site a bit, and see what else he’s been up to.

I came upon this series of posts, where he discusses using ffmpeg to convert live RTSP streams (what most surveillance cameras emit) into HLS (Apple’s native streaming protocol).

Now, I really like ffmpeg. It’s probably the best video streaming/processing software around. It’s a massive, aggregate, open-source project that does a great job.

But it doesn’t work on mobile devices, and, even if it did, I’m not sure that it would be the best solution, as video processing, on a good day, is extremely resource-intensive. On mobile devices, resource usage is a huge deal. Being able to watch high-quality video for five minutes, until your battery pops its clogs, is not a particularly satisfying experience.

So I had basically ignored it.

After reading his posts on setting up an ffmpeg streaming server, I had an idea. I could write a relatively simple server app for MacOS, that could translate surveillance footage into HLS. This would allow me to use any Apple device as a display for any input stream, using the most optimized software possible for each device (the native Apple operating system). The end-user apps would not have any licensing issues, due to the fact that they won’t include open-source libraries with coercive licenses. I could use my ONVIF library in the server, and that would allow a lot of the “nit-picky” stuff to be sequestered from the end-user apps.

So, thus was born what is currently called the decidedly marketing-unfriendly-named “RVS_MediaServer” project. I’ll think up some nice moniker down the road.