The live web cam which is located on the Koningsplein in Amsterdam has been running for a decade in various shapes and forms.

In all of these set-ups we used to run the actual content delivery systems ourselves, from our own networks.

The latest incarnation is a cloud-based set-up which uses Wowza Streaming Engine to relay a video stream to YouTube and takes advantage of the new Youtube Live features to deliver the content to users.

This set-up has several benefits over the systems that we used to run locally:

Overview

 

Configuration of the camera

The camera is an Axis Q1755, which is mounted outside our office on the 4th floor of Singel 468 in Amsterdam. 

The streaming server will request an RTSP stream, which is done over TCP port 554. So make sure the port isn't firewalled off.

Important settings:

Configuration of the streaming server

The server is a VMware VM called coppi.terena.org, which runs Ubuntu 14.04 LTS and is located in the SURFnet datacenter in Amsterdam.

It runs Wowza Streaming Engine software (WSE). We have a perpetual license for the software. The management interface is HTTPS/Apache.

Follow the instructions on http://www.wowza.com/forums/content.php?217 and install WSE.

This howto explains how to configure WSE for YouTube live streams: https://software.intel.com/en-us/articles/intel-inde-media-pack-for-android-tutorials-video-streaming-from-device-to-youtube

I had some trouble getting WSE to work properly in an IPv6-only environment, turns out you have to force Java to explicitly use IPv6.

See http://www.wowza.com/forums/showthread.php?37909-PushPublishRTMP-doesn-t-work-with-IPv6 on how to do that.

The RTMP push out to YouTube is done to two host names (a.rtmp.youtube.com and b.rtmp.youtube.com). Initially I had put these hostname in my ip6tables configuration, but eventually the cam went offline. Turns out that the IP addresses are not stable - which is perfectly valid. But because the WSE processes are long lived process, and the ip6tables rules only get loaded at boot time, eventually the rtmp.youtube.com host names would start resolving to something else, and the outgoing stream would get blocked by the ip6tables script. I had to open up outgoing TCP port 1755 to the entire Internet. Not a big deal, but something to keep in mind.

 

Gotchas