SlingStudio Learnings

I run a business on the side that does corporate video/advertising/training media. In order to keep clients happy and the business current I’m always on the lookout for new ways of doing things. New ways that are better, stronger, faster and more efficient than what we’ve done in the past. Efficiency ultimately translates into cost savings and cost savings keep clients happy.

Live streaming content has become a hot topic service in the last few years but despite the passage of time not much has changed changed on the tech-side.

A small portion of the equipment necessary to make a reasonably-decent show work.

We normally achieve live streaming in one of two main ways; but they both start with big heavy cameras, expensive coaxial cables, a big bulky video mixer, some LCD monitors, loads of converters, frame rate and resolution “scalers” and then an output step. The output step involves either a dedicated video streaming device, like the Teradek Vidiu or a laptop running a USB3 capture card and the amazing OBS. Systems that run on 30p (NTSC) frame rates tends to *just work* but we operate in a PAL country (South Africa) and this greatly complicates things as most IT equipment is NTSC native.

Even more equipment.

These setups are unfortunately huge and by extension very expensive (as they require a lot of expensive equipment, space, cabling, setup time, crew, etc).

A client recently started asking about ways in which they could do smaller, “lighter-weight” multi-camera streams for the purposes of internal marketing and staff training. One of this client’s staff members had found an advert for a system, called the “SlingStudio”.

The SlingStudio Hub

Now, “SlingStudio” is a very poorly thought-out name, because the word “Sling” often means a type of support equipment that may not be “safe for work”. My client’s staff member mentioned this device, the SlingStudio that is, and asked if it could work for their purposes. I looked into it and I must admit it seemed too good to be true… and it is, sort of. They’ve taken a leaf out of Blackmagic Design’s book, in that it isn’t a bug-free product and it certainly isn’t plain-sailing to operate.

An NTSC HDMI-equipped camera attached to a SlingStudio CameraLink

The SlingStudio is tiny compared to the setup we normally use. The switcher and video encoder/streaming module are contained in one device the size of a fancy wifi router – and ironically the device is also a wifi router, albeit a very limited one. The system has some notable limitations, that mostly extend out of its core design:

  • All video sources, bar one, are wirelessly streamed to the device over 5GHz 802.11ac wifi using proprietary equipment or a smartphone application (which uses the phone’s camera).
  • The device is 30p only. 60p is available as an option with another set of limitations.

Have lots of batteries ready…

In order to use the machine in practice you need the following :

  • HDMI-equipped cameras all operating on NTSC.
  • For each camera you need a wireless transmitter.
  • If you’re operating for longer than ~1.5 hours you’ll need USB power banks for each of the transmitters.
  • Tripods (optional!).
  • The SlingStudio “hub”.
  • The hub’s battery “base” or a power supply.
  • An iPad.
  • An internet connection.

The SlingStudio’s iPad console operating with three wireless video sources.

The above makes for a very compact setup compared to traditional configurations. In South Africa, almost all of our “ENG”-style cameras operate on PAL (25p/50i) frame rates, which makes them incompatible with most projectors. This means that you need a frame rate converter to connect a normal mixer and camera setup to a projector system – but the SlingStudio is an American product and it only supports NTSC (specifically 30p, 60p* and 60i). As a result of this frame rate selection all venue projectors are happy to deal with the signal the SlingStudio outputs. The SlingStudio can output video to the internet via RTMP or to Youtube and Facebook directly. It can even create events on those platforms using the iPad console interface. In parallel it can also record your output stream (program), your video sources individually, your line-in audio source and output a limited set of streams via HDMI. Really impressive stuff. All this is at an extremely attractive price point that’s a fraction of the cost of a traditional setup. So what’s the catch ?

