Category Archives: video

Double life and streaming video

I’m one of those people who live a double life, that is, have two jobs. After hours I love to design and build websites, but in my daytime job I am database manager in the IT department at NHNZ Limited, the film production company based in Dunedin, New Zealand, and well-known for its documentaries screening on Discovery Channel, Animal Planet, National Geographic Channel, The History Channel, and so on. Since the NHNZ staff have a professional interest in those TV channels, our IT techies have set it up so that we can watch a variety of channels directly from a browser, on our computer screens. So recently a colleague asked me: “How is it possible that we can watch TV on our computer screens? How does it work?” I had only a vague idea, but it was not hard to do a bit of research and then to write it up for the in-house staff magazine. So for those who are interested, here’s what I told them:

It seems to work by magic, but how is it possible that we can watch TV on our computer screens? The technology at work here is UMS – Unified Messaging Service.

Unified Messaging (or UM) is the integration of different electronic messaging and communications media (e-mail, SMS, Fax, voicemail, video messaging, etc.) technologies into a single interface, accessible from a variety of different devices. While traditional communications systems delivered messages into several different types of stores such as voicemail systems, e-mail servers, and stand-alone fax machines, with Unified Messaging all types of messages are stored in one system.

You will have noticed that our telephone system operates within the computer network. So there we have our computers, email , fax and telephone services integrated. With UMS we are able to connect the TV channel streaming video server to our network and Hey! Presto! we are watching TV on the computer screen, from within the browser.

TV signal streaming to PC

TV signal streaming to PC

For those who would like a bit more detail, for example, the HTML snippet on the “NHNZ TV Streams” web page that does it all for the TV1 channel is the following, set within the usual link code:

ums:%5C%5CRTP:10.221.92.80:5119%5Ctv1

The code snippet “%5C” is the URL encoding for a back-slash, so to make it easier to read, we can translate the HTML snippet to: ums:\\RTP:10.232.91.70:5119\tv1

Now let’s break it down. The first 3 characters “ums” calls the messaging technology.

The next 3 characters “RTP” stands for Real Time Protocol – it defines a standardized packet format for delivering audio and video over the Internet. RTP is designed for end-to-end, real-time, transfer of multimedia data.

The IP address “10.232.91.70” is that of the streaming video server which delivers the different channels (by the way, this is not the real IP address given here). A streaming video server is a specialized application which runs on an Internet server. The streaming video server, in turn, has been set up to deliver the video stream of the channel that is “called” by the browser.

The TCP (Transmission Control Protocol) port “5119” guarantees delivery of data and that the packets of data will be delivered in the same order in which they were sent.

The final bit of code “tv1” identifies the channel you will see when you click the link.

But where does the TV channel broadcast signal come from? In the server room there is an array of Sky decoders that send the channel signal into converters that deliver MP4 video for each channel to the streaming video server and from there via the network to your PC.

TANSTAAFL or streaming DVD

There Ain’t No Such Thing As A Free Lunch or streaming DVD. So, Web Developer, has a client ever asked you to upload a DVD to his website or blog? It happens. It happened to me. I could also have named this story: “A Comedy of Errors”.

DVD is a really baaad format, especially compared with broadcasting formats. However, it works well for showing video on a TV screen, and it looks good. But: DVD cannot be uploaded to a website and streamed over the internet.

A DVD consists of several files: audio, video and menus, all muxed together. Most consumer DVD-Video discs use either 4:3 or anamorphic 16:9 aspect ratio MPEG-2 video, stored at a resolution of 720×480 (NTSC) or 720×576 (PAL) at 23.976, 29.97, or 25 frames per second.

One cannot convert a DVD to any of the formats that can be streamed, e.g. QuickTime, Flash video, Windows Media Video, etc. So what to do? One has to re-capture the DVD by playing it through a DVD player and special hardware to capture the video, into editing software such as iMovie or FinalCutPro. Once it has been captured and saved as a new project, it can be exported to the desired streaming format (we used QuickTime codec H.264).

It sounds easy, but there are all kinds of pitfalls along the way in this process:

  1. Aspect ratio: What aspect ratio is the DVD? The DVD player must be set to the same aspect ratio. Aspect ratio is tricky. All standard definition digital video has a native aspect ratio of 4:3. So in my story, the first thing that happened is the image got squashed sideways from 16:9 to 4:3. With some fiddling of settings by an expert in the filming industry that problem got sorted, even avoiding the tell-tale black bars across the top and bottom of the image as when a widescreen film is watched on the standard 4:3 TV screen.
  2. Text-safe area: In my example the DVD content had some talking heads, interspersed with titles (text). Has the editor/author of the DVD observed the text-safe area rule? No! This means that if someone with a standard TV plays this DVD the outside edges of the image may be cut off to make the image fit the screen vertically, and if text extends to the edge of the image, some of it will be lost. Once again, my expert in the filming industry found a way around that gnarly problem.
  3. File size: The DVD I was presented with consisted of just under 15 minutes of full-screen video, but the combined file size was about 817 MB. Even if one could stream this, the intended audience consists of parents in New Zealand, where residential internet access is notoriously slow, even with the local brand of broadband. It would be impossible to watch online. The QuickTime file created at the end of our re-capture and export process has a file size roughly one-fifth of that (139 MB), at an on-screen video size of 320 x 180 pixels.
  4. Length of video: This video plays for just under 15 minutes. That’s a bit on the long side. For example, YouTube does not allow uploading of videos in excess of 10 minutes in length. So, we had to cut the video into Part 1 and Part 2 after several attempts at uploading it to a blog failed.

You might say 320 x 180 pixels is very small, but making it any bigger will pose more of a non-usability risk for the intended audience. In any case, with mostly talking heads the smaller size is quite acceptable.

QED (or not, as the case may be)