Sun Microsystems MEDIACENTER 2.1 User Manual

Sun MediaCenter Server Administrator’s Guide
Release 2.1
A Sun Microsystems, Inc. Business 901 San Antonio Road Palo Alto, CA 94303 USA 415 960-1300 fax 415 969-9131
Part No.: 805-3194-10 Revision A, December 1997
1997 Sun Microsystems, Inc. All rights reserved. 901 San Antonio Road, Palo Alto, California 94303 U.S.A.
This product and related documentation are protected by copyright and distributed under licenses r estricting its use, copying, distribution, and decompilation. No part of this product or related documentation may be reproduced in any form by any means without prior written authorization of Sun and its licensors, if any .
Portions of this product may be derived from the UNIX® and Berkeley 4.3 BSD systems, licensed from UNIX System Laboratories, Inc., a wholly owned subsidiary of Novell, Inc., and the University of California, respectively . Thir d-party font software in this product is protected by copyright and licensed from Sun’s font suppliers.
RESTRICTED RIGHTS LEGEND: Use, duplication, or disclosure by the United States Government is subject to the restrictions set forth in DFARS 252.227-7013 (c)(1)(ii) and FAR 52.227-19.
The product described in this manual may be protected by one or more U.S. patents, foreign patents, or pending applications. TRADEMARKS
Sun, the Sun logo, Sun Microsystems, Solaris, Sun Media Center , SunA TM, SunFastEthernet, Java, and HotJava are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and certain other countries. UNIX is a register ed trademark in the United States and other countries, exclusively licensed through X/Open Company , Ltd. OPEN LOOK is a r egistered trademark of Novell, Inc. PostScript and Display PostScript are trademarks of Adobe Systems, Inc. Mpeg Expert and Applied Vision ar e trademarks of Applied Vision. All other product names mentioned her ein are the trademarks of their respective owners.
All SP ARC trademarks, including the SCD Compliant Logo, are trademarks or registered trademarks of SPARC International, Inc. SP ARCstation, SP ARCserver , SPARCengine, SP ARCstorage, SP ARCwar e, SP ARCclassic, SPARCcluster, SPARCdesign, SP ARC81 1, SP ARCprinter , UltraSP ARC, micr oSP ARC, SP ARCworks, and SPARCompiler are licensed exclusively to Sun Microsystems, Inc. Products bearing SP ARC trademarks are based upon an ar chitecture developed by Sun Microsystems, Inc.
The OPEN LOOK® and Sun™ Graphical User Interfaces were developed by Sun Microsystems, Inc. for its users and licensees. Sun acknowledges the pioneering efforts of Xerox in researching and developing the concept of visual or graphical user interfaces for the computer industry . Sun holds a non-exclusive license from Xerox to the Xer ox Graphical User Interface, which license also covers Sun’s licensees who implement OPEN LOOK GUIs and otherwise comply with Sun’s written license agreements.
X Window System is a trademark of the X Consortium.
THIS PUBLICATION IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON­INFRINGEMENT.
THIS PUBLICATION COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE PERIODICALL Y ADDED T O THE INFORMATION HEREIN; THESE CHANGES WILL BE INCORPORA TED IN NEW EDITIONS OF THE PUBLICATION. SUN MICROSYSTEMS, INC. MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN THIS PUBLICATION AT ANY TIME.
Please Recycle
Contents
1. Introduction 1-1
1.1 Introduction 1-1
1.2 Sun MediaCenter Hardware 1-2
1.3 Sun MediaCenter Software 1-4
1.3.1 Media File System (MFS) 1-5
1.3.2 Media Stream Manager 1-7
1.3.3 Content Manager 1-8
1.3.4 Web-based Tools 1-8
1.4 Video Output Interfaces 1-8
1.4.1 ATM 1-9
1.4.2 LAN 1-9
1.5 Content Preparation and Loading 1-10
1.6 Server Management 1-11
1.7 Push Model 1-11
1.8 Design Benefits 1-12
2. Preparing and Loading Content 2-1
2.1 General MPEG Encoding Requirements 2-1
2.2 MPEG Encoding Requirements for Trick Play 2-2
Contents iii
2.3 Splice Points 2-3
2.3.1 Packet Boundary 2-3
2.3.2 closed_gop 2-4
2.3.3 payload_unit_start_indicator 2-4
2.3.4 adaptation_field_control 2-4
2.3.5 random_access_indicator 2-4
2.3.6 PCR_flag 2-4
2.4 Content Loading 2-5
2.5 References 2-7
3. Monitoring the Server 3-1
3.1 Overview 3-1
3.2 Using the WebAdmin Tool 3-2
3.2.1 Invoking the Tool 3-2
3.2.2 Common Page Elements 3-5
3.3 Resource Utilization 3-5
3.4 Streaming Videos 3-6
3.5 Copy Sessions 3-9
3.6 Disk Capacity 3-12
3.7 Troubleshooting 3-15
3.7.1 Disk Health 3-17
3.7.2 Console Log 3-18
3.7.3 Scheduler and Bitpump 3-20
4. Moving Content 4-1
4.1 Overview 4-1
4.2 Using CmTool 4-2
4.2.1 Invoking the Tool 4-2
4.2.2 Common Page Elements 4-5
4.3 Loading Content 4-5
iv Sun MediaCenter Server Administrator’s Guide • December 1997
4.4 Table of Contents Page 4-12
4.4.1 View Menu 4-13
4.4.2 Selected Menu 4-15
5. Sun MediaCenter Server Utilities 5-1
5.1 Setting a Title Access Control List 5-1
5.2 The smc_copy Utility 5-4
5.3 The smc_tar Utility 5-8
5.3.1 Syntax and Options 5-8
5.3.2 Content Loading 5-9
5.3.3 Copying Content 5-10
5.3.4 Remote Copying and Extraction 5-12
5.3.5 Examples 5-12
5.4 The smc_ls Utility 5-17
5.5 The smc_rm Utility 5-21
6. Sun MediaCenter Server FTP Daemon 6-1
6.1 Keyword for Video-File Functions 6-3
6.2 Video-File Attributes 6-4
6.3 Video-File Commands 6-5
6.3.1 Listing Files 6-7
6.3.2 Moving Files 6-9
6.3.3 Renaming Files 6-13
6.3.4 Deleting Files 6-14
6.4 Loading Content with ftp 6-14
Contents v
7. Server Output Data Format 7-1
7.1 Introduction 7-1
7.2 ATM Encapsulation 7-2
7.2.1 MPEG-2 Transport Stream Packet Encapsulation 7-2
7.2.2 MPEG-2 Program Stream Packet Encapsulation 7-3
7.2.3 MPEG-1 System Stream Packet Encapsulation 7-3
7.2.4 Thomson Electronics Packet Encapsulation 7-3
7.2.5 MPEG-2 Encapsulation over Classical IP over AAL5 7-3
7.3 ATM Addressing 7-4
7.3.1 MPEG over AAL5 7-4
7.3.2 MPEG-2 over Classical IP over AAL5 7-4
7.4 Fast Ethernet Encapsulation 7-5
7.4.1 MPEG-2 Transport Stream Packet Encapsulation 7-6
7.4.2 MPEG-2 Program Stream Packet Encapsulation 7-7
7.4.3 MPEG-1 System Stream Packet Encapsulation 7-7
7.4.4 Thomson Electronics Encapsulation 7-7
7.5 Fast Ethernet Addressing 7-7
7.6 Specifying Encapsulation 7-8
7.7 Differences Among Different Types of Links 7-9
7.8 References 7-9
8. Administering MFS Disks 8-1
8.1 Monitoring MFS Disks 8-1
8.2 MFS Utilities 8-2
8.2.1 mfs df 8-2
8.2.2 mfs diskusg 8-4
8.2.3 mfs repair 8-5
8.2.4 mkmfs 8-8
8.3 Replacing a Failed Disk 8-10
vi Sun MediaCenter Server Administrator’s Guide • December 1997
9. Access Control Lists 9-1
9.1 ACL Files 9-1
9.2 Permissions 9-2
9.3 Server ACL 9-2
9.4 Player ACL 9-3
9.5 Title ACL 9-4
9.6 Session ACL 9-4
10. Troubleshooting 10-1
10.1 Symptoms and Possible Solutions/Workarounds 10-1
10.2 Error Messages 10-4
10.2.1 Server Console Messages 10-4
10.2.2 MFS Error Messages 10-5
A. Setting up the SNMP Agent A-1
A.1 The Sun MediaCenter Server MIB A-2 A.2 Enabling Management by Solstice Domain Manager A-6 A.3 Enabling Trap Handling A-9
B. Creating a Content Package B-1
B.1 Content Package B-2 B.2 The TOC File B-3
B.2.1 ContentObjects B-5 B.2.2 BitStreamObjects B-6
B.2.3 DataFileObjects B-7 B.3 Simplest Case TOC File B-8 B.4 TOC File for Large Files B-9 B.5 Index File Requirements B-10
B.5.1 Normal Play Time B-11
B.5.2 File Offset B-12
Contents vii
B.6 Tape Storage Format B-12
B.6.1 Tar Format B-12 B.6.2 Tapes B-14
B.7 Example B-14 B.8 References B-18
Glossary Glossary-1
Index Index-1
viii Sun MediaCenter Server Administrator’s Guide • December 1997
Preface
This document, the Sun MediaCenter Server Administrator’s Guide, tells you how to set up, load content onto, and perform other administrative duties relevant to a Sun™ MediaCenter™ server. Specifically, this document describes:
at a high level, the hardware and software architecture of the Sun MediaCenter
server;
the content format required by the Sun MediaCenter server, plus utilities to load
and backup that content;
the format of the data output by the Sun MediaCenter server;
how to configure the SNMP agent shipped with the Sun MediaCenter for use
with Solstice™ Domain Manager™ or another SNMP-capable network manager.
Who Should Use This Book
This manual is intended for those who administer the Sun MediaCenter server. We expect the reader to have experience in Solaris® network and system
administration and be familiar with maintenance issues related to servers.
Preface ix
The Sun MediaCenter Documentation Suite
This manual is a companion to the Sun MediaCenter Server Installation and
Configuration Manual, the Sun MediaCenter Server Programmer ’s Guide and the Sun MediaCenter UltraSPARC Hardware Manual. Together these manuals are
complementary of the hardware manuals shipped with the Sun products that make up a Sun MediaCenter server. These documents include manuals for the server, for the network interface (such as SunFastEthernet™ documentation), and the disk subsystem.
How This Book Is Organized
Chapter 1 “Introduction,” introduces the Sun MediaCenter software at a high-level. Chapter 2 “Preparing and Loading Content,” specifies the Sun MediaCenter
server ’s requirements for MPEG content. Trick-play format is defined here. Chapter 3 “Monitoring the Server,” describes the WebAdmin tool, a Web-based
interface for monitoring a Sun MediaCenter server. Chapter 4 “Moving Content,” describes the CmTool, a Web-based interface for
transferring content to a Sun MediaCenter server.
Chapter 5 “Sun MediaCenter Server Utilities,” describes the use of smc_copy and smc_tar, used for moving content, as well as smc_ls and smc_rm.
Chapter 6 “Sun MediaCenter Server FTP Daemon,” tells you how to use ftp to move content between a client machine and a Sun MediaCenter server.
Chapter 7 “Server Output Data Format,” describes the format of the data output by the Sun MediaCenter server.
Chapter 8 “Administering MFS Disks,” tells you how to monitor disks in the Media File System and how to deal with single and multiple disk failures.
Chapter 9 “Access Control Lists,” describes access control lists that you can create and modify for Sun MediaCenter operations.
Chapter 10 “Troubleshooting,” presents some problems you might encounter in the use of your server, along with possible solutions.
x Sun MediaCenter Server Administrator’s Guide • December 1997
Appendix A “Setting up the SNMP Agent,” tells you how to make use of the SNMP agent that is shipped with the Sun MediaCenter server.
Appendix B “Creating a Content Package,” describes how to prepare content if you are unable to use ftp for loading content.
The Glossary lists terms from the realm of video technology, as well as terms specific to the Sun MediaCenter product.
What Typographic Changes Mean
The following table describes the typographic changes used in this book.
TABLE P-1 Typographic Conventions
Typeface or Symbol Meaning Example
AaBbCc123 The names of commands, files,
and directories; on-screen computer output
AaBbCc123
AaBbCc123 Command-line placeholder:
AaBbCc123 Book titles, new words or
What you type, contrasted with on-screen computer output
replace with a real name or value
terms, or words to be emphasized
Edit your .login file. Use ls -a to list all files.
machine_name% You have mail.
machine_name% su Password:
To delete a file, type rm filename.
Read Chapter 6 in User’s Guide. These are called class options. You must be root to do this.
xi
Shell Prompts in Command Examples
The following table shows the default system prompt and superuser prompt for the C shell, Bourne shell, and Korn shell.
TABLE P-2 Shell Prompts
Shell Prompt
C shell prompt machine_name% C shell superuser prompt machine_name# Bourne shell and Korn shell
prompt Bourne shell and Korn shell
superuser prompt
$
#
xii Sun MediaCenter Server Administrator’s Guide • December 1997
CHAPTER
1
Introduction
Introduction page 1-1 Sun MediaCenter Hardware page 1-2 Sun MediaCenter Software page 1-4 Video Output Interfaces page 1-8 Content Preparation and Loading page 1-10 Server Management page 1-11 Push Model page 1-11 Design Benefits page 1-12
1.1 Introduction
The Sun MediaCenter server is a combination of standard server hardware and special software that is optimized for and dedicated to the storage and delivery of video streams. The special software includes:
a modified Solaris kernel;
modified network interface drivers, dedicated to continuous-media output;
a Media File System (MFS), optimized for the demands of the delivery of
isochronous bit streams;
a Media Stream Manager (MSM), which includes an RPC-based API, that
provides users access to the server;
1-1
a Content Manager (CM), which includes an RPC-based API that allows users to
move content between servers or between a server and a client.
Web-based tools that allow you to configure a Sun MediaCenter server, monitor
server operations, and transfer video content to a server.
The Sun MediaCenter server delivers MPEG bit streams at a constant bit rate. The content of the streams are stored on an array of disks. The server guarantees that, unless the server hardware fails, once a stream request is accepted, it will be delivered at the specified constant bit rate until the stream ends or the server is told to stop.
Using a Sun MediaCenter server, you can begin playing a stream within seconds after storage of that stream on the server has started. This feature is called “playthrough”.
The Sun MediaCenter server protects against single-disk failures by implementing a parity mechanism similar to RAID Level 4 (Block-Interleaved Parity).
1.2 Sun MediaCenter Hardwar e
The Sun MediaCenter product line is built upon existing Sun hardware and software. This provides you with excellent performance (especially in terms of cost per stream) and flexibility in interfacing Sun MediaCenter servers to their environment.
Each model of the Sun MediaCenter product line is designed to maximize input/ output throughput from the server’s disk subsystem through a network interface, to an output device. Each model is equipped with a large amount of RAM, for buffering streams and handling online content loading, and a large amount of disk storage.
Within a disk subsystem, specific disk models are chosen for their appropriateness for multimedia applications.
The Sun MediaCenter hardware architecture is shown in FIGURE 1-1.
1-2 Sun MediaCenter Server Administrator’s Guide • December 1997
Control
Content
Sun MediaCenter Server
Media Streams
(Fast Ethernet or ATM)
From tape, network-accessible file, or live source
Fast/Wide or Ultra
SCSI
Media
File System
Files
FIGURE 1-1 High-level Hardware Architecture
Content is loaded onto the Sun MediaCenter server via the server ’s Content Manager, over a LAN or using 4- or 8-mm DAT tape. Video streams are controlled through network interfaces distinct from the network interfaces used for video output, using the Media Stream Manager (RPC-based) interface described in the Sun MediaCenter Server Programmer’s Guide.
Chapter 1 Introduction 1-3
1.3 Sun MediaCenter Software
The Sun MediaCenter software has three major components, the Media File System (MFS), the Media Stream Manager (MSM), and the Content Manager (CM). (In addition to these, there are special network interface drivers, which are tightly coupled with the MFS.) The relationship of these modules is illustrated in FIGURE 1-2.
Java™ Applet Java™ Applet
Media Stream
Manager Client API
Sun MediaCenter
Server
RPC
Media Stream
Manager
Client
Content
Media Stream
Manager
Media File System
Network Drivers
Content
Manager
RPC
Content Manager
Client API
Content
Manager
User Space Kernel Space
Video Streams
FIGURE 1-2 Sun MediaCenter Software Architecture
1-4 Sun MediaCenter Server Administrator’s Guide • December 1997
With the exception of the APIs for the MSM and CM, the workings of the server’s software components are largely invisible to the user. This is particularly true of the MFS, access to which is exclusively throughout the MSM and CM.
The Sun MediaCenter software offers the following features:
Guaranteed stream delivery rate
Once a stream is accepted for delivery, the server delivers the stream contents at a guaranteed rate until the end of the stream content is reached, the server is asked to stop playing the stream, or server hardware fails.
Independent streams
Delivered streams are independent: they can be stopped and started individually; output streams might all be playing simultaneously from different portions of the same content stream or from different content streams.
Online loading
The server maintains delivery of streams as the highest priority task, so that as the server approaches its maximum bandwidth in stream delivery, any content loading taking place will slow and, at some point, stop, until such time as the server recovers sufficient resources to resume loading. (Note that you cannot load content if the server is reading data from the parity disk, which occurs following a disk failure.)
Playthrough
The server software supports a playthrough capability wherein a Sun MediaCenter server can deliver streams from a title as that title is stored. A given piece of content can be played from the server only five seconds after storage of it has begun.
The following subsections describe the components of the Sun MediaCenter software.
1.3.1 Media File System (MFS)
The MFS is designed to deliver multimedia data from an array of attached disks to an output network. In addition to providing the foundation for all of the features listed above, the file system supports:
Recovery from single-disk failures
The MFS will recover from a single disk failure after a small start-up interval (less than 10 seconds). It uses a strategy similar to RAID-4. The number of content disks for each parity disk varies with the disk subsystem used for a particular server model.
Chapter 1 Introduction 1-5
Hot swappability
The MFS supports the replacement of a failed disk while the server continues to deliver streams. Following disk replacement, you use a single command to restore data from the parity disk to the new disk and return the server to normal playback mode. The procedure for hot swapping a disk is described in Chapter 8, “Administering MFS Disks.”
Efficient use of disk bandwidth
The file system is designed to extract a significant portion of the available disk bandwidth (50-90%). Content is striped across the disk array.
The MFS compensates for thermal recalibration delays.
Efficient transfer from disk to output
The MFS is designed to transfer data from the disk array to the output network with a minimum of processor involvement.
Large file and filesystem size
An MFS file can be as large as (2
31
2
files. In practice, file size and filesystem size are limited by available disk
64
)- 1 bytes in length; an MFS can contain up to
space rather than any limits imposed by the MFS.
High-resolution rate control
The MFS controls the rate of output so that any one output packet may be delivered within the resolution of the underlying hardware/software system.
Random access
The controller of a stream may stop and start a stream at nearly arbitrary points. The server maps these requests to the nearest content packet (for example, MPEG­2 Transport Packet) boundary. This random access feature is used in trick play. Section 2.2, “MPEG Encoding Requirements for Trick Play,” on page 2-2 for a discussion of splice points in trick-play files.
Admission control
The MFS will not accept a request for a new stream that would cause it to fail to deliver all its streams at the request data rate.
File locking
The MFS ensures that streams that are currently being played are not removed.
The MFS consists of five basic subsystems:
file system layout manager
The MFS layout manager allocates and deallocates disk blocks to content using striping and parity algorithms.
1-6 Sun MediaCenter Server Administrator’s Guide • December 1997
scheduler
The scheduler sorts and schedules disk I/O, manages bit pump buffers, performs admission control, and schedules output driver activity.
bit pump
The bit pump is responsible for allocating internal buffering and efficiently transferring data between the disk and the output drivers using the internal buffers. It is responsible for fine-grain scheduling and rate control of the output driver. The bit pump is dependent on the particular output driver used, whether it be for Fast Ethernet or ATM.
disk driver
The output driver is responsible for low-level output device management and encapsulating outgoing data according to the rules of the output medium, and for efficiently transferring data from the internal buffers to the output medium.
See Chapter 7 for a description of the format of output data.
output driver
The disk driver is responsible for efficiently transferring disk data to the fixed internal buffers. It consists of a SCSI disk driver and a modified SCSI host adapter driver.
The MFS components listed above are illustrated in FIGURE 1-3.
Media File System
Layout Manager
Scheduler
Bit Pump
Buffers
Disk
Driver
Output
Driver
FIGURE 1-3 Media File System Components
1.3.2 Media Stream Manager
The MSM controls the video streams stored in the MFS. The MSM implements a set of procedures that interact with the MFS to allow you to stop, start, pause, and resume video bit streams. A central notion of the MSM is the playlist, from which titles can be played on a time-synchronized basis. Each playlist is associated with a player, which can be passed among multiple clients.
Chapter 1 Introduction 1-7
The MSM’s primary interface is the MSM Client API, described in the Sun MediaCenter Server Programmer’s Guide.
The MSM supports playthrough, trick play, and other features of the Media File System.
1.3.3 Content Manager
The CM provides for the loading of content onto a Sun MediaCenter server. Server requirements for content, such as Table of Contents files and index files (for trick play) are handled transparently by the CM. The CM also supports the movement of content between Sun MediaCenter servers and between a server and a client. This capability provides for the backing up and restoring of video files.
The CM has a server-based set of RPCs and a SPARC client-based library, both described in the Sun MediaCenter Server Programmer ’s Guide. Chapter 4 describes a Web-based tool for moving content onto a Sun MediaCenter server. Chapter 5 presents a set of utilities based on CM. Chapter 6 describes the Sun MediaCenter FTP daemon, which is also based on CM.
1.3.4 Web-based Tools
The following Web-based tools are provided with the Sun MediaCenter server software:
The Configure utility allows you to configure a Sun MediaCenter server. This tool
is described in the Sun MediaCenter Installation and Configuration Manual .
WebAdmin allows you to monitor server operations. This tool is described in
Chapter 3.
CmTool allows you to transfer video content to a server. This tool is described in
Chapter 4.
1.4 Video Output Interfaces
Sun MediaCenter software is designed to output streams over ATM or Fast Ethernet, using SunATM™ or SunFastEthernet™, respectively. With both types of output, the streams are delivered at a constant bit rate; there is no dynamic flow control or error recovery protocol. This is referred to as the “push” model of stream delivery and is discussed in Section 1.7, “Push Model,” on page 1-11.
1-8 Sun MediaCenter Server Administrator’s Guide • December 1997
1.4.1 ATM
In an ATM environment, one or more Sun MediaCenter servers are directly connected to an ATM switch via ATM host adapters. Digital video streams are sent to clients using ATM virtual circuits.
FIGURE 1-4 Sun MediaCenter Servers in ATM Environment
1.4.2 LAN
In the LAN environment, each Sun MediaCenter server is connected to one high­speed 100BaseT subnetwork via one or more Fast Ethernet host adapters. Digital video streams are sent to their destination(s) using LAN packets. Destination clients can access the video streams by connecting directly to one of the 100BaseT networks. Alternatively, the 100BaseT networks can be connected to an optional packet­filtering switch that routes to independent 10BaseT networks. This allows individual destination clients to connect to a 10BaseT network without affecting the aggregate bandwidth available.
Chapter 1 Introduction 1-9
FIGURE 1-5 Sun MediaCenter Servers in LAN environment
1.5 Content Preparation and Loading
The Sun MediaCenter software specifies a format for content, described in Chapter 2, “Preparing and Loading Content.”
Sun MediaCenter software uses the Content Manager for storing video content on the server. The Content Manager offers the following interfaces:
A set of RPCs that enable moving of content between local storage and a Sun
MediaCenter server. Also, there are RPCs to delete and rename content and to manipulate access control lists.
A client library based on the RPCs described in the preceding bullet. This library
provides you the features of the RPCs and frees you from having to deal with network programming.
CmTool, a Web-based interface for transferring video content onto a Sun
MediaCenter server.
A set of utilities based on the Content Manager. These include smc_tar,
smc_copy, and a Sun MediaCenter FTP daemon. In some cases, these utilities
automatically create the administrative files that support a bit stream.
Once content is stored in the MFS, you use the MSM to play it. The MSM supports VCR-like functions, such as play, pause, fast-forward (at multiple speeds), and reverse.
1-10 Sun MediaCenter Server Administrator’s Guide • December 1997
1.6 Server Management
An SNMP agent is provided is provided with the Sun MediaCenter software. This agent includes the following MIB information:
current number of playing streams;
current aggregate bandwidth;
number of missed deadlines;
number and location of disk errors.
The SNMP agent also supports the following traps:
Missed_Deadline
Admission_Failed
Disk_Failure
See Appendix A for a description of and instructions for configuring the SNMP agent.
1.7 Push Model
The Sun MediaCenter server implements the “push” model of bit stream delivery. In this model, the server initiates and delivers bit streams over a network interface dedicated to video output. On this interface, there is no “back channel” for decoder­to-server flow control. The burden of staying within the time constraints of bit streams is entirely on the server. On the receiving end, the decoder must be fast enough to keep up with the server, but does not bear any responsibility for maintaining timely delivery.
The push model differs from the “pull” model, in which the receiving device engages a video server in a protocol for connection setup and bit-stream delivery. Both server and receiver must be able to look inside the bit stream to interpret and, possibly, take action, based on the contents of MPEG packets.
The push model has an advantage over the pull model in that receiving devices do not require intelligence for communicating with the server. Receiving devices can be simpler and less expensive than pull-model receivers.
Consistent with the push model, the Sun MediaCenter server’s supporting software, including the MSM, reflects the one-way communication between the server and receiving devices. For example, network interface drivers used for bit stream
Chapter 1 Introduction 1-11
delivery support output only. The MSM Client API has calls that allow you to specify an ultimate destination, but do not, for example, allow you to set any parameters on that destination, which would imply the ability of the receiver to confirm a setting.
1.8 Design Benefits
The Sun MediaCenter server is more than simply a standard server with large amounts of memory and disk space. It is the Sun MediaCenter software—the MFS in combination with network drivers optimized for video output—that distinguishes the Sun MediaCenter server from its standard counterpart. This software provides the following advantages over a standard server:
A Sun MediaCenter server can guarantee a certain specified level of stream
delivery, with defined limits to jitter and drift. This means that, unless server hardware fails, a Sun MediaCenter server will continue to deliver video bit streams, up to its maximum output bandwidth, at the rate specified in those streams.
Because the Sun MediaCenter server is dedicated to and optimized for video-bit-
stream delivery, the server can support more bit streams for the same amount of hardware resources (memory, disk space, and network interfaces), as compared to a standard server. This means that a Sun MediaCenter server has a lower cost per stream than a comparably equipped standard server that is used as a video server.
Because the MFS is tailored to high I/O bandwidth applications, the Sun
MediaCenter server can guarantee average-case disk I/O. Servers that rely on standard file systems can guarantee only worst-case disk I/O. The MFS ensures that whether users request different bit streams, up to maximum bandwidth, or use up the maximum bandwidth with requests for the same bit stream, the server ’s guarantee of timely delivery is not affected. With a file system not optimized for video, certain user requests, such as multiple requests for the same bit stream, are disruptive of server performance.
1-12 Sun MediaCenter Server Administrator’s Guide • December 1997
CHAPTER
2
Preparing and Loading Content
General MPEG Encoding Requirements page 2-1 MPEG Encoding Requirements for Trick Play page 2-2 Splice Points page 2-3 Content Loading page 2-5 References page 2-7
This chapter specifies what video content should consist of and how it should be formatted, as required by the Sun MediaCenter software. It also provides guidelines for content loading.
This chapter does not tell you how to encode content. The Sun MediaCenter server has successfully stored and delivered content encoded on a variety of different encoders, from a number of different vendors.
2.1 General MPEG Encoding Requirements
This section defines general MPEG encoding requirements. A subsequent section defines additional constraints to the general requirements.
To play correctly on the Sun MediaCenter server, a bit stream must meet all of the following requirements:
All bit streams in a content package must be encoded as either (1) MPEG-2
Transport Streams or Program Streams, conforming to the ISO/IEC 13818-1 standard, or (2) MPEG-1 System Streams, conforming to the ISO/IEC 11172-1 standard.
2-1
The timing information embedded in an MPEG file must exactly reflect the
constant bit rate encoded in the file. Specifically, the time differences between any two consecutive PCR (SCR for Program Streams or MPEG-1 System Streams) time stamps must exactly reflect the time required to play out the number of bytes between the two PCRs (SCRs for Program Streams or MPEG-1 System Streams) at the bit stream’s specified bit rate.
The bit stream must be encoded at constant bit rate, between 1.5 and 15 Mbit/sec.
You can encode a bit stream at any rate within this range.
Each bit stream must contain one and only one Program Association Table (PAT),
but these can be repeated as often as required. Multiple programs in one transport stream is not supported.
Each bit stream must contain one and only one video stream.
For MPEG-2 Transport Streams, each MPEG-2 transport packet that contains the
Program Clock Reference (PCR) must occur in an even-numbered transport packet, where the first transport packet in the stream is defined to be numbered 1, and is odd. This is necessary to meet the ATM Forum MPEG-over-AAL5 requirement that, in the case where there are two MPEG-2 transport packets per AAL5 packet, the PCR must be in the last transport packet in the AAL5 packet.
2.2 MPEG Encoding Requirements for Trick Play
Trick play refers to the manipulation of video bit streams to create the effect of fast forward and rewind, as found in conventional VCRs. To perform trick play, the Sun MediaCenter server does not dynamically manipulate data within the normal-play bit stream. Instead, the server switches from a normal-play stream to the appropriate position in another bit stream that has the requested play speed and/or direction.
To enable trick play on the Sun MediaCenter server, you must provide a set of distinct MPEG bit streams, beyond the bit stream that represents the movie at the normal playback speed. These additional bit streams represent the content at several speeds, in either the forward or reverse direction. If a content package does not contain at least one additional bit stream beyond the bit stream for normal playback, trick play functions are disabled.
All trick files must meet the following requirements:
All trick files must contain the identical video and audio PIDs as those of the file
at normal play speed.
All trick files must be encoded in a format (that is, MPEGTS, MPEGPS, or
MPEG1SYS) identical to the bit stream at normal play speed.
2-2 Sun MediaCenter Server Administrator’s Guide • December 1997
All trick files must be encoded at a bit rate that is less than or equal to the bit rate
of the normal-speed bit stream.
The Media Stream Manager supports the playing of trick play streams. See the chapter on the Media Stream Manager Client API in the Sun MediaCenter Server Programmer’s Guide for a discussion of how to play titles that have trick play streams.
2.3 Splice Points
To facilitate switching among multiple bit streams within a content package, all bit streams must define convenient splice points. A splice point is a position in the bit stream at which the server switches into or out of when a user switches from one speed or direction to another. For optimum switching among streams, you should specify splice point locations in an index file, the format for which is described in Section B.5 “Index File Requirements” on page B-10.
Note – The Media Stream Manager switches among trick play streams and a normal
play stream even in the absence of an index file. However, if an index file is not present, the Media Stream Manager performs positioning between streams by the linear interpolation of bit rate over file size, which means that streams are entered and exited at arbitrary points. This sort of stream switching causes problems for some decoders. You should use trick play without an index file only if your decoder is capable of resynchronizing and if artifacts are acceptable.
The frequency of the splice points within the bit streams in a content package should reflect the latency you want for trick play functionality. More splice points mean lower latency.
A splice point must have the characteristics described in the following subsections.
2.3.1 Packet Boundary
A splice point must occur on the boundary of the underlying packet. For example, for the MPEGTS format, the splice point should occur on the MPEG-2 transport packet boundary.
Chapter 2 Preparing and Loading Content 2-3
2.3.2 closed_gop
The closed_gop is a one-bit flag that indicates the nature of the predictions used in the B-pictures immediately following the first coded I-frame following the group-of­pictures header. The closed_gop must be set to 1 to indicate that these B-pictures have been encoded using only backward prediction.
2.3.3 payload_unit_start_indicator
For an MPEG-2 Transport Stream, the first MPEG-2 transport packet following a splice point must have the payload_unit_start_indicator set, and the packet must contain a payload.
2.3.4 adaptation_field_control
For an MPEG-2 Transport Stream, the first MPEG-2 transport packet following a splice point must have the adaptation_field_control set to indicate an adaptation field as well as payload (value of 11).
2.3.5 random_access_indicator
For an MPEG-2 Transport Stream, the first MPEG-2 transport packet following a splice point must have the random_access_indicator set to 1.
2.3.6 PCR_flag
For an MPEG-2 Transport Stream, the first MPEG-2 transport packet following a splice point must have the PCR_flag set to 1, and must contain the PCR value in the adaptation field.
Note – The above requirements for splice points apply to the video stream. If the
bit stream contains audio, and/or other elementary streams, the requirements apply to those streams as well.
2-4 Sun MediaCenter Server Administrator’s Guide • December 1997
2.4 Content Loading
The preferred method of storing content on a Sun MediaCenter server is to use the Web-based CmTool. CmTool uses the Sun MediaCenter FTP daemon and the Content Manager (CM), part of the Sun MediaCenter software, to store content. The CM automatically extracts from MPEG content the information the server needs to successfully store and play that content. See Chapter 4 for information on using the CmTool interface.
The Sun MediaCenter software also offers the following alternatives for transferring video files:
smc_tar
Can copy to or extract from a tape device. Takes a content package as input for content loading. Copies between a tar device or a Unix File System (UFS) and the MFS.
smc_copy
Takes a title name as input. Use from server to server. Can create a TOC file and index files if none present. Copies between MFSs.
ftp in conjunction with the Sun MediaCenter FTP daemon
Requires only the smc: keyword. Works on any platform on which an ftp client can run. Creates a TOC file and index files if none present. Copies between a local file system and the MFS.
smc_tar and smc_copy are described in Chapter 5. See Chapter 6 for instructions on the use of ftp with the Sun MediaCenter FTP daemon.
A file-transfer alternative beyond those listed here is to write a program to the Content Manager (CM) API or CM Client API. These APIs are described in the Sun MediaCenter Server Programmer’s Guide.
The Sun MediaCenter FTP daemon works with the most commonly-used MPEG formats—MPEG-1 System Stream (MPEG1SYS) and MPEG-2 Transport Stream (MPEGTS).
The following are circumstances in which you cannot use ftp to store content:
Your MPEG file is larger than 2.1 GB. Use smc_tar instead. With such large files,
you must create the correct segment clauses in the TOC file. See the description of the TOC file in Appendix B. The 2.1 GB file size is a limitation of Solaris 2.4, not the Sun MediaCenter server.
Your content is in a format other than MPEG1SYS or MPEGTS. If your stream is not
encoded in one of these formats, you must use smc_tar to load content.
Chapter 2 Preparing and Loading Content 2-5
The machine on which your content is stored does not have ftp client software.
For video file transfers from the server to a client machine, if your video file is
smaller or equal to 2.1 GB, use smc_copy or ftp. If the file is larger than 2.1 GB, use smc_tar.
For video file transfers between Sun MediaCenter servers, use Cmtool or
smc_copy.
If you want to perform a “third-party” transfer, in which you invoke a command
on one machine to transfer video files between a second and a third machine, use smc_copy.
To copy to or extract from a tape device, use smc_tar.
Both ftp and smc_tar are useful for backup and restore of video files.
If any of these circumstances applies to you, you must create a content package as described in Appendix B, then use smc_tar to load your content. See Chapter 5 for a description of smc_tar.
When you copy content to a Sun MediaCenter server (which includes the narrower case of content loading), you, the copier, have certain access to that title that is not available to other users. You use the smc_settacl utility to change access to the copied title. See Section 5.1 “Setting a Title Access Control List” on page 5-1 an explanation of setting permissions for copied titles.
A couple of points on content loading:
A Sun MediaCenter server can play streams while you are loading content.
You can begin to play a title seconds after you have started loading it onto the
server. This feature is called “playthrough” and is discussed in detail in the Sun MediaCenter Server Programmer’s Guide.
For video formatted as MPEG-2 Transport Streams, Sun MediaCenter software
automatically generates index files for titles that contain trick play streams.
When storing content, free space in the UFS /var partition might be a consideration. While the bulk of content storage is handled by the disk subsystem controlled by the MFS, the MFS software uses space in /var for keeping track of MFS files. Specifically, the MFS uses:
a small amount of space for TOC and index files (these are described in
Appendix B);
a fixed amount, 1500 bytes, for each MFS file;
one byte for every 10 minutes of play time in a title.
The last requirement is a function of play time, not encoding rate or MFS file length. As examples of MFS space consumption in /var, consider that a two-hour MPEG-1
title consumes 73.5 KB; a 30-second title consumes 1800 bytes. Our testing has shown free space of 10 MB on a Sun MediaCenter UltraSPARC to be adequate for a set of titles that places an extremely high demand on /var space.
2-6 Sun MediaCenter Server Administrator’s Guide • December 1997
2.5 References
ISO/IEC 13818-1/2/3 Recommendation H.262: “Generic Coding of Moving Pictures and Associated Audio Information: Systems/Video/Audio”
ISO/IEC 11172-1/2/3 “Coding of Moving Pictures and Associated Audio for digital storage media at up to 1.5 Mbit/s: Systems/Video/Audio”
Chapter 2 Preparing and Loading Content 2-7
2-8 Sun MediaCenter Server Administrator’s Guide • December 1997
CHAPTER
3
Monitoring the Server
Overview page 3-1 Using the WebAdmin Tool page 3-2 Resource Utilization page 3-5 Streaming Videos page 3-6 Copy Sessions page 3-9 Disk Capacity page 3-12 Troubleshooting page 3-15
This chapter describes the Sun MediaCenter WebAdmin tool, a Web-based graphical user interface (GUI) for monitoring the Sun MediaCenter server. The tool is part of the software that is installed on the Sun MediaCenter server.
3.1 Overview
The Sun MediaCenter WebAdmin tool is a set of Java™ applets that allow you to monitor the following:
Viewing of streams on a Sun MediaCenter server.
Movement of content to or from a Sun MediaCenter server.
MFS disks.
Note – Any user can use the WebAdmin tool to view server status. However, for
certain actions, such as deleting a stream or aborting a copy session, you will be prompted for a Sun MediaCenter server username and password.
3-1
3.2 Using the WebAdmin Tool
You can run WebAdmin from the following:
Any browser that is fully compatible with Java Developer ’s Kit (JDK) version
1.1.1 or later (for example, HotJava™ 1.0 or later).
Java Applet Viewer available with JDK 1.1.3.
The server that you want to monitor must have the Sun MediaCenter SUNWsmswa package installed; this software is available on the current release of the Sun MediaCenter server. The server must also be a Web server.
3.2.1 Invoking the Tool
To invoke the WebAdmin tool, enter the following URL in your browser window:
http://<servername>/smc.html
...where <servername> is the name of the Sun MediaCenter server that you want to monitor. If you have more than one server that you will be monitoring through the WebAdmin tool, you can simply re-enter the URL with the appropriate server name. At the Sun MediaCenter page, shown in
FIGURE 3-1, select WebAdmin.
3-2 Sun MediaCenter Server Administrator’s Guide • December 1997
FIGURE 3-1 Sun MediaCenter Page
You may need to set security on your browser to allow the WebAdmin applet to connect to your local system. For the Sun HotJava browser, select “Allow all connects without warning” and “Allow access to all properties” in the Security Violation popup windows.
Chapter 3 Monitoring the Server 3-3
Once the applet loads, the Resource Utilization page is displayed:
FIGURE 3-2 Resource Utilization Page
3-4 Sun MediaCenter Server Administrator’s Guide • December 1997
3.2.2 Common Page Elements
This section describes the items that appear at the top of each page in the WebAdmin tool. Each page is described in detail in later sections in this chapter.
The Server Name field appears at the top left corner of each page and identifies the Sun MediaCenter server being monitored. The following icons appear at the top right of the pages:
The question mark displays online help for the WebAdmin tool.
The house icon displays the “home” page, which is the Sun MediaCenter page.
The pin icon, when selected, keeps the current page displayed in the workspace,
even if you go to a different page. For example, you can “pin” the Resource Utilization page in your workspace while you are viewing information on a particular content movement session.
The title of the WebAdmin page appears below the Server Name. The Next or Prev buttons that appear next to the page title are useful for traversing the pages in the tool.
By default, data in each WebAdmin page is updated every 10 seconds. The Update menu allows you to select the “Update Now” option to get the most current data. Or, you can select the Timed Update option to display a dialog box where you can change the interval at which data in the pages is updated.
The remaining sections in this chapter describe each of the pages in the WebAdmin tool.
3.3 Resource Utilization
The Resource Utilization page, shown in FIGURE 3-2, displays an overall view of Sun MediaCenter server operations. It contains a graphic and a link to a more detailed page for each of the following items:
Videos being watched
Displays the streams that are being played on the server and the users who are playing the streams. The graph shows the number of streams that are being played and the percentage of the available bandwidth that the streams are using. Click on the icon or the link to display the Streaming Videos page, where you can view more information about the streams. See Section 3.4, “Streaming Videos,” on page 3-6.
Chapter 3 Monitoring the Server 3-5
Videos being copied
Displays the number of content movement sessions on the server. Click on the icon or the link to display the Copy Sessions page, where you can view more information about the content movement sessions. See Section 3.5, “Copy Sessions,” on page 3-9.
Disk Capacity
Displays the status of the MFS disks. The graph shows the number of titles stored in the MFS and the percentage of available disk space being used. Click on the icon or the link to display the Disk Capacity page, where you can view more information about the MFS disks. See Section 3.6, “Disk Capacity,” on page 3-12.
Troubleshooting
Allows you to monitor the following components: MFS disks, network, console, and bit pump. The overall status of the disks is indicated by the graphic; if the graphic is green, then all disks on the server are operating normally. If the graphic is red, one or more disks on the server need to be checked for physical malfunction. See Section 3.7, “Troubleshooting,” on page 3-15.
When you click on the icon for one of the above items, the page for that item is displayed. Each of these pages is explained in this chapter.
3.4 Streaming Videos
The Streaming Videos page shows the streams that are being played on the selected Sun MediaCenter server and the users that are playing the streams.
The Streaming Videos page is shown below.
3-6 Sun MediaCenter Server Administrator’s Guide • December 1997
FIGURE 3-3 Streaming Videos Page
The top portion of the Streaming Videos page shows the number of streams that are being played on the server, the average rate of the streams (in bits per second), and the percentage of available bandwidth being used by the streams.
The lower portion of the Streaming Videos page shows the following information about each stream that is being played on the server:
the TCP/IP hostname or the ATM port number of the user who is viewing the
stream
Chapter 3 Monitoring the Server 3-7
the title being viewed
speed (Fast-Forward, Slow Motion, Stopped, Playing, Reverse)
Click on the stream icon to view more information about this stream. The Streaming Videos page shows detailed information about the stream that you selected in the Streams page; this is shown in
FIGURE 3-4.
FIGURE 3-4 Streaming Videos Page with Stream Detail
3-8 Sun MediaCenter Server Administrator’s Guide • December 1997
This page shows the following information about the stream being viewed: Stream Name and Direction
Title and direction (fast-forward, playing, stopped, reverse, etc.) of the stream.
Format
Format of the content.
Bit Rate
Bit rate at which the stream is being played.
Destination
TCP/IP port or ATM virtual circuit.
Playlist
If this stream is part of a playlist, the titles in the playlist and the total time of the playlist are shown. If there are multiple titles in the playlist, an arrow (->) is shown next to the one being played. If a title is being played continuously, an additional icon appears next to the title.
The Delete this stream button allows you to stop the playing of the stream. You must have the proper permissions to do this, as you will be prompted for your username and password.
3.5 Copy Sessions
The Copy Sessions page shows the status of content movement sessions on the server.
The Copy Sessions page is shown below:
Chapter 3 Monitoring the Server 3-9
FIGURE 3-5 Copy Sessions Page
The top of the Copy Sessions page shows the number of copy sessions that are active on the server.
The lower portion of the Copy Sessions page shows the following information about each session on the server:
title of the content being transferred
speed of the content being transferred (1000 is normal play speed)
status of the CM session (“being created” or “Opened”)
3-10 Sun MediaCenter Server Administrator’s Guide • December 1997
Click on the session icon to view more information about this stream. The Session Information page shows detailed information about the content movement session that you selected in the Copy Sessions page.
The Session Information page is shown below:
FIGURE 3-6 Session Information Page
Chapter 3 Monitoring the Server 3-11
This page displays the following information: State
Creating or Opening Shared or Exclusive Reliable or Unreliable
Status
OK or error message from CM_API.
Transfer Mode
TCP or ATM
Address
TCP port or ATM address.
Bytes Xfered
The number of bytes already transferred.
Bytes total
The total number of bytes to be transferred. The bar at the bottom of page indicates the percentage of bytes transferred. The Abort This Session button allows you to stop the content transfer. You must
have the proper permission to do this, as you will be prompted for your username and password.
3.6 Disk Capacity
The Disk Capacity page shows the status of individual disks on the Sun MediaCenter server.
The Disk Capacity page is shown below:
3-12 Sun MediaCenter Server Administrator’s Guide • December 1997
FIGURE 3-7 Disk Capacity Page
A red, Failed Disk icon appears at the top of this page only if there is a failed disk in the MFS.
The top portion of the Disk Capacity page shows the number of titles that are stored on the server, the amount of disk space used to store the titles, and the percentage of available disk space in the MFS being used by the titles.
Chapter 3 Monitoring the Server 3-13
The bottom portion of the Disk Capacity page displays the disks in groups, as specified by the RAID layout. Individual disks can be either Data or Parity type. The size and name of each disk are shown.
Click on the disk name to view more information about the disk. The Disk Info page shows detailed information about the disk that you selected in the Disk Information page.
The Disk Info page is shown below:
FIGURE 3-8 Disk Info Page
3-14 Sun MediaCenter Server Administrator’s Guide • December 1997
The top portion of the Disk Info page shows statistics about the usage of the disk. The bottom portion of the page shows any late events or disk errors.
3.7 Troubleshooting
The Troubleshooting page allows you to monitor the following server components: MFS disks, network, console, and bit pump.
The Troubleshooting page is shown below:
Chapter 3 Monitoring the Server 3-15
FIGURE 3-9 Troubleshooting Page
The Troubleshooting page contains the following links:
Media File System: disks displays the Disk Health page. See Section 3.7.1, “Disk
Health,” on page 3-17.
Console Output displays Sun MediaCenter server console messages. See
Section 3.7.2, “Console Log,” on page 3-18.
Bit Pump Statistics displays Sun MediaCenter server bit pump information. See
Section 3.7.3, “Scheduler and Bitpump,” on page 3-20.
3-16 Sun MediaCenter Server Administrator’s Guide • December 1997
3.7.1 Disk Health
This page shows the status of disks in the MFS. The Disk Health page is shown below:
FIGURE 3-10 Disk Health Page
Chapter 3 Monitoring the Server 3-17
The Disk Health page displays the disks in groups, as specified by the RAID layout. Individual disks can be either Data or Parity type. The name of each disk is shown, along with an icon that shows the status of the disk. Icons can be one of the following colors:
green is normal
red is failed or reconstructing
Click on the disk name to view the Disk Info page for more information about the disk. See Section 3.7.1, “Disk Health” for information on the Disk Info page.
3.7.2 Console Log
The Console Log page displays the Sun MediaCenter server console messages. The Console Log page is shown below.
3-18 Sun MediaCenter Server Administrator’s Guide • December 1997
:
FIGURE 3-11 Console Log Page
You can use the search function at the bottom of the page to search for a specific string. Enter in the string you want to find, then select the Search! button.
Chapter 3 Monitoring the Server 3-19
3.7.3 Scheduler and Bitpump
The Bitpump page displays information about the Sun MediaCenter server scheduler and bitpump.
The Bitpump page is shown below:
FIGURE 3-12 Scheduler and Bitpump Page
3-20 Sun MediaCenter Server Administrator’s Guide • December 1997
TABLE 3-1 describes the fields in this page.
TABLE 3-1 Scheduler and Bitpump Statistics
Active
Active Streams Number of active streams Bandwidth Collective network bandwidth of all active streams, in bytes/sec.
System
Disk Bw Bandwidth of each disk (without considering seek overhead). Total Bw Total bandwidth of all data disks. Number of disks Number of data disks. Number of parity disks Number of parity disks. Number of zones Number of zones per disk. A zone is a region of a disk used for the
storage of streams
Period Used A fixed interval used by VOD scheduler for MFS operations. Buffer Size Size of each buffer. Buffer Maxuse Maximum number of buffers used at one time. Buffer Unavail Number of times buffers not available. Buffer InUse A snapshot of the number of busy buffers. Scheduler Time period cycles completed.
Online
Total Bw Total usable bandwidth for online loading. Max Transfer Overall maximum transfer size of online I/O. Avail Bw For a given instant, currently available bandwidth per time unit (see
bitPump:bitPumpTimePeriod). Avail Max Maximum, currently available transfer size for online I/O. Num Started Number of online loading requests started. Num Finished Number of online loading requests finished. Kmem Buf in use Number of buffers in use. Vod Max Buffers Maximum number of buffers available. Vod Buffers in use Number of buffers in use.
Chapter 3 Monitoring the Server 3-21
TABLE 3-1 Scheduler and Bitpump Statistics (Continued)
Admit
Max Active Maximum number of streams allowed. This a fixed value. Max Bw Maximum bandwidth allowed for streams, in bytes/sec. Num Admitted Number of successful admissions. Num Failed Number of failed admissions. Total Delay Total delay for the admission of all streams since last reboot, in
milliseconds.
Average Delay Average admission delay, in milliseconds.
Fail
Num failed disks Total number of failed disks. Recovering Number of disks that have failed and are undergoing recovery through
the parity mechanism. Should be no more than 1.
Latest Fail Name of the last failed device. When Time of the last failed device. Num Parity Recovery Number of parity recoveries (XOR).
Late
Num Late Number of late disk events. ID Instance number of the late event. Device Name of the late device. When Time at which the late event was detected, in microseconds. Length Duration of lateness, in milliseconds.
Errors
Num Errors Number of disk errors. ID Number identifying the error. Device Name of the disk having the error. When Time the error occurred. Error # Description of the error as returned by the operating system. Block # Block number of the errant block. Size Number of errant blocks.
3-22 Sun MediaCenter Server Administrator’s Guide • December 1997
TABLE 3-1 Scheduler and Bitpump Statistics (Continued)
bitPump
bitPumpStreams Current number of bit pump streams. bitPumpBandwidth Bandwidth of the bit pump, in bits/sec. This is a fixed value. bitPumpMissedDeadlines Number of missed deadlines.
Chapter 3 Monitoring the Server 3-23
3-24 Sun MediaCenter Server Administrator’s Guide • December 1997
CHAPTER
4
Moving Content
Overview page 4-1 Using CmTool page 4-2 Loading Content page 4-5 Table of Contents Page page 4-12
This chapter describes the Sun MediaCenter CmTool, a Web-based graphical user interface (GUI) that allows you to transfer content to a Sun MediaCenter server. The tool is part of the software that is installed on the Sun MediaCenter server.
4.1 Overview
CmTool is a set of Java applets that allow you to:
Display the titles that are stored on a Sun MediaCenter server, as well as view
information about individual titles.
Transfer content to a Sun MediaCenter server.
Note – Chapter 2, “Preparing and Loading Content” describes video content and
how it should be formatted for use with the Sun MediaCenter software. You should read this chapter before transferring content to the Sun MediaCenter server.
You need to have a valid username and password on the Sun MediaCenter server in order to use CmTool to transfer content to that server. CmTool will prompt you for a username and password when you attempt to load content to the server.
4-1
4.2 Using CmTool
You can run CmTool from the following:
Any browser that is fully compatible with Java Developer ’s Kit (JDK) version
1.1.1 or later (for example, HotJava 1.0 or later).
Java Applet Viewer available with JDK 1.1.3.
The server that you want to move content to must have the Sun MediaCenter SUNWsmswa package installed; this software is available on the current release of the Sun MediaCenter server. The server must also be a Web server.
4.2.1 Invoking the Tool
To invoke CmTool, enter the following URL in your browser window:
http://<servername>/smc.html
...where <servername> is the name of the Sun MediaCenter server that you want to monitor. If you have more than one server to which you will be transferring content with CmTool, you can simply re-enter the URL with the appropriate server name. At the Sun MediaCenter page, shown in
FIGURE 4-1, select Content Manager.
4-2 Sun MediaCenter Server Administrator’s Guide • December 1997
FIGURE 4-1 Sun MediaCenter Page
You may need to set security on your browser to allow the CmTool applet to connect to your local system. For the Sun HotJava browser, select “Allow all connects without warning” and “Allow access to all properties” in the Security Violation popup windows.
Once the applet loads, the Table of Contents page is displayed, with a list of content that is currently stored on the server.
Chapter 4 Moving Content 4-3
FIGURE 4-2 Table of Contents Page
4-4 Sun MediaCenter Server Administrator’s Guide • December 1997
4.2.2 Common Page Elements
This section describes the items that appear at the top of each page in CmTool. Specific elements of each page are described later in this chapter.
The Server Name field appears at the top left corner of each page and identifies the Sun MediaCenter server you are managing. The following icons appear at the top right of the pages:
The question mark displays online help for CmTool.
The house icon displays the “home” page, which is the Sun MediaCenter page.
The pin icon, when selected, keeps the current page displayed in the workspace,
even if you go to a different page. For example, you can “pin” the Table of Contents page in your workspace while you are viewing information on a particular content movement session.
The title of the CmTool page appears below the Server Name. The Next or Prev buttons that appear next to the page title are useful for traversing the pages in the tool.
By default, data in each page is updated only when the page is displayed. The Update menu allows you to select the “Update Now” option to get the most current data. Or, you can select the Timed Update option to display a dialog box where you can specify that the data in the pages be automatically updated at regular intervals.
The remaining sections in this chapter describe how to use CmTool.
4.3 Loading Content
The Table of Contents page, shown in FIGURE 4-2, displays a list of the titles found on the Sun MediaCenter server.
To load content onto the Sun MediaCenter server, click on the Load new Content button. This displays the Login Information page, shown in
FIGURE 4-3.
Chapter 4 Moving Content 4-5
FIGURE 4-3 Server Login Page
You enter in a username and password for the Sun MediaCenter server in the Login Information page. Once you have successfully logged in to the server, you will not need to enter the login information again unless you quit CmTool or reload the page.
Upon successful login, the Load Content page is displayed.
4-6 Sun MediaCenter Server Administrator’s Guide • December 1997
FIGURE 4-4 Load Content Page
The disk space available on the server is shown in the upper right corner of the page. To load content onto the server, first specify the source where the content is located.
If you select Local filesystem, you are prompted for the username and password to log in to the local system.
If you select Remote Machine, you are prompted first for the name of the remote system, then for the username and password to log in to the remote system.
Note – If you are transferring content from a remote system, you must ensure that
the CmTool applet can communicate with other systems on the network. For Sun HotJava, select Preferences from the File menu and select “Medium Security” in the Applet Security box. For Java Applet Viewer, set the Applet Properties section of the Network Access window to “Unrestricted.”
FIGURE 4-5, the selected content source is a remote system; the content on that
In system is displayed.
Chapter 4 Moving Content 4-7
FIGURE 4-5 Content on Remote System
To copy a title from a remote system or local filesystem, select the title or file from the scrolling list, then click the Copy selected file button. (You can also display information about a selected title or file with the View button.)
4-8 Sun MediaCenter Server Administrator’s Guide • December 1997
You are prompted to specify a title for the content on the server, as shown in
FIGURE 4-6. You can enter a name that is different from the source or use the same
title. Remember that you cannot use spaces in titles. Click the Copy button (or select the Cancel button to cancel the copy operation).
FIGURE 4-6 Specifying a Local Title
Chapter 4 Moving Content 4-9
You are prompted to confirm the copy operation, as shown in FIGURE 4-7. Click the smc_copy button (or select the Cancel button to cancel the copy operation).
FIGURE 4-7 Copy Confirmation
4-10 Sun MediaCenter Server Administrator’s Guide • December 1997
The Session Information page, shown in FIGURE 4-8, shows the status of the content transfer.
FIGURE 4-8 Session Information
A message appears when the content has been successfully copied to the server. The content is now available for viewing on the Sun MediaCenter server.
Chapter 4 Moving Content 4-11
4.4 Table of Contents Page
This section describes the View and Selected menu options on the Table of Contents page.
FIGURE 4-9 Table of Contents Page
4-12 Sun MediaCenter Server Administrator’s Guide • December 1997
4.4.1 View Menu
The View menu provides options that affect the display of titles in the Table of Contents page. The following options are available:
Display allows you to select the attributes that you want displayed for the titles.
For example, in addition to title name, you can specify that format and playtime be displayed. By default, only the title names are displayed in the Table of Contents page. When you select the Display option, the following dialog box appears:
FIGURE 4-10 Display Attributes Dialog Box
To display an attribute, click on the attribute name in the Hide Attributes list and then click on the Add >> button. To remove an attribute for the display, click on the attribute name in the Show Attributes list and then click on the << Remove button. Click the OK button to display the specified attributes in the Table of Contents page. Click Reset to retain the last-saved attributes or click Cancel to dismiss the dialog box with no change.
Sort allows you to specify the sort order (ascending or descending) of the titles,
based on a specific attribute. For example, you can display titles in order of ascending playtime (shortest playtime listed first). By default, the titles are displayed in alphanumerical order by name. When you select the Sort option, the following dialog box appears:
Chapter 4 Moving Content 4-13
FIGURE 4-11 Sort Dialog Box
To sort by one or more attributes, click on the attribute in the Available Attributes list and then click on the Add >> button. To remove an attribute from the sort list, click on the attribute name in the Sort Order list and then click on the << Remove button. Select Ascending or Descending. Click the OK button to display the specified attributes in the Table of Contents page. Click Reset to retain the last­saved attributes or click Cancel to dismiss the dialog box with no change.
Filter allows you to restrict the titles that are displayed. For example, you can
display only those titles that have the format MPEG1SYS. By default, all titles are displayed. When you select the Filter option, the following dialog box appears:
FIGURE 4-12 Filter Dialog Box
Select the title attribute on which the pattern match is to be done. Select either “matches” or “does not match,” then enter in the pattern that is to be matched/ not matched. Click the OK button to filter the display in the Table of Contents page. Click Reset to retain the last-saved attributed or click Cancel to dismiss the dialog box with no change.
4-14 Sun MediaCenter Server Administrator’s Guide • December 1997
4.4.2 Selected Menu
The Selected menu allows you to view more information about a selected title, and to rename, delete, or play the title. Select a title in the Table of Contents page, then select the More Info option from the Selected menu. The Title Information page appears, as shown below:
FIGURE 4-13 Title Information Page
This page contains all available attribute information for the selected title. You can use the buttons at the bottom of the page to rename, delete, change the content description, or play the title.
Chapter 4 Moving Content 4-15
4-16 Sun MediaCenter Server Administrator’s Guide • December 1997
CHAPTER
5
Sun MediaCenter Server Utilities
Setting a Title Access Control List page 5-1 The smc_copy Utility page 5-4 The smc_tar Utility page 5-8 The smc_ls Utility page 5-17 The smc_rm Utility page 5-21
This chapter describes the utilities shipped with the Sun MediaCenter software. Sun MediaCenter software offers a variety of means to transfer video files. See
Section 2.4 “Content Loading” on page 2-5 for a discussion of the alternatives. In this chapter and elsewhere in this document, a title refers to a piece of video
content, such a movie. A title is stored on a Sun MediaCenter server as the set of files that make up a piece of content. The name of a title is but one attribute of a piece of content. When you specify a title name for file transfer or for removal, all attributes of that title are transferred or removed. See Section 6.2 “Video-File Attributes” on page 6-4 for a complete description of title attributes.
5.1 Setting a Title Access Control List
The Sun MediaCenter server software enables you to set an access control list (ACL) on a per-title basis. This type of ACL, along with server ACLs for titles and Content Manager sessions are described in Chapter 9 “Access Control Lists.”
5-1
When you create a new title on a Sun MediaCenter server by, for example, using smc_copy to copy a video file from one server to another, you (the copier) have read, write, and admin permissions for that title. Depending on the settings of the server ACL, other users can list your title (smc_ls) and get certain statistics on the title. However, a user besides you cannot copy your title, delete it, or append to it.
To extend access for a title that you own, use the smc_settacl command. smc_settacl is analogous to the Solaris setfacl utility. smc_settacl has the following syntax:
smc_settacl -s|m <acl_entries> [server:]<titlename> ... smc_settacl -d <title_users> [server:]<titlename> ... smc_settacl -f <filename> [server:]<titlename> ...
For the -s (set) and -m (modify) options, <acl_entries> stands for a comma-separated list of items of the form:
u[ser]:<username>:<permissions>
<username> is a Solaris login name; <permissions> is one or more of r, w, and a (read,
write, and admin, respectively). In a smc_settacl command, you must specify three permissions. Replace any permission you are not setting with a hyphen. So, for example, if you are setting read and admin permission for the user Raj, any of the following ACL entries is valid:
user:raj:r-a user:raj:-ra user:raj:ar-
Permissions are defined in
TABLE 5-1 Title ACL Semantics
Permission Title ACL
Read Read this title data.
Get statistics for this title. Write Write/Append this title data. Admin (owner) Delete/rename this title.
Change ACL for this title.
5-2 Sun MediaCenter Server Administrator’s Guide • December 1997
TABLE 5-1.
For the -d (delete) option, <title_users> stands for a comma-separated list of items of the form:
u[ser]:<username>
...where <username> is a Solaris login name. The -s, -m, and -d options accept an asterisk in the <username> field, so that you
can specify ACL changes for all users on a server. You must use a backslash (\) with an asterisk, to prevent the shell from expanding the asterisk to mean the files in the local directory.
For the -f option, <filename> is a text file containing a list of entries of the form of <acl_entries>, above. Comments in the file, indicated by a hash mark (#) in column 1, are ignored by smc_settacl.
You cannot use the -s and -f options with any other option. You can combine -m and -d. The -s option replaces the current title ACL with the entry or entries you specify. The -m option modifies the title ACL. Using -m, if you specify a user who is not in the title ACL, that user is appended to the ACL. If you specify a user who is in the ACL, that user ’s permissions are changed to what you specify.
For all options, you can specify one or more title names, any of which can be local or remote. Separate multiple title names with a space between each pair. For a remote title, you prepend the name of the Sun MediaCenter server and a colon to the title name. You can use an asterisk in the title name field to stand for all titles on a server.
smc_settacl has a companion command, smc_gettacl, which displays the ACL for a specified title in the format used by smc_settacl. smc_gettacl is useful in assigning the values in one title’s ACL to another title. For example, after you copy titles from the server adam to the server eve, you want to give your colleague Raj permissions to the files you just copied. Raj has r, w, a permissions on the title
ben_hur. You enter:
adam% smc_gettacl ben_hur | smc_settacl -f - eve:\*
As with smc_settacl, smc_gettacl accepts multiple, space-separated title names. Every title must have at least one user with admin permission. If you attempt to set
or modify a title ACL such that all users with admin permission would be removed or have their admin permission removed, smc_settacl retains the last user with admin permission.
Chapter 5 Sun MediaCenter Server Utilities 5-3
5.2 The smc_copy Utility
The smc_copy utility copies content, specified by a title name or a local filesystem name, between a local filesystem and a Sun MediaCenter server or between two Sun MediaCenter servers. Examples of a local filesystem are the Unix filesystem (UFS) and NFS™. smc_copy offers a convenient means to load content onto a Sun MediaCenter server and to backup content from the server to a local filesystem.
The smc_copy utility’s specific functions are as follows:
Copies a video file (such as an MPEG file) from a local filesystem to a Sun
MediaCenter server. In so doing, performs activities required to make that title available for playing.
Copies a video title from a Sun MediaCenter server to a local filesystem. Output
is a tar file containing a content package. A title is a video file stored on a Sun MediaCenter server so that it can be played from the server. Names of titles specified in smc_copy commands are in the form returned by smc_ls (see Section 5.4 “The smc_ls Utility” on page 5-17).
Copies a content package in a tar file to a Sun MediaCenter server. Input can be a
pathname that includes a tar device. See Appendix B for a description of a content package.
Copies a file between two local filesystems.
You can invoke smc_copy on one machine to copy content from a second machine to a third machine. The machine on which you invoke smc_copy does not have to be a Sun MediaCenter server. To run smc_copy, you need only the smc_copy binary, which you can copy from /opt/SUNWsms/bin on a Sun MediaCenter server with the current release of software.
The general form of smc_copy is:
smc_copy [-p] [-r rate] [-f format] [-s speed] [-t type] [-i] [-m] [-o] source [destination]
...where source and destination can be one of: title
The name of a title, such as Heidi. Specifying only title implies that a title is stored on or being copied to the
machine from which you are invoking smc_copy.
hostname:title
The IP hostname of a Sun MediaCenter server and a title, for example, guignon:heidi.
5-4 Sun MediaCenter Server Administrator’s Guide • December 1997
filename
The name of a file in the form specified by a local filesystem, such as UFS or NFS. The filename might specify an MPEG file or, for a content package, a tar file.
hostname:filename
The IP hostname of a machine on which filename is stored, plus the filename.
You must supply an argument for source. Unless you use the -m option (for tar file input), you must also supply an argument for destination. If you are copying a title from a remote to a local machine, and not renaming the title, you can simply specify the name of the title as the destination.
smc_copy has the following options:
-f {MPEGTS|MPEG1SYS}
Indicates format of stream to be loaded onto Sun MediaCenter server (MPEG Transport Stream or MPEG-1 System Stream). There is no default for this option. By omitting this option, you implicitly request that the server software auto­detect the title's format. (Sun MediaCenter servers of version number 2.1 and later support format auto-detection.)
-i
Indicates input is from a Unix filesystem.
-m
Indicates input is a tar file. Used for loading a content package.
-o
Indicates output is to a Unix filesystem.
-p
Preserve the creation time in the destination file. Otherwise, the creation time becomes the current time for the newly copied file.
-r rate Indicates the encoding bit rate for a title. There is no default for this option.
-s speed For titles that contain trick play streams. speed is 1000 for a normal-play, forward-
direction stream. The speed value for a stream of four times normal speed is
4000. Reverse direction is indicated by a minus sign, so that a stream of seven times normal speed, in the reverse direction has a speed value of -7000. The default speed value is 1000.
Chapter 5 Sun MediaCenter Server Utilities 5-5
-t type Indicates the type of the file, either data or index. A data file is an MPEG file.
An index file is a file containing splice points for switching back and forth among trick play streams.
When copying a title to or from a Sun MediaCenter server, you must have appropriate permissions in the ACL portion of the copied title. (See Section 5.1 “Setting a Title Access Control List” on page 5-1 for an explanation of title ACLs.) In the course of completing the copy operation, smc_copy creates a new title on the destination Sun MediaCenter server. You can rename the destination title in an smc_copy command.
To load content onto a Sun MediaCenter server, you must have permission, as specified in the ServerAcl file. This file is described in Chapter 9 “Access Control Lists.”
When you copy a title to or load content onto a Sun MediaCenter server, you, the copier, own the title access control list for that file. Other users can play the title, but cannot copy it to another server or remove it. To extend access to the newly-copied file, use smc_settacl, as described in Section 5.1, “Setting a Title Access Control List.”
The following are examples of smc_copy use. The following example copies the title heidi from the Sun MediaCenter server
server2 to the local Sun MediaCenter server, server1, renaming the title to heidi_orphan, in the process:
server1% smc_copy server2:heidi server1:heidi_orphan
The following command accomplishes the same function as the preceding:
server1% smc_copy server2:heidi heidi_orphan
The following command loads content from a local Unix filesystem on the Solaris (UFS) machine host1 to the remote Sun MediaCenter server server1, renaming the title in the process:
host1% smc_copy -i -r 1568700 heidi.mpg server1:Heidi
In the preceding command, note that the -f (format) option is omitted, meaning the format is auto-detected. Speed (-s) defaults to 1000 and type ( -t) defaults to data.
5-6 Sun MediaCenter Server Administrator’s Guide • December 1997
The following command performs the same function as the preceding, except the -t and -s options are made explicit:
host1% smc_copy -i -t data -s 1000 -r 1568700 heidi.mpg server1:Heidi
The following command copies the title heidi from Sun MediaCenter server server1 to a Solaris machine host1:
server1% smc_copy -o heidi /net/host1/export/mpeg_files/heidi.tar
The preceding command copies all files associated with the title heidi. If the title contains multiple streams for trick play, those streams, plus an index file for each stream, are copied to the tar file.
The following command is invoked from a third-party machine, machine_x, which is not an Sun MediaCenter server. The command loads content from an NFS file to the Sun MediaCenter server1.
machine_x% smc_copy -i -b 1587000 /net/host1/export/mpeg/oliver_twist.mpg \ server2:dickens_story
In the preceding command the speed and file type options are defaulted; the format is auto-detected by server2.
The following command copies content from a Sun MediaCenter server, server1, to a local filesystem, mounted on the third-party machine, machine_x:
machine_x% smc_copy -o server1:Heidi /net/host1/export/mpeg_files/heidi.tar
The following command copies a file between two local filesystems:
machine_x% smc_copy -i -o /home/mpeg/heidi.mpg /net/host1/export/mpeg/heidi.mpg
Chapter 5 Sun MediaCenter Server Utilities 5-7
5.3 The smc_tar Utility
If you cannot use ftp to load content, as explained in Section 2.4 “Content Loading” on page 2-5, you can use smc_tar. The smc_tar command extracts a content package from a tar archival device or tar file. smc_tar parses the TOC file in the content package and stores the data and index files associated with the title, as well as the TOC file itself, into the correct locations on the Sun MediaCenter server.
smc_tar also works in the reverse direction, copying titles from a Sun MediaCenter server to a tar device or file.
smc_tar works with one or more local or remote Sun MediaCenter servers. For example, in a single command, you can copy titles from multiple local and remote Sun MediaCenter servers to a local tape drive, for backup purposes. Detailed examples are provided later.
You can run smc_tar on any SPARC/Solaris machine. To run smc_tar remotely, you need only the smc_tar binary, which you can copy from /opt/SUNWsms/bin on a Sun MediaCenter server with the current release of software.
5.3.1 Syntax and Options
The syntax for smc_tar is:
smc_tar t|c|x[v][b][w] f <tar device> [<blksize>] [<server>:<title>]
Options are analogues of tar options and are described as follows: c
Specifies creation of a tar file or copying a title from the Sun MediaCenter server to a tar device. Requires a source file argument of <server> :<title>.
x
Specifies extraction of a tar archival or file. Used for copying content packages onto the Sun MediaCenter server.
b <blknum>
Specifies the blocking factor that was used to create the tar device contents.
<blknum> must be a multiple of 20; one block equals 512 bytes. The recommended <blknum> value is 500 (256000 bytes). Most operating systems, including Solaris, have a default block number value of 20. The location of <blknum> in the smc_tar command line depends on the order of the b and f options. <blknum> is
5-8 Sun MediaCenter Server Administrator’s Guide • December 1997
the last argument in the command line if the b option is after the f option. <blknum> immediately follows the option list if the b option precedes the f option.
w
Prompts you before overwriting already-existing content.
The f argument, which precedes a source tar file or device, is required for all smc_tar commands.
When writing to a tar file or device ( c option), you are moving data from an MFS to a tar device. When extracting from a tar file or device (x option), you are moving data from a tar device to an MFS.
5.3.2 Content Loading
Before performing its file-loading function (x option), smc_tar performs parsing of the TOC file and error checking on the index files. If it detects a value in one of these files that implies an encoding error in a data file, it returns an error and exits. If smc_tar proceeds with and completes file installation, it indicates that the content has been formatted correctly for use on the Sun MediaCenter server.
The content-loading function of smc_tar is illustrated in
FIGURE 5-1.
Chapter 5 Sun MediaCenter Server Utilities 5-9
Content
Package
(tar format)
smc_tar
--verifies TOC format
--extracts index files
--extracts MPEG files
FIGURE 5-1 Loading Content with smc_tar
Input to the
Media Stream Manager
TOC
file
index
files
mfs_create
MFS
files
(MPEG)
After loading content with smc_tar, you can pass a TOC file (title name) as an argument to MSM Client API functions (described in the Sun MediaCenter Server Programmer’s Guide), to play the title described by that TOC file.
If a disk failure occurs when smc_tar is writing a title to a disk controlled by the Media File System (MFS), all files associated with that title—including the TOC file and index files—are erased.
5.3.3 Copying Content
With the c option, smc_tar copies all of the files associated with a title from one or more Sun MediaCenter servers to a tar device or file. This operation is illustrated in
FIGURE 5-2.
5-10 Sun MediaCenter Server Administrator’s Guide • December 1997
Using smc_tar, you can copy files that were loaded onto the server by means other than smc_tar, such as with smc_copy or ftp.
Sun MediaCenter
MFS
Sun MediaCenter
MFS
FIGURE 5-2 Copying a Title from a Sun MediaCenter Server
As you can infer from the figure, smc_tar provides a convenient means to backup titles on a Sun MediaCenter server.
Title
Optional
Title
smc_tar
tar Device
or File
Note – When backing up your video files, in addition to copying files fr om the disk
subsystem used for the MFS, you should make a separate backup of the /var/opt/ SUNWsms/content and files directories, which are stored on your server ’s (UFS) system disk. These directories contain files required by the MFS. Both smc_tar and ftp (described in Chapter 6) backup these required files in the course of backing up
the MFS. However, if your system disk fails and the disk subsystem used for the MFS does not, you will find it more convenient to restore only the content and files directories than to restore the entire set of video files in the MFS.
Chapter 5 Sun MediaCenter Server Utilities 5-11
5.3.4 Remote Copying and Extraction
You can run smc_tar from a Sun MediaCenter server or from a remote host that has a network connection to a Sun MediaCenter server.
The syntax for the c option is:
smc_tar cf <tar device> <server>:<title>
For the c option, you must have only one argument of the form <server>:<title>. <server> can be a local or remote Sun MediaCenter server and <title> can be the
name of a specific title, with or without the .TOC extension. The syntax for the x option is:
smc_tar xf <tar device> [<server>:<title>]
To extract the same title to multiple servers, you must enter an smc_tar command for each server:
remote_host# smc_tar xf /dev/rmt/0 smc_server1:bambi remote_host# smc_tar xf /dev/rmt/0 smc_server2:bambi
5.3.5 Examples
The following are examples of smc_tar usage:
server# smc_tar xf /dev/rmt/0
The preceding command extracts a content package from the tape device /dev/rmt/0. Upon successful parsing of the TOC file and error checking of the index and data files, those files are stored on the server. This command causes files of the same name to be overwritten.
server# smc_tar xwbf 40 /dev/rmt/0
5-12 Sun MediaCenter Server Administrator’s Guide • December 1997
The preceding command differs from the one before it in two respects, indicated by the w and b options. The w option means that you are prompted before files of the same name are overwritten. The b option, in combination with the value of 40, specifies that smc_tar uses a block size of 40 rather than the default of 20.
You can use smc_tar with the x option from a remote host, extracting content packages to a Sun MediaCenter server:
server# smc_tar xf /dev/rmt/0 smc_server:bambi
The following command shows how you can use the c option of smc_tar from a machine remote from a Sun MediaCenter server.
remote_host# smc_tar cf /dev/rmt/0 smc_server:bambi
The preceding command copies the title “Bambi” on the server smc_server to a local tape device. This command can be extended as follows:
remote_host# smc_tar cf /dev/rmt/0n smc_server1:bambi remote_host# smc_tar cf /dev/rmt/0n smc_server2:flipper
The preceding command copies the title “Bambi” on smc_server1 and the title “Flipper” on smc_server2 to a local tape device.
Because of the size of the files containing video content, it is usually preferable to create the tar file for a content package as piped input to smc_tar, rather than creating the tar file, then invoking smc_tar as a separate command. For example, on the Sun MediaCenter server, enter:
server# tar cf - <your title>.TOC <your content>.mpg | smc_tar xf -
Note that the TOC file is the first argument to tar. This is a requirement of a content package. The preceding command presumes that the TOC and content files are accessible from the Sun MediaCenter server. Where these files are remote from the Sun MediaCenter server, you can use a command such as:
remote_host# tar cf - <your title>.TOC <your content>.mpg | smc_tar xf \
- smc_server:<your title>
Chapter 5 Sun MediaCenter Server Utilities 5-13
A useful technique for situations in which your MPEG file resides on CD-ROM is to create a symbolic link from the directory where your TOC file resides to the file on CD-ROM. You then use tar with the h option, which causes tar to follow symbolic links. The following are example commands:
server# ln -s /cdrom/cdrom0/<your content>.mpg <your content>.mpg server# tar cfh - <your title>.TOC <your content>.mpg | smc_tar xf -
An alternative to the preceding commands is:
server# tar cf - <your title>.TOC -C /cdrom/cdrom0 <your content>.mpg | smc_tar xf -
You can use commands such as those shown above to copy files to a remote Sun MediaCenter server. For example:
remote_host# ln -s /cdrom/cdrom0/<your content>.mpg <your content>.mpg remote_host# tar cfh - <your title>.TOC <your content>.mpg | smc_tar xf \
- smc_server:<your title>
5-14 Sun MediaCenter Server Administrator’s Guide • December 1997
Examples of scripts that use smc_tar are shown below. The following script archives content to the locally-mounted /dev/rmt/0 device and writes the content titles to the UFS file SMCBackup.current-date in the current directory.
#!/bin/sh # smc_backup: Script to archive multiple SMC titles to tape # # To use, type # smc_backup [title]+ # PATH="/sbin:/usr/sbin:/bin:/usr/bin:/usr/ccs/bin:/opt/SUNWsms/bin" date=`date +%Y.%m.%d` outputDevice="/dev/rmt/0" contentsFile="SMCBackup.$date" tapeNumber=1; titleNumber=1;
mt status -f $outputDevice || exit 1
while [ $# -gt 0 ]; do title=$1; if smc_tar cf ${outputDevice}n $title; then echo "$date $tapeNumber $titleNumber $title" >> $contentsFile titleNumber=`expr $titleNumber + 1`; shift; else echo "Tape full; Rewinding ... \c" mt -f ${outputDevice} rew echo; echo "Insert new tape, hit return when ready \c"; read answer tapeNumber=`expr $tapeNumber + 1` titleNumber=1 fi done mt -f $outputDevice rew
echo "Content is in $contentsFile"
Chapter 5 Sun MediaCenter Server Utilities 5-15
The following script locates a specified content title from a previously-created SMCBackup.date file. It then prompts you to load the appropriate tape to restore the archived title from the locally-mounted /dev/rmt/0 device.
#!/bin/ksh # smc_restore: Script to restore an SMC backup
usage() { echo "usage: smc_restore [-c ContentsFile] [title]+" >&2 }
printNumber() { case $1 in *1)echo "$1st";; *2)echo "$1nd";; *3)echo "$1rd";; *) echo "$1th";; esac }
date=`date +%Y.%m.%d` inputDevice="/dev/rmt/0" contentsFile="SMCBackup.$date"
if set -- `getopt "c:" $*`; then while [ $# -gt 0 ]; do case "$1" in
-c) contentsFile=$2; shift 2;;
--) shift; break;;
-*) usage; exit 1;; *) break; ;; esac done fi
for t in $*; do found=false; grep $t $contentsFile | while read date tape fileNumber title; do echo "$t is the `printNumber $fileNumber` title on the `printNumber $tape` tape created on $date"
5-16 Sun MediaCenter Server Administrator’s Guide • December 1997
echo "Restore it? (yes or no) \c" read response < /dev/tty if [ $response = "yes" ]; then found=true echo "Load tape dated $date and hit return when done \c" read response < /dev/tty if mt -f ${inputDevice} rew && mt -f ${inputDevice}n fsf $((fileNumber -
1)); then if smc_tar xf $inputDevice $t; then echo "$t restored" fi
fi fi done
if [ "$found" = "false" ]; then echo "The title you requested was not found on any backup tape" fi done
5.4 The smc_ls Utility
The smc_ls utility lists the titles available for playback on a Sun MediaCenter server. You can play these titles through the facilities of the Media Stream Manager.
To r un smc_ls remotely, you need only the smc_ls binary, which you can copy from /opt/SUNWsms/bin on a Sun MediaCenter server with the current release of software. smc_ls has the following syntax:
smc_ls [-s server] [-bBdDFhlnNrSUvwX] [title...]
...where server is the default server used for specifying one or more title arguments. If you do not specify the -s server option, localhost is the default.
You specify title arguments in the form server:pattern, where pattern is a restricted regular expression that follows the rules for shell filename matching. If server is not specified in title, the default server (as specified by the -s option or localhost) is used for that pattern. If pattern is not specified, all of the titles on the specified server are listed.
Chapter 5 Sun MediaCenter Server Utilities 5-17
The other smc_ls options affect the display and sort of the title output. As a general rule, lowercase options specify the type of sort to be performed, while uppercase options specify the display of an attribute. By default, sort options turn on the corresponding display option. Options are invoked from left to right to provide the effect of a major/minor key sort. If no sort option is specified, titles are displayed using the collating rules of the native language. A few options are shortcuts for other display options; however this does not preclude these options from being combined with other sort and display options. The following describes these options:
-b
Sort the output in bitrate order, with the lowest bitrate first. For titles with multiple streams, the bitrate used for sorting is the maximum bitrate of all the streams that comprise the title. This option implies the -B option.
-B
Display the bitrate(s) for each of the streams that comprise a title. Streams that have corresponding index files are indicated with a trailing asterisk (*). This option turns off the D and S display options.
-d
Sort the output in disk usage order, with the lowest disk usage first. The space used for sorting is the aggregate of all of the streams that comprise the title. This option implies the -D option.
-D
Display the disk usage. For titles with multiple streams, the aggregate is printed first. This is followed by a list of the space consumed by each of the trick play streams; each item in the list is separated by a plus sign (+). This option turns off the B and S display options.
-F
Display the format of this title.
-h
Display smc_ls syntax.
-l
Display a long listing. This option is an aggregation of the T, U, N, F, and S options. Subsequent options may override or extend the defaults.
-n
Sort the output in Normal Play Time (NPT) order, with the lowest NPT first. This option implies the -N option.
-N
Display the NPT.
5-18 Sun MediaCenter Server Administrator’s Guide • December 1997
-r
Reverse the order of the sort. This option applies across all other sort options.
-S
Display the play speeds for the title. For titles with multiple speeds, each available speed is listed, separated by a comma (,). Streams that have a corresponding index file are indicated by a trailing asterisk (*). This option turns off the B and D display options.
-t
Sort the output in the order of last modification time, with the most recently­modified first. This option implies the -T option.
-T
Display the time the title was last modified.
-U
Display the current usage of the title. A title may be currently in use by the Content Manager (cm) and/or the Media Stream Manager (msm), or it may be FREE, which means it is not in use by either cm or msm.
-v
Verbose; print a banner at the top of each column of information.
-w
Wide listing, do not truncate title names. This option is only useful with the -X option.
-X
Displays output in Sun MediaCenter server 1.3 format. This option implies the U, N, F, and S options and inserts additional new lines between items. In addition, any operands are assumed to be simple server names and should not include a colon or patterns.
Chapter 5 Sun MediaCenter Server Utilities 5-19
The following example displays a “long listing” of the content on the local Sun MediaCenter server, sorted in order of most-recently-modified time:
client% smc_ls -lt AustinPowers Jul 17 15:23 FREE 00:02:18 MPEG1SYS 1000 SMC_Trick Jul 17 02:26 FREE 00:03:17 MPEG1SYS 1000,4000,8000,-4000,-8000 roc13 May 25 22:09 FREE 00:00:14 MPEGTS 1000* SMCnews_1.24Mbs May 25 21:54 FREE 00:01:20 MPEG1SYS 1000 SMCnews_0.15Mbs May 23 16:32 FREE 00:01:21 MPEG1SYS 1000 SMCnews_copy May 23 16:32 FREE 00:01:21 MPEG1SYS 1000 sun_on_cnn May 23 11:05 FREE 00:15:00 MPEG1SYS 1000
Note that 1000 represents normal speed, forward direction. A value of 4000 represents four times normal speed. The value -4000 represents four times normal speed in the reverse direction.
An asterisk appended to a speed indicates that there is an index file present for that speed. An index file is a list of the splice points in a bit stream. (See Appendix B for a complete description.) Some decoders require an index file to reliably perform trick play; that is, to switch back and forth among streams or to jump forward or backward within a stream.
The string FREE indicates that the title is not being used by either the Content Manager or the Media Stream Manager. cm means that the title is being copied, either to or from the server. (Because of the server’s playthrough feature, you can play a title even as it is being loaded onto the server.) msm indicates that the title is being played.
The following example displays all lowercase titles on the server my-server:
smc_ls my-server:”[a-z]*”
dvd_ad example jumani mnymkr2 netboy90
5-20 Sun MediaCenter Server Administrator’s Guide • December 1997
The following example displays a long list of the current titles on the local server, with the output reverse-sorted by modification time (most-recently modified time last) and bitrate information displayed (instead of play speed):
smc_ls -lrtB
pc_test1.5 Apr 01 10:06 FREE 00:02:56 MPEG1SYS 1500000 PC_TEST_1.4 Apr 01 10:30 FREE 00:02:56 MPEG1SYS 1400000 Scott_and_Anne Jun 11 20:30 FREE 00:03:32 MPEG1SYS 2236000 rabbit Jun 11 20:39 FREE 00:00:30 MPEG1SYS 1378000* ISGs_Mariah Jun 21 12:13 FREE 00:02:48 MPEG1SYS 1660400 Gisele_Kerozene Sep 16 19:13 FREE 00:04:14 MPEG1SYS 1504000 v2kill Oct 04 17:34 FREE 00:04:20 MPEG1SYS 1394400 YOUAINT14 Nov 06 10:08 FREE 00:02:40 MPEG1SYS 1401728 smc5 Nov 22 15:00 FREE 00:06:31 MPEG1SYS 1500000 ST_HISTORY Dec 13 13:52 FREE 00:09:02 MPEG1SYS 2213600 Max_Headroom Jan 23 16:13 FREE 00:02:16 MPEG1SYS 1406000 mnymkr2 Feb 20 14:12 FREE 00:01:58 MPEG1SYS 1446848 dvd_ad Mar 01 18:15 FREE 00:09:59 MPEG1SYS 2009344 Eastwood Mar 13 17:42 FREE 00:06:31 MPEG1SYS 1500000
5.5 The smc_rm Utility
The smc_rm utility removes titles from an MFS on a Sun MediaCenter server. The command takes as an argument one or more title names. smc_rm removes a specified title, including MPEG files, supporting files, and attributes referred to by that title name.
The following example removes all content associated with the titles “Bambi” and “Quo Vadis”.
server% smc_rm SUNW_bambi SGI_quo_vadis
Chapter 5 Sun MediaCenter Server Utilities 5-21
5-22 Sun MediaCenter Server Administrator’s Guide • December 1997
CHAPTER
6
Sun MediaCenter Server FTP Daemon
Keyword for Video-File Functions page 6-3 Video-File Attributes page 6-4 Video-File Commands page 6-5 Loading Content with ftp page 6-14
This chapter describes the Sun MediaCenter server FTP daemon. This daemon allows any ftp user—on any operating system/hardware platform—to access video files on a Sun MediaCenter server. In addition to this video server support, the daemon supports the “traditional” FTP functions described in the ftp (1) man page.
The video-file functions provided by the FTP daemon require no special client-side software. Also, the Sun MediaCenter FTP daemon supports any ftp client that conforms to the FTP protocol, regardless of the platform on which it is running.
FTP client’s support for video files is illustrated in
FIGURE 6-1.
6-1
PC or Workstation
Sun MediaCenter Server
FTP Protocol
Standard
FTP Client
Software
Local
File
System
Standard FTP Functions
FTP Functions for Video Files
FIGURE 6-1 Sun MediaCenter FTP Functions
Sun MediaCenter
FTP
Daemon
Unix
File
System
(Video Files)
Media
File System
6-2 Sun MediaCenter Server Administrator’s Guide • December 1997
6.1 Keyword for Video-File Functions
The keyword smc: in an ftp command invokes a video-file function. So, for example, to obtain a directory listing of the video files on a Sun MediaCenter server, you enter the following command:
ftp> dir smc: Title Usage NPT Format Available Speeds Bambi cm,msm 00:03:42 MPEGPS 1000, java_class FREE 00:05:01 MPEGTS 1000,3000,-3000, haircut msm, 00:01:50 MPEG1SYS 1000,
list continues to conclusion...
ftp>
The output from dir smc:, as above, is identical to that of smc_ls, described in Chapter 5.
To obtain a listing of video files with all relevant attributes, enter:
ftp> ls smc:title=\*
You receive output such as the following:
smc:title=Bambi,format=MPEGPS,speed=1000,type=data,rate=3000000 smc:title=java_class,format=MPEG1SYS,speed=1000,type=data,rate=1500000 smc:title=haircut,format=MPEGTS,speed=1000,type=data,rate=2600000
list continues to conclusion...
ftp>
The attributes shown in the preceding output are described later. Note that, at the ftp prompt, if you enter a ls or dir command without the smc:
keyword, you receive a listing of the UFS files in the current working directory, just as you normally would. Standard FTP functions remain unchanged.
Chapter 6 Sun MediaCenter Server FTP Daemon 6-3
6.2 Video-File Attributes
A piece of video content is stored as a title on a Sun MediaCenter server. The ftp video-file commands report or perform operations on titles. A title is identified by the following attributes:
name of the title, which usually corresponds to the name of the movie or video
clip; for example, Bambi for the move “Bambi”. There is no default value for the name attribute.
speed associated with the file. “Speed” refers to the speed and play direction of
the title’s bit stream as compared to normal-play speed, forward direction. A value of 1000 indicates a file plays at normal play speed, in the forward direction. A value of 4000 indicates the file plays at four times normal speed, forward direction. A value of -3000 indicates the file plays three times normal speed, in the reverse direction. The default value for the speed attribute is 1000.
type of the file, either data or index. A data file is usually a file containing an
MPEG bit stream. An index file is a file that identifies the splice points within a bit stream. The Media Stream Manager (MSM) uses these splice points when stopping and restarting a stream and when performing trick play. See the Sun MediaCenter Server Programmer’s Guide for an explanation of trick play. The default value for the type attribute is data.
rate at which the file containing the video bit stream was encoded. This is a
number in the range from 1500000 to 8000000 that specifies a number of bits per second. The rate attribute applies only to data files, not index files. There is no default for the rate attribute.
format is the format of the encoded bit stream. It can be one of:
MPEGTS, indicating an MPEG-2 Transport Stream.
MPEGPS, indicating an MPEG-2 Program Stream.
MPEG1SYS, indicating an MPEG-1 System Stream.
MPEGTCE, indicating an MPEG-2 encapsulation used by Thomson Consumer
Electronics. There is no default for the format attribute. The fully-qualified name of a title consists of all of the just-described attributes. For
example:
title=Bambi,format=MPEGPS,speed=1000,type=data,rate=3000000
6-4 Sun MediaCenter Server Administrator’s Guide • December 1997
The attribute values of the title named Bambi indicate a normal-play, forward­direction, MPEG file that was encoded 3 Mb/sec. in MPEG-2 Program Stream format.
All video-file commands require a value for the title attribute. (The value can be, with some commands, a wildcard.) Certain commands have requirements beyond this. These requirements are spelled out in the following section.
In some instances, such as when using video-file commands for backup, specification of all attributes is not required but is recommended. If you restore files that had not had their attributes recorded, you end up with files with default values for their attributes, which might not be appropriate for those files.
6.3 Video-File Commands
The ftp client commands you can use to access the FTP video-file functions on a Sun MediaCenter server are as follows:
delete
dir
get
ls
mget
mls
mput
put
rename
The following subsections contain descriptions of each of these commands. The commands are categorized by function.
Note – The names used for ftp client commands are those used by the Solaris ftp
client implementation. These command names might vary by implementation. For example, the put ftp command, described below, maps to the FTP protocol’s STOR function. A given implementation might have a copy command that maps to the same function. For that implementation, the description of put, below, would apply to copy.
Chapter 6 Sun MediaCenter Server FTP Daemon 6-5
All ftp commands except rename, when used with the Sun MediaCenter FTP daemon, accept the asterisk (*) as a wildcard character. When using the Solaris FTP client, you must use a backslash to escape the asterisk. Otherwise, the shell interprets the asterisk to mean all files in the current working directory. Other FTP clients, such as one you might use on a Wintel PC, might not have this requirement.
Note – The wildcard asterisk, as used with the Sun MediaCenter FTP daemon, has a
different meaning from when you use the asterisk without the smc: keyword. As used with the Sun MediaCenter FTP daemon, the asterisk means “all of the titles on the server” or, with mput, “all of the titles in the current directory.” You can use the asterisk only by itself, not as a substitute for a piece of a string. For example, the following is valid syntax:
ftp> dir smc:title=\*
The example above, returns the names of all titles on the server. The following is not valid syntax:
ftp> dir smc:title=Bat\*
In the example above, the asterisk does not allow you to search on all titles that begin with the string “Bat”.
6-6 Sun MediaCenter Server Administrator’s Guide • December 1997
Loading...