There are several catches, but it is possible to work around them if you understand them in the context of your brief. Here are some limitations, some of them are South Africa-specific :

  • The SlingStudio is an NTSC/30p/60p/60i product and as such will only work with equipment that supports these framerates. Many cameras in South Africa are locked to PAL frame rates and are therefore incompatible with this system. This is especially true of cheaper “handycam”-type camcorders.
  • The company that makes the SlingStudio (DISH) are hell-bent on preventing the SlingStudio being used by non-US customers; you need an iPad with a US iTunes account to download their control application. US retailers will not ship the SlingStudio to South Africa (or anywhere outside of the US and Canada). Warranty support is, naturally, unavailable.
  • The SlingStudio -only- works with a Macbook or an iPad, no Android folks.
  • The SlingStudio uses 802.11ac wifi on 5GHz to transport camera video streams and as a result you are subject to all of the complexities that come with that, including interference and general frequency congestion (which can be erratic and severe).
  • Full HD video at 30 fps is roughly 1.5 Gbits/second, but the SlingStudio transmits video data over wifi at anywhere between 2mbit/sec and 10 mbit/sec. It manages to do that by heavily compressing the footage and that comes with the price tag of notable latency. This isn’t an issue if you’re only recording and streaming to the web but it is a problem if you’re planning on going out to a projector in the location in which you’re filming. The SlingStudio does have a low-latency mode which sacrifices quality for latency.
  • The system is cutting-edge and as a result sometimes suffers a software glitch here and there. You have to keep your technical wits about you to navigate these issues.

The SlingStudio’s wifi quality checker interface.

In practice the system has been pretty amazing so far. I performed extensive testing (in excess of several days of streaming) before actually using the device on a real shoot. In a real-world environment the system unfortunately has failed once so far, but after some investigation I came to the conclusion that the fault was caused by a ground-loop between an HDMI input and the machine’s line-in audio input (the ground-loop was created by an audio desk’s dodgy power supply). The solution was to put as much of the system on battery as possible and air-gap everything else (we moved the audio onto a wirelessly-connected camera). This resolved further issues. The lesson here is don’t “electrically” trust the voltages of third-party equipment.

So, if you find that your SlingStudio’s wifi occasionally abruptly disappears but the device continues operating normally otherwise, you’re probably experiencing a ground-loop related issue. Galvanically isolate the crap out of everything.

The SlingStudio’s Quad View output

The SlingStudio can send a “quad view” output, program output or HDMI pass-through to the HDMI output. Switching between these modes is seemless, so it’s possible to use it as a rudimentary auxiliary output.

The real SlingStudio treat is in the edit…

For all the SlingStudio’s limitations, issues and reliability concerns the feature that really stands out is the edit – it’s possible to import SlingStudio recorded projects/footage into Adobe Premiere Pro and Apple Final Cut Pro. The resulting timeline includes all of your cuts and transitions. It’s an absolute treat and makes fixing things easy. This is the biggest sell for the SlingStudio for me against other competing solutions.

All-in-all the SlingStudio is an amazing piece of equipment at an almost unbelievable price-point ($1000 without the transmitters and iPad) but it does have very specific limitations and can be finicky. A traditional system is a lot more effort to set up but it is much more reliable and provides lower-latency and better quality feeds.

Extra:

It appears that the SlingStudio runs Linux; the company publishes open source licences for the system (but not the source) and the licences mention both Linux and SSH, amongst other things. I’ve also noticed that drives formatted in Debian that are unlabelled get assigned “sda” as a drive name on the SlingStudio… which seems familiar. If only someone would open their hub up and take some photos. I’m tempted…

Update

A few months, a few more live streaming jobs and a website update later and the SlingStudio is performing well. After adopting a policy of galvanically isolating the hub (running from batteries, not using the audio input on the hub, not using the HDMI input/output on the hub, etc.) the system has performed admirably and hasn’t crashed/rebooted/failed once, despite being used on several high profile shoots, often with 5 video sources, high bitrates and lots of graphics.

A FlySafair Experience

A company recently paid for a flight for me from Johannesburg (OR Tambo International) to Cape Town International Airport.

