RealNetworks introduced RealVideo with RealSystem 4.0, making streaming video available over the Internet. This chapter covers RealVideo production and explains other video formats that RealSystem G2 can stream. It also provides tips for capturing high-quality video and working with digitized video source files.
When producing a RealVideo clip, you should choose the best source material and best equipment possible. The goal throughout the video production process is to get the best video quality with the smallest streaming file size.
To start video production, you capture video source by shooting a scene with a video camera, for example, or gathering prerecorded content from tape, satellite, laserdisc, or so on.
|"Recording Video" provides guidelines for capturing video.|
You next digitize the video to a standard file format, such as AVI or QuickTime. With your preferred video editing software, you can then edit the video as necessary. If you are broadcasting live, however, you encode the streaming video directly from the source.
|See "Digitizing Video" for tips on video editing. For more on live broadcasting, read Chapter 11.|
With your digitized file optimized or your live broadcast ready to go, you encode your source as RealVideo. When you do this, you target a network bandwidth or set of bandwidths and choose a RealAudio codec or set of codecs for the audio track.
|See "Creating RealVideo Clips" for more on RealVideo production. "Choosing RealAudio Codecs" explains RealAudio codecs.|
With your presentation ready to go, you make your RealVideo clip or broadcast available through your Website. If you are combining video with another streaming clip, such as RealText, you write a SMIL file that assembles the pieces.
|Chapter 7 explains how to create a SMIL file. See Chapter 10 for instructions on linking your Web page to a RealVideo clip or a SMIL file.|
Observe the following points if you intend to shoot a new video rather than use existing video content. Because video loses image quality when compressed for streaming, always start with the best video source available.
|For pointers on producing audio, see "Capturing Audio".|
Whether you shoot a video yourself or digitize existing material, it's important to start with a high-quality video format. The following are common videotape formats in order of descending quality:
It's important to consider the video's final frame size before you shoot the first frame. To reach Web users with 28.8 Kbps modems, you should produce a video approximately 176x132 pixels. With this small size, you need to frame important visual elements well.
|For more on window size, see "Digitizing Video".|
The less that changes from frame to frame, the sharper the image will appear in the encoded video. RealVideo compression technology reuses existing data when frames are similar, so a video with relatively stationary subjects ("talking heads") will look better than a music video with rapid scene changes and a lot of movement. You can do the following to cut down on unnecessary movement:
Of course, you don't want to eliminate all dynamic elements! When you do include rapid movement, give enough time for objects to resolve. Because of low frame rates and high compression, objects coming to rest may appear blurry at first. If you have a dialog box popping up on a computer screen, for example, show that box stationary for a few seconds so that the image resolves.
|RealPix makes a great companion to RealVideo. When presenting a lecture, for example, use RealVideo to show the speaker and a RealPix slideshow to present visual aids such as information written on a blackboard. For more on RealPix, see "Images".|
Bright lighting at a constant exposure keeps the foreground detail crisp. Use uniform, dark colors for backgrounds, and uniform, light colors (but not whites) for clothing. Complex textures such as paisley and stripes degrade the final image quality with unwanted visual effects.
If you are not broadcasting RealVideo live, you digitize the source video (direct camera feed, tape, disc, or so on) on your computer or video editing station. You can then edit the file with your preferred video editing software before encoding it as RealVideo. The following sections provide tips for digitizing video.
Although RealVideo can encode up to 30 fps, the maximum recommended frame rate for streaming video over a network is 15 fps. Higher frame rates may cause playback problems on slower machines. RealVideo encoding tools use a frame rate that varies with the bandwidth target and the emphasis on smooth motion or image quality. With video source at 15 fps, your encoding tool can vary the RealVideo clip frame rate between 1 and 15 fps as needed.
Always use 24-bit color. Lower color resolution produces poor quality videos.
Video playback devices commonly have at least two common output types, S-video and composite. Use S-video, which produces better results.
Video capture places a large burden on a computer's CPU and hard drive. Be sure to have a fast machine. To avoid dropping frames during video capture, use a hard drive specially made for audio and video work. On Windows machines, you can use any video capture card that supports Video for Windows.
Unless you are short on disk space or your video capture card recommends a different window size, capture video in a window 320 pixels wide by 240 pixels high. With your video editing software, you can then reduce the window size before encoding the RealVideo clip.
The following table, which you should use as a general guideline only, shows three common RealVideo clip sizes that maintain the 4:3 aspect ratio used in television. You can produce RealVideo at any width-to-height ratio, however.
|Width x Height Pixel Size||RealVideo Bandwidth||Image Quality|
|20-500 Kbps||Good to High|
|240 x 180
|320 x 240
For each window size, the table lists bandwidth guidelines that assume a desired frame rate of 10 to 15 fps. The table shows that for 28.8 Kbps modems (20 Kbps usable bandwidth), you should use a window no larger than 176x132. Although its overall quality will be good, the image may encode at less than 10 fps. You'll get better quality when encoding for higher bandwidths.
Keep in mind that you can create a 240x180 window for bandwidths lower than 100 Kbps, or a 320x240 video for bandwidths lower than 200Kbps. But you're not likely to get high image resolution and 10-15 fps. The video might encode at 5-7 fps, for example, which may be acceptable for your audience. Experiment with different sizes, playing the encoded clip back in RealPlayer G2 to test its quality.
|With your RealVideo encoding tool, you can choose to encode a large video for low bandwidths as a "slide show," which streams approximately one frame per second.|
|See Chapter 3 for details on targeting bandwidth.|
It is better to work with uncompressed formats. Otherwise, you compress the source once when you digitize it and again when you encode it as RealVideo. This double compression can decrease the image quality. Use a compressed source format only if your RealVideo encoding tool supports the file as input. You can use compressed AVI as long as the RealVideo encoding machine has the same Video for Windows (VFW) driver used to compress the AVI.
|For more on RealVideo input formats, see "Creating RealVideo Clips".|
Use this formula to calculate the approximate size in Megabytes of a digitized video file:
(pixel width) x (pixel height) x (color bit depth) x (fps) x (duration in seconds)
Suppose you want to capture a three minute video at 15 frames per second with 24-bit color in a window that is 320x240 pixels. Your digitized source file would be approximately 622 Megabytes:
(320) x (240) x (24) x (15) x (180) / 8,000,000 = 622 Megabytes
If necessary, you can conserve disk space by decreasing the window size or lowering the frame rate.
|Windows 95 and Macintosh operating systems limit a single video file to 2 Gigabytes (2048 Megabytes). At a 320x240 window size and 15 fps, this translates to about 9.5 minutes of video. To work around this, create separate source files, encode them as separate RealVideo clips, and merge the clips with editing tools included with your RealVideo production software.|
RealVideo's high compression rate makes it well-suited for streaming video over the Internet or intranets. A RealVideo clip uses the file extension .rm and typically includes an embedded soundtrack encoded as RealAudio. You start with a video file in a digitized format, then encode a RealVideo clip from this source file using a RealVideo encoding tool. Your encoding tool should be able to accept at least one of these input formats:
|RealVideo production tools are available at http://www.realnetworks.com/developers/.|
Like RealAudio, RealVideo uses a "lossy" compression scheme that discards parts of the source file during encoding. The following table provides a reference for RealVideo codecs. An "
X" in the G2, 5, or 4 column indicates that a clip encoded with this codec can be played by RealPlayer G2, 5.0, or 4.0. Earlier versions of RealPlayer do not play RealVideo.
|G2 Standard (new default)||
||G2 codec for fast encoding and encoding a single clip for multiple bandwidths using SureStream.|
|Standard (old default)||
||Standard codec used in past releases. No multiple encoding in a single clip.|
||Discontinued in RealSystem G2 encoders. RealPlayer G2 can play existing fractal-encoded clips, though.|
When you encode RealVideo, you choose an overall bandwidth target or set of targets, then set parameters such as audio type (voice or music), compatibility with earlier versions of RealPlayer, and an emphasis on smooth motion or sharp images. After you make your choices, the encoding tool chooses the audio codec or codecs to use and encodes the clip using a variable frame rate. The following sections give tips on using RealSystem production tools.
|See the tool's manual or online help for step-by-step instructions on encoding RealVideo, as well as more information about encoding options. RealVideo production tools are available for purchase or free download at http://www.realnetworks.com/developers/.|
|Not all RealSystem tools may include the features described here. Check the product description or documentation for information on supported features.|
Always keep a copy of the original video source file. To edit the RealVideo clip, modify the source file as necessary, then encode the file again as RealVideo. You cannot convert RealVideo clips to other video formats.
When you encode a RealVideo clip, consider whether it will play in parallel with another clip. If so, you can set an option in your encoding tool so that the RealVideo clip does not consume all available bandwidth. For a 28.8 Kbps modem connection, for example, the encoder standardly encodes the clip to use 20 Kbps. You can alter this default value so that the video uses 12 Kbps, for example, leaving bandwidth free for another clip.
|Chapter 3 explains more about target bandwidths.|
You can create a single RealVideo clip encoded for up to six bandwidths with RealSystem's SureStream technology, which uses the new RealSystem G2 video and audio codecs. You can also specify backwards compatibility with RealPlayer 5.0. The encoding tool then encodes the clip for your selected bandwidths with the RealVideo and RealAudio G2 codecs. It also includes in the clip an encoding that uses a codec compatible with RealPlayer 5.0 and targets the lowest bandwidth choice.
For example, you can encode a single clip for the target connections shown in the table below. Based on its connection speed, RealPlayer G2 receives the SureStream 20, 32, 45, or 80 Kbps stream. Earlier versions of RealPlayer receive the 20 Kbps backwards-compatible stream regardless of their connection speeds. Note that the RealAudio codec choices shown below are examples only. The encoding tool may choose other codecs depending on a voice or music soundtrack, and which features of the video you want to emphasize.
|Target Connection||Clip Bit Rate||RealAudio Codec||RealVideo Bandwidth|
|28.8 Kbps modem
|20 Kbps||8 Kbps Music||12 Kbps|
|28.8 Kbps modem||20 Kbps||8 Kbps Music-G2 Mono||12 Kbps|
|56.0 Kbps modem||32 Kbps||11 Kbps Music-G2 Mono||21 Kbps|
|56.0 Kbps ISDN||45 Kbps||20 Kbps Music-G2 Stereo||25 Kbps|
|112 Kbps dual ISDN||80 Kbps||44 Kbps Music-G2 Stereo||36 Kbps|
|For information on RealAudio codecs, see "Choosing RealAudio Codecs".|
|To support multiple bandwidths without using SureStream and the new RealSystem G2 codecs, you must encode a separate clip with each codec. You then use a SMIL file to specify bandwidth choices. For more on bandwidth selection through SMIL, see "Setting Bandwidth Choices".|
When you encode with the new RealVideo standard codec, the encoding tool crops the video window to multiples of 4 pixels, so a 176x132 video stays its original size. With the older standard codec, the tool crops to multiples of 16 pixels, however, so a 176x132 video encodes at 176x128 pixels. Encoding tools also let you manually crop the image window to leave areas of the source video out of the RealVideo clip.
RealVideo clips encoded for 200 Kbps or higher bandwidths may have image quality and frame rates that overburden processors slower than 120 Mhz. You should therefore use high-bandwidth RealVideo only for fast machines with fast connections.
Your encoding tool may have a batch mode that lets you encode several clips at once. The batch encoder may run through a command-line interface or a graphical user interface.
RealSystem can stream several video formats in addition to RealVideo. The following table lists the streamable formats and shows whether RealPlayer G2 for different operating systems (Windows 95 or NT, Macintosh, and UNIX) can play back the video. RealSystem supports all Vivo codecs. For other video formats, however, it typically does not stream codec-compressed files. When codec compression other than Vivo is supported, codecs are not included with RealPlayer G2 and must reside on the playback machine already.
|ASF 1.0 (.asf)||compressed||yes||no||no|
|AVI 1.0 (.avi)||compressed||yes||no||no|
|QuickTime 2.0 (.mov)||compressed||yes||no||no|
|RealSystem plug-ins may exist for other video formats. Check http://www.real.com/devzone for information about additional video formats you can stream.|
Observe the following points when streaming video formats other than RealVideo: