^

Belits Computer Systems


Media server

Hotel and home media systems, audio/video jukeboxes and DVRs

Various audio/video distribution systems, time-shifting recorders and jukeboxes exist as a part of home, hotel and other entertainment systems. While the scale and types of inputs and outputs vary, the basic idea is that the system has:

  1. Sources. Those may include over the air TV and radio, subscription-based media delivery services such as satellite and cable TV, satellite radio, commercially produced recorded media such as CD and DVD, and sometimes even some locally recorded and broadcasted content (announcements, advertisements, emergency notifications).
  2. Storage. Though various options exist, currently a hard drive or a RAID array of hard drives, either local or accessible over some local network, is the best option for all such systems with possible exception of self-contained portable devices, where flash memory has some advantages.
  3. Distribution. This component may be completely missing from a self-contained device, however in a large system it may be analog cable, proprietary packet-switching network, or a general-purpose IP-based network.
  4. Client device. May be combined with storage, or communicate with it over the distribution link. May be a cable box, DVR, a computer running some media player/DVR system, "networked media receiver" device, cellular phone or some device temporarily connected to the server, downloading media for playback.
  5. Playback device. May be a TV, monitor, speakers, headphones, etc.
  6. Request interface. May be a jukebox/playlist GUI (with channels for sources or some hierarchy that organizes stored audio/video) using keyboard/mouse (for a computer), built-in control panel (portable devices) or remote control (TVs and media receivers). TV and DVR-style controls may also include channels with timeline for recording and list of recorded segments for playback. Input devices are the same as with the jukebox interface.
  7. Playback controls. Usually traditional play/pause/forward/rewind/next/previous block of controls accessible as buttons on the device or a remote control, and possibly a playlist editor, settings for alarm clock, etc.

Media server implementation

To implement such a system for a large number of simultaneous users, it makes sense to share capture devices and use, whenever possible, subscription plans that provide discounts for multi-user setups. In any configuration that works within a single building, users can receive streaming video and audio with real-time controls over a local network -- either dedicated for this purpose or combined with general-purpose LAN, Internet access, VoIP, etc. When used as a regular radio/TV it should provide streaming from capture devices, and implement a simple access control for subscription-based services.

The system should be configured in co-operation with subscription-based access providers, so the users will not be able to use it to circumvent subscription model. The operator of such system should have an agreement with provider that prevents him from using his access to capture and storage devices to circumvent the access restrictions set by providers. Freely accessible media, such as analog radio and TV, does not need such agreements, however in most of installations it makes sense to use the same system for restricted and unrestricted content, so authentication/authorization mechanism should be implemented and suitable for various access policies.

The mechanism for distribution of live content can include transcoding and preprocessing -- for example, a media stream received as MPEG-2 can be re-encoded as MPEG-4, a deinterlaced version of the stream may be provided for high-resolution devices, etc. Analog media should be digitized in a format suitable for its quality. DVR-like functionality such as pause and seeking may be provided based on available resources.

Full DVR functionality can be provided in a manner similar to individual PVR systems, except the recordings are stored on the server, in the "best" format suitable for the users that requested it. Playback may involve live transcoding to lower bitrates for devices that request it, or transcoding may be performed simultaneously or after recording depending on the resources (CPU time and storage) available. This model is most efficient for popular content that gets requested by a large number of users, so only one copy will have to be recorded. Single media server setup may include multiple computers with media grabbers, thus allowing to simultaneously record multiple channels even when grabber devices used would be unreasonably expensive in a single-user multi-channel setup. Schedule information for TV and radio broadcasts is usually available from providers and, in combined form, from subscription-based schedule services, so implementers of this system can simply bundle subscription with it, or operators can subscribe to them using compatible client implementations supplied with the system.

DVR availability, additional functionality such as commercials marking/skipping, and retention policy can be defined by operator, and may be restricted by the agreements with content providers, so system should implement sufficient controls for those policies to implement them in the least restrictive way that still complies with the providers' requirements.

Client devices

The system should be primarily designed for client devices without storage, so there should be no need to implement any additional restriction on the use of media on the client's side. When general-purpose computers or DVR-capable devices are used within the system, it may be necessary to include restriction on recording in the user agreement. If necessary, streams may be encrypted with session keys distributed in some manner at the time when client device is authenticated with the server.

Controls and requests to the server should be sent to the server out of band, using HTTP-based protocol, either through regular web clients, or HTTP-wrapped RPC protocols such as SOAP.

Server hardware

Media capture requires the use of various cards that are primarily designed for relatively large desktop, media PCs or professional media processing computers. Those cards usually are 32-bit PCI, full-height or oversized (card protrudes over PCI bracket), but below full length. Even 1u TD-44 server should be able to support one of those cards, and larger configurations are possible with 2u servers. Bandwidth necessary for capture may only exceed PCI bus capability when multiple cards without encoders are used, so such setups should be avoided. Cards such as Hauppauge WinTV PVR-500 with dual analog tuners and hardware MPEG-2 encoders should be suitable for analog TV recording, and various similarly low-bandwidth devices for HDTV, cable and satellite TV (already compressed) are currently available on the market, so even with multiple simultaneously recording channels the PCI bus bandwidth will be sufficient.

CPU performance and RAM necessary for actual recording, sending streams to the users, or processing schedules are negligible, however any re-encoding or commercials detection tasks are extremely CPU-consuming. This means, media server architecture should allow easy passing of the streams between computers so those tasks can be redistributed in the efficient manner, regardless of the location of the capture devices. This should be possible either by performing those operations on stored recordings, or on streams passed between the computers. Since this system can easily tolerate high latency, a Gigabit Ethernet switch should be sufficient to provide necessary connections between servers.

Storage requirements for this kind of system may be very high, with upper limit determined by the recorded bandwidth of all input channels multiplied by maximum retention time for the recording. In reality it's very unlikely that this amount of data would ever be stored, and a system may implement some hierarchy of priorities when determining which content has to be deleted when the storage approaches its limits. In any case the system should be capable of using internal storage in 1u and 2u servers, external enclosures with controllers in the servers, network-attached storage, SAN, etc. It should be possible for any of the computers in this configuration to record on any storage media regardless of its physical location, similar to any media stream being possible to direct to any computer for re-encoding. It may be sufficient if streaming to the user was possible only from the local media as long as client can be correctly pointed toward the source for any stream that it is supposed to receive.

Servers should be able to support high performance CPUs, and allow use of large media capture and storage interface boards within 1u or 2u rack-mountable case. TD-44 and TD-88 servers can be easily used in such a media server setup. Additionally lack of rear-attached cables should simplify routing of relatively inflexible coaxial cables to the capture boards.