And yes, it’s VERY* important to name things after people and not after the landmarks they’re in/near. Naming locations after people solves real problems, like unemployment and disease. In fact it’s so important to rename things that you should seek out places that don’t have names and name them, because that’s what successful countries do.

“you get what you pay for” and FlySafair is a great example of that. Their legroom was non-existent and a colleague of mine (who’s taller than I am and was on the flight with me) had to do some interesting contorting to fit into the available space.

I thought Mango was shit, but FlySafair takes the cake for “crappest South African airline”. Did I mention the flight I was on was late ? Yes, it was 40 minutes late.

The experience started with online check-in… which kinda worked but kinda didn’t. Online check-in worked but didn’t indicate it had worked and offered to allow seat selection but refused to show the seat selector. Okay, that was disconcerting. No worries. Then came baggage, ah, we need to buy extra baggage allowance, which was followed by a trip to a kiosk, then waiting, then paying then back to the check-in desk. Mango let us on their flight with the same baggage with no extra cost, but even so, I didn’t mind paying, I mind being shuffled around and waiting in queues. “Innovation” is hard.

Eventually we get urged to start boarding – more queuing. The queue eventually starts moving, yes, I’m through the boarding gate… and then this :

Like excrement clogging up a sewerage line (we wouldn’t do this to our dogs and cats, right?) we get filtered based on priority boarding vs normal shitty boarding (I was priority for some reason – it didn’t help). Once you’ve been segregated based on priority status you then get further segregated based on seating position. And then you eventually board the plane in some sort of order. This is stupid and does not work. It does not work. It doesn’t. Stupid. Blerrrrrgh.

After being segregated based on seating row, you wait… in the air bridge, where it’s hot, humid and dark. Nice.

You finally get let out again, for a moment, as you get shuffled along the concrete apron. This is fast boarding, apparently, some 30 minutes after scheduled take-off.

And then you realise that Mango isn’t all that shitty after all… it could be worse.

It was cramped. We were surrounded by three very unhappy babies.

Also, please, don’t take your infants flying until they’re old enough to have a vague understanding of the selfish reasons you have for putting them through such torment.

It doesn’t look that bad here but believe me, it was bad.

Ventilation is apparently a luxury in the aviation industry because they seemingly shut off ours or severely limited it (isn’t it taken from the engine’s air bypass ?).

At least this dodgy experience only lasted ~2 hours… and I had Patricia greet me on the way home.

This advert is both unnecessary and ridiculous – paid for by excessive water and electricity charges. The City used to work for you… but now it makes progress possible – for its employees.

In short, avoid FlySafair like the plague. It’s just a cut too far. Airlines should be regulated out of offering such inhumane conditions.

*it’s sometimes acceptable to rename something when that something is named after an absolute bastard nazi – but then rename it to something innocuous and politically-indifferent.

Back to you Jenny.

Reverse Engineering the Ubbey Box

Some time ago I came across an ICO (distressed choir wails in the background as if welcoming lucifer to a dark cathedral) and said ICO was aiming to build a decentralised storage system. “Cool”, I thought, eager to experiment with a small amount of Ethereum on a diverse set of ICOs. I gave them some ETH… but before doing so I discovered that decentralised storage isn’t a new thing. Several projects have tried (and somewhat succeeded) in building dencentralised storage networks already; big examples being BitTorrent and IPFS being (neither offer in-band remuneration). In addition, cryptocurrency-supported examples include SiaCoin and StorJ – both of which have serious issues. After contributing to the Ubbey/Universal Labs ICO I decided to give Sia hosting a try… but that’s another story.

Ubbey’s 2000 Ethereum ICO was ultimately successful and I got some tokens. Shortly thereafter Ubbey allowed ICO participants to use some of their tokens to order their “Ubbey Box” at discounted rates. By this stage I had acquired additional Ubbey tokens at a fraction of the ICO price on decentralised exchanges (I love DEXs). Yesterday, the Ubbey box I ordered arrived. I only recently got a chance to play with it.

