|
| 以 PDF 格式下载本书
- CHAPTER 1
Sun MediaCenter One Software
-
- This chapter describes the Sun MediaCenter One software. This version of the Sun MediaCenter server software is restricted to a single output stream.
1.1....Introduction
- Sun MediaCenter One software enables any Sun workstation or server to stream video from its local filesystem, which is usually the UNIX File System (UFS) or Network File System (NFS). The software provides the same Application Programmer's Interfaces (APIs) for content loading, browsing, and playback as the Sun MediaCenter "Classic" product, so that you can use applications written for the Sun MediaCenter Classic server with the Sun MediaCenter One version without any modification.
- The Sun MediaCenter One product is shipped in the form of Solaris(TM) packages for software and man pages (installation is described in the manual Vendor Value-Added Software). These packages include three pieces of content:
-
- "SMCnews_0.15Mbs"
- "SMCnews_0.46Mbs"
- "SMCnews_1.24Mbs"
- Each piece of content has about a one-minute, twenty-second play time. The encoding rate for each title is embedded in its name. For example, "SMCnews_1.24Mbs" is encoded at a bit rate of 1.24 Mbps. The encoding rate indicates the amount of network bandwidth the playing of a title consumes.
- Sun MediaCenter One software is shipped in conjunction with the Sun MediaCenter Java Client for Sun Workstations, shipped in the Solaris package SUNWsmcjc and described in Chapter 2.
1.2....Sun MediaCenter Software Comparison
- Sun MediaCenter One software is a pared-down version of the Sun MediaCenter Classic software that is factory installed on Sun MediaCenter servers. The following is a comparison of Sun MediaCenter Classic and Sun MediaCenter One features.
-
TABLE 1-1
| Feature | SMC Classic | SMC One |
| Media File System (instead of UFS) | Yes | No |
| Customized network interface drivers | Yes | No |
| Guaranteed output throughput | Yes | No |
| Video bit pump | Yes | Yes |
| Media Stream Manager that provides a programmatic interface to the Media File System and bit pump | Yes | Yes |
| Media Stream Manager Client API that presents a VCR-like interface to the video server functions | Yes | Yes |
-
TABLE 1-1 (Continued)
| Feature | SMC Classic | SMC One |
| Content Manager that handles the movement of MPEG titles to and from the video server | Yes | Yes |
| Content Manager Client API that gives a programmer easy access to content loading and copying functions | Yes | Yes |
| Set of utilities for loading content and monitoring the server | Yes | Yes |
- The Media File System and the network interface drivers, not present in the Sun MediaCenter One software, are critical for the Sun MediaCenter Classic server, to support the guaranteed throughput required for the delivery of dozens of streams. For the delivery of one or a few streams--the capacity of Sun MediaCenter One software--the video bit pump is the key element.
- Where the Sun MediaCenter Classic software is tightly coupled with a specific set of hardware components--disks, network interfaces, CPU, and memory--the Sun MediaCenter One software can run on any moderately powerful SPARC(TM) machine that has sufficient network bandwidth to support 1.5 Mbps between the server and a client.
- The current release of Sun MediaCenter One software is based on the Sun MediaCenter Classic software release 2.0.1.
1.3....Hardware/Software Requirements
- Sun MediaCenter One software runs on Solaris 2.5.1 and Solaris 2.6. As far as hardware, testing has confirmed that it can run on a typical desktop machine, for example, a SPARCstation(TM) 10 with 64 MB of RAM.
- As important as CPU and memory is a relatively clear network path between the server and its clients. If the server is close to its maximum for video output (about 4 Mbps of output bandwidth) and is delivering video over a shared Ethernet, through a router or two, clients might receive choppy video and audio. A better solution is to connect the server to switched Ethernet and that there be zero or one router between the server and its clients.
-
Note - The Sun MediaCenter One software is limited to a single stream. Current clients support only MPEG-1. As a result of these two factors, the machine running the Sun MediaCenter One software will not be called upon to deliver more than about 1.5 Mbps (a typical encoding rate for MPEG-1 streams) of output. At this output, available network bandwidth remains as a consideration, but a less significant one than for the "unshackled" Sun MediaCenter One software.
- No specification of hardware requirements for a video server would be complete without a discussion of disk space. MPEG files use lots of it. The three 80-second clips shipped with the server software consume over 18 MB of disk space. Figure on 10.7 MB of disk space for each minute of an MPEG-1 title encoded at 1.5 Mbps.
- You should know that you cannot compress MPEG files. MPEG-format files (content) are already compressed, so you cannot use compress or zip to compress them further.
1.4....Installation
- You install the Sun MediaCenter One software using the pkgadd program. The installation procedure is described in the manual Vendor Value-Added Software, which accompanies the Solaris 2.6 Supplements CD.
- Sun MediaCenter One installation installs device drivers that use the kernel's DDI/ DKI interfaces, as do any Solaris unbundled device drivers. See the discussion of device drivers, below. During installation, you have the option of installing the Sun MediaCenter FTP daemon. The advantages of using this daemon are described in a following subsection.
- Upon completion of the pkgadd installation procedure, your machine is a fully-capable video server. This means that clients, such as our SPARC and PC Java clients, can request and display videos from your machine.
1.4.1...Sun MediaCenter One Device Drivers
- The device drivers added by the pkgadd of the Sun MediaCenter One software are:
-
-
· vvod
- The scheduler that schedules disk reads for streaming video.
-
-
· pump
- The bit pump that schedules the transmission of the video data.
-
-
· le_pump
- The driver that forwards all data from the pump to the le network driver.
-
-
· hme_pump
- The driver that forwards all data from the pump to the hme network driver.
1.4.2...Sun MediaCenter FTP Daemon
- When you install Sun MediaCenter One software, the pkgadd script gives you the option of replacing the standard /etc/inet/inetd.conf (saving the original) with a file of the same name with the following difference: instead of invoking the standard FTP daemon, /usr/sbin/in.ftpd, the new file invokes /opt/SUNWsms/bin/smc.ftpd.
- With the Sun MediaCenter FTP daemon, you retain all of the features and functions of the standard FTP daemon, with the addition that you can use ftp to load video content onto your machine. "Loading content" is different from simply copying MPEG files onto your machine. In loading content, you copy the files and perform housekeeping tasks that enable you to play the video from the server.
- Use of ftp, in conjunction with the Sun MediaCenter FTP daemon, is the most convenient way to load content onto a Sun MediaCenter server. If you do not use ftp, you must use smc_tar, which imposes requirements for content preparation that ftp does not.
1.5....Playing Videos
- You have installed Sun MediaCenter One software and rebooted and now you want to play videos. How do you do it? You now face an elemental truth about video servers: Without clients, they are useless.
- From a video consumer's point of view, a video server is a passive entity. Clients make requests and video servers deliver (or not). Though the Sun MediaCenter software has utilities that allow you to initiate stream delivery from the server itself, in general, the initiation of stream delivery occurs in response to remote client requests.
- Install the SUNWsmcjc package on a Sun machine running Solaris 2.5 or later. The Java client enables you to point your Java-capable web browser at a Sun MediaCenter server and play video from it. Installation of the Java client is described in the manual Vendor Value-Added Software. Chapter 2 describes the use of the Java client.
- You can install the Java client software on the machine running Sun MediaCenter One software and play video to yourself (so to speak). More useful though, and closer to the server software's intended purpose, is to play to a remote client over a network.
1.6....Content Requirements
- As much as you might enjoy the snippets of MPEG content we provide, you might, at some point, want to see something different. To do so, you will have to obtain some content.
- While the Sun MediaCenter server (both One and Classic) support MPEG-1 and MPEG-2 streams, as of the date of this publication, our clients support only MPEG-1.
- One would hope that you could play any MPEG-1-conformant bit stream. It turns out, however, that encoders can vary quite a bit and still, apparently, be within the MPEG-1 spec. Our clients play streams from a variety of vendors without a hiccup. Other streams play poorly or not at all.
- There is a pre-screening test that you can make of a stream, using the mpegcheck utility that is shipped with the Sun MediaCenter One software. Assume you have downloaded an MPEG-1 file weather.mpg from a local university site.
- Run:
-
% /opt/SUNWsms/msm/bin/mpegcheck weather.mpg
|
- If mpegcheck returns with something like the following output, you probably (but not necessarily) have a playable stream. The ultimate test is the playing of the stream a Sun MediaCenter-compatible client.
-
MPEG1 system stream
Mux rate = 1411.200 Kbps
Computed optimum bit rate = 1411.200 Kbps
Jitter @ 1411.200 Kbps = 0.01 msec late, 0.00 msec early
Drift @ 1411.200 Kbps = 0 ppm
Play time @ 1411.200 Kbps = 10.2 sec
|
- In the mpegcheck output above, note the "Computed optimum bit rate". Use this value, converted to bits per second, when you load a stream. In the example above, the encoding bit rate is 1,411,200 bits per second.
- The copying of an MPEG-1 file to a local filesystem is not sufficient to make a title available to the Sun MediaCenter software. You must use ftp to load content.
- There is a wealth of MPEG clips on the web. You can use the site listed below as a starting point, or use the string "mpeg-1 movies" (or something similar) as input to your favorite search engine.
-
http://www.mpeg.org/~tristan/MPEG/bitstreams.html
|
- The preceding URL is up-to-date as of the date of this publication. It is, of course, subject to change.
1.7....Loading Content
- You load content onto the Sun MediaCenter server with ftp, using ftp's put command. Suppose you have downloaded the clip weather.mpg from a web site, have it on a local filesystem, and have run mpegcheck on it, with good results. You're now ready to enter the following commands:
-
% cd <directory where weather.mpg is stored>
% ftp smc_server
Connected to smc_server.
220 smc_server FTP server (UNIX(r) System V Release 4.0) ready.
Name (smc_server:your login): your login or CR
331 Password required for your login.
Password: enter password
230 User your login logged in.
ftp> bin This step is critical!
200 Type set to I.
ftp> put weather.mpg smc:title=weather,type=data,rate=1411200,format=MPEG1SYS
200 PORT command successful.
150 Binary data connection for weather (129.144.90.32,33771).
226 Transfer complete.
local: weather.mpg remote:
smc:title=weather,type=data,rate=1411200,format=MPEG1SYS
1806340 bytes sent in 0.41 seconds (4.3e+03 Kbytes/s)
ftp> quit
221 Goodbye. Thanks for using the SunMediaCenter.
|
- You must perform the ftp loading even if the MPEG file is stored locally. In other words, you might have to ftp to yourself.
- You want to check on the availability of your new title, so you enter:
-
% /opt/SUNWsms/bin/smc_ls
Title Usage NPT Format Available Speeds
SMCnews_0.15Mbs FREE 00:01:21 MPEG1SYS 1000,
SMCnews_0.46Mbs FREE 00:01:20 MPEG1SYS 1000,
SMCnews_1.24Mbs FREE 00:01:20 MPEG1SYS 1000,
weather FREE 00:00:10 MPEG1SYS 1000,
|
- At this point, you can use our Java client to play the weather clip.
- To delete a clip, use the Sun MediaCenter software's smc_rm rather than the Solaris rm command. See the Sun MediaCenter customer documentation, available on the Sun web site (see URL below), or the product man pages for instructions on the use of the product's utilities.
- A word on the Sun MediaCenter FTP daemon: On a Sun MediaCenter server, ftp works as it normally does, unless the daemon sees the smc: keyword. With that keyword, the daemon realizes that it's dealing with video content and uses the facilities of the Content Manager to perform the specified ftp command. See "Sun MediaCenter FTP Daemon" on page 1-5 for further discussion.
- For Sun MediaCenter documentation and sample MPEG-1 content, see:
-
http://www.sun.com/products-n-solutions/hw/servers/smc_external.html
|
1.8....Administering and Monitoring the Server
- The Sun MediaCenter customer documentation describes a set of utilities that enable you to monitor activity on the server. For example, the client admin tool, available in the Java client software, is extremely useful. You can even do video multicasts with this tool.
- A video server MIB is part of the Sun MediaCenter software; this MIB enables you to use Solstice Domain Manager or another SNMP-conformant tool to monitor your Sun MediaCenter server.
1.9....Stream Capacity
- The Sun MediaCenter One software is constrained to deliver a single stream. Without that constraint, the software supports a maximum output bandwidth in the range from 100 Kbps to 4 Mbps, depending on UFS disk bandwidth or NFS bandwidth. Network congestion between server and client is an additional factor in the video quality at the client end.
|
|