As with most boxes I don’t control, the Ubbey box has gone onto a DMZ network, which means it can’t access my home security cameras, storage machines, geyser controller, irrigation controllers… you get the idea.

First things first, unpacking :

Very nice Ubbey… the packaging looks good, even after being bashed around by DHL.

An Ubbey Box, by Universal Labs

This box is very obviously a general purpose media player that’s been rebranded to fit Ubbey’s needs. There’s nothing wrong with that, it’s sensible. They inadvertently hint at it being a general purpose media box with their specs, which quote the device as having an ARM CPU in it with 2 GBs of RAM, a VERY common configuration for ARM dev boards from around 2 years ago. This is begging to be disassembled…

So, onto the DMZ it goes. I installed the Ubbey app from the Google Play Store and soon enough it found the box (through what looked like an IP scan of the local subnet). The scan was followed by a login prompt and then a firmware update (forced) :

Unfortunately, it’s been about 2 hours now and it’s still updating…

While we wait for it to update, let’s see what’s inside :

This is how the device looks inside with the lower cover removed (it’s upside down in this shot).
The Ubbey logo is illuminated by an over-spec’ed 7-segment LED display.
The top-side of the main board of the Ubbey Box.

The top side of the main board of the Ubbey Box is -very- interesting. The device is equipped with a dual-chain/MIMO wifi module and the box has antennas for it installed. The top cover of the box has a large metal mass, which is squeezed against the top of that shielded cage/case with a thermal pad sandwiched inbetween. The board is clearly designed to have multiple display outputs with one set of traces unpopulated. The FORESEE module is probably flash “ROM” storage for the OS, which is OpenWRT. Also present are traces/holes for a TTL UART, an SD Card module and two USB ports (one of which appears to be USB 3).

It should be noted that the Ubbey Box runs an SSH daemon by default – attempts to log in to it using root/root, root/password, root/etc. proved fruitless.

The top side of the Ubbey Box PCB with the CPU/RAM shield/case and thermal pad removed.

A quick Google search for SEA Beelink SEA I found me this Amazon page :

Wireshark packet sniffing indicates that the device spends a lot of time communicating with 47.100.119.151, which seems to reverse-resolve to api.yqtc.co. Visiting the server with https indicates that the server’s HTTP certificate expired in May… so I thought the client device may be less than strict with it’s certificate acceptance. Some DNAT rules on my router and mitmproxy later and I got this :

mitmproxy is very cool software. Unfortunately the Ubbey Box’s Go client, although permissive, isn’t that permission 😉

It would appear that the best way of gaining access to this device is via the TTL UART.

Update 22 September 2018 : Serial Debug Console

Not my neatest work, but I now have access to the device’s debug console…
Part of the Ubbey Box’s boot process and the OpenWrt failsafe mode entry point.
The Ubbey Box’s labeled partitions.
The contents of description.xml inside what looks like an overlay filesystem called “nasetec”

More to follow…

Free Garmin GPS Maps for Cycling with Topographic Data/Contours

The Jonkershoek plantation is pretty… and very bicycle-friendly.

I recently went for a mountain bike ride in a mountainous area of the Western Cape (South Africa). This location is littered with mountain bike trails but some of them are very steep and ideally suited to dedicated downhill cycling. It isn’t always obvious where the trail you’re on may go and a vertical climb isn’t always desirable. Wouldn’t it be great to have a GPS with both detailed cycling routes and topographic data/contours ?

Probably, yes. Luckily I have an old-ish Garmin eTrex HCX “Color” handheld GPS. In my mind it’s still a new-ish device, but in reality it was released to the market 11 years ago in 2007. For reference, that’s one year after the Intel Core 2 was released – so tech has changed a bit… but apparently not much for Garmin GPSs.

Yes, that’s what low-res looks like.

This eTrex has a microSD card slot, which probably supports cards up to 2GB in size. That’s more than enough for elevation data and some South African bicycle maps.

To generate said maps, under Ubuntu Linux (18.04), I did the following, improvised from the OpenStreetMap wiki :

Download a suitable .osm.pbf from here : http://download.geofabrik.de/africa.html

Download Splitter : http://www.mkgmap.org.uk/doc/splitter.html

Download a style file : wget https://svn.openstreetmap.org/applications/utils/export/garmincyclemap/network/cyclemap.TYP

Install subversion if you don’t already have it :
sudo apt install subversion

Get mkgmap’s repository :
svn co https://svn.openstreetmap.org/applications/utils/export/garmincyclemap/network/cyclemap

Get the mkgmap JAR file :
http://www.mkgmap.org.uk/download/mkgmap.html

Split your PBF files : (I gave it 8GBs of RAM, but you may not have that)
java -Xmx8096m -jar splitter.jar --max-nodes=900000 south-africa-latest.osm.pbf

Convert the split files into a gmapsupp.img file : (RAM, if available, set to 8GBs and threads set to 16 threads)
java -Xmx16000m -jar mkgmap-r4240/mkgmap.jar --style-file=cyclemap --route --description=aquarat --mapname=aquarat --gmapsupp --max-jobs=16 --keep-going -c template.args

Make a directory:
mkdir archive

Move gmapsupp.img into archive :
mv gmapsupp.img archive/gmapsupp-cycling.img
mv south-africa-latest.osm.pbf archive/

Delete the temporary stuff :
rm *.img *.pbf

Now for the contours! Download a suitable contour file here : http://develop.freizeitkarte-osm.de/ele_20_100_500/
wget http://develop.freizeitkarte-osm.de/ele_20_100_500/Hoehendaten_Freizeitkarte_ZAF.osm.pbf

Split it :
java -Xmx8096m -jar splitter-r591/splitter.jar --max-nodes=900000 archive/Hoehendaten_Freizeitkarte_ZAF.osm.pbf

Render it to gmapsupp.img :
java -Xmx16000m -jar mkgmap-r4240/mkgmap.jar --style-file=cyclemap --route --description=topoaquarat --mapname=aquatopo --gmapsupp --max-jobs=16 --keep-going -c template.args

Move it to archive :
mv gmapsupp.img archive/gmapsupptopo.img

Combine all the things :
java -Xmx16000m -jar mkgmap-r4240/mkgmap.jar --style-file=cyclemap --route --description=topoaquarat --mapname=aquatopo --gmapsupp --max-jobs=16 --keep-going archive/gmapsupptopo.img archive/gmapsupp-cycling.img

aaaand copy the resulting file to your device’s SD card :
mkdir -p /media/cooluser/somedevice/garmin
cp gmapsupp.img /media/cooluser/somedevice/garmin

Eject and you’re done.

It looks like this site may do some of these things too : https://extract.bbbike.org/

Digital Archeology

I found some old computers on an auction sale. Despite a sizeable crowd of ~150 people no one besides me bid on the machines. The machine below is one of the units purchased.

It features a removable PATA hard drive, a “stiffy” 1.44MB floppy drive, ~ 8MB of RAM, a Monochrome Display Adapter and an Intel 80386 CPU (sadly without the 80387 maths coprocessor).

Looks clean, less likely to blow up when powered 💪.
It boots… and has Linux on it ‽

Much to my surprise the machine presented a LILO prompt after POST implying a Linux installation. That’s crazy! A Linux installation on a South African 386, near unbelievable.

mmm, fsck from April 1997, last booted Septyember 1998. It belonged to conexio.co.za and this was srv.conexio.co.za… cool!

A functional fsck from April 1997. Unfortunately not present on this screen was the machine’s indication that it was last booted on the 24th of September 1998… that’s almost 20 years ago 🙈

More to follow.