RealNetworks introduced RealVideo with RealSystem 4, making streaming video available over the Internet. This chapter covers RealVideo production techniques, providing tips for capturing high-quality video, working with digitized video source files, and using RealProducer to encode your clips.
A video consists of two parts: the visual track and the soundtrack. In a RealVideo clip, the soundtrack is encoded with RealAudio codecs, and the visual track is encoded with a RealVideo codec. Both tracks are packaged in a RealVideo clip that, like a RealAudio clip, uses the file extension
.rm. This section explains how RealVideo encodes a source video for streaming. This information will help you produce high-quality streaming clips.
![]() |
Note |
---|
Keep in mind that everything discussed about RealAudio clips in Chapter 3 also applies to the soundtracks in RealVideo clips. |
Because RealVideo uses RealAudio to encode a video's soundtrack, a chunk of the clip's bandwidth first goes toward the audio. The visual track is then squeezed into the bandwidth that's left. For 28.8 Kbps modems, for example, RealVideo clips stream at 20 Kbps, leaving 8.8 Kbps of modem bandwidth for overhead. How much bandwidth the visual track gets depends on how the audio is encoded. With a 5 Kbps RealAudio voice codec for the soundtrack, the visual track gets 15 Kbps. With an 11 Kbps music codec, though, the visual track gets just 9 Kbps.
At low bandwidths, how you encode the soundtrack can affect how the visual track looks. RealAudio music codecs typically consume more bandwidth than do voice codecs. Music's greater frequency range requires more data than does speech, so a music soundtrack consumes more bandwidth than a spoken one. A video with an audio narration might therefore look better than one accompanied by music, as there would be more bandwidth available for the visual track.
At higher streaming speeds, the soundtrack uses proportionally less of the clip's bandwidth, so differences in soundtrack encoding affect visual quality less. At speeds above 100 Kbps, you get high-quality sound that uses no more than a quarter of the clip's streaming bandwidth. The following table lists the standard RealVideo target audiences, giving the clip streaming speeds and the RealAudio codecs used for the soundtracks, broken out by audio type.
![]() |
Note |
---|
With SureStream technology, a single RealVideo clip can stream at many different speeds. For the basics of SureStream, see "SureStream RealAudio and RealVideo". |
Like RealAudio, RealVideo is "lossy," meaning that it throws out nonessential video data when encoding a clip. One way that RealVideo squeezes down clip sizes is by reducing the video's frame rate. The higher the frame rate, the smoother the motion:
Most source videos start out at 15 to 30 fps. During encoding, RealVideo adjusts this frame rate downward as necessary, keeping the rate up in high-action scenes, reducing it in slow ones. Thus, your encoded clip will not have just one frame rate, but a mix of frame rates that varies with its content. If you follow good production practices, your clips will typically stream over slow- to medium-speed connections at 7 to 15 fps. At higher speeds, you'll get 15 to 30 fps. Many factors, though, affect a RealVideo clip's frame rate:
In addition to changing its frame rate, RealVideo can reduce a clip's streaming size by throwing out pixel data. A video stores information about each pixel in the frame. RealVideo, on the other hand, stores data for pixel groups. When bandwidth is tight, RealVideo shoehorns pixels with slightly different RGB values into the same group. These pixels then look identical rather than nearly identical. This may result in a loss of detail if compression is too high. The following illustration compares a smooth video with one that has lost detail through too much compression.
By using good production practices as described in this chapter, you can help keep the video's clarity intact during encoding. Also note the following points:
The following table lists four common RealVideo clip sizes that maintain the 4:3 aspect ratio used in television. For each clip size, the table indicates the general playback quality you'll get when streaming a RealVideo 8 clip to various target audiences. "Excellent" video quality means few visual artifacts and a frame rate that results in consistently smooth playback. Lower-quality video playback means more artifacts and a lower frame rate.
Target Audience | Clip Speed | Video Quality for Window Size in Pixels | |||
---|---|---|---|---|---|
176 x 132 (show size) |
240 x 180 (show size) |
320 x 240 (show size) |
640 x 480 | ||
28.8 Kbps modem | 20 Kbps | Excellent | Good | Fair | Poor |
56 Kbps modem | 34 Kbps | ||||
64 Kbps single ISDN | 45 Kbps | Good | |||
112 Kbps dual ISDN | 80 Kbps | Excellent | Excellent | Fair | |
Corporate LAN | 150 Kbps | Good | |||
256 Kbps DSL/cable | 225 Kbps | Excellent | |||
384 Kbps DSL/cable | 350 Kbps | ||||
512 Kbps DSL/cable | 450 Kbps |
The table shows that when streaming larger videos, you get good to excellent quality only at higher connection speeds. If you plan to stream clips over modems, you can first encode your clip at 320 by 240 pixels to test its quality. If you want better quality, shrink the video window with your editing software or with RealProducer during encoding.
![]() |
Tip |
---|
When resizing a video with RealProducer, setting the RealVideo preferences to high-quality resize rather than a fast resize yields better results. |
When you want to encode a single video for both low-speed and high-speed connections, you need to decide what video window size to use. Although with SureStream technology you can easily create a single RealVideo clip that streams at many bandwidths, using too large a window results in low frame rates for viewers with dial-up modems. Therefore, you may want to use a small video window to reach the widest audience. High-speed viewers, however, will not receive the benefit of their hefty bandwidth.
You can resolve this dilemma by creating two or more versions of your video, each for a different window size. You can use your video editing software to do this, or use RealProducer to resize or crop the video during encoding. Then encode each video for a few different streaming speeds. You can make the clips available through separate links, or use a SMIL <switch>
tag to let RealPlayer choose which version to play.
![]() |
Additional Information |
---|
The basics of the <switch> tag are in "Switching Between
Alternate Choices". For a sample <switch> tag, see
"Switching for Different Video Window Sizes".
|
RealVideo 8 is the standard RealVideo codec, but you can also encode with one of two RealVideo G2 codecs. The codec you use encodes all of a clip's SureStream streams. You cannot encode half the streams with the RealVideo 8 codec, for example, and the other half with a RealVideo G2 codec.
The RealVideo 8 codec results in visual quality markedly superior to that produced by the RealVideo G2 codecs. It requires more processing power, though, so encoding a clip with it takes longer than encoding the clip with a RealVideo G2 codec. RealPlayer 8 and later can play RealVideo 8 clips. Earlier versions of RealPlayer are prompted to autoupdate to RealPlayer 8. RealNetworks recommends using this codec unless you need faster encoding performance during broadcasts, or you need to stream video to earlier versions of RealPlayer.
![]() |
Note |
---|
Most users upgrade their RealPlayers soon after a new version is released, so it is generally safe to use the RealVideo 8 codec. |
The RealVideo G2 codecs are older codecs used by RealProducer G2 and RealProducer 7. These codecs encode video clips faster than the RealVideo 8 codec does, but their visual quality is poorer. For a given streaming speed, using an older RealVideo codec rather than RealVideo 8 results in either a reduced frame rate or diminished visual quality at the same frame rate. Use one of the following RealVideo G2 codecs for faster encoding during broadcasts or if you need to stream video to versions of RealPlayer that cannot upgrade to Release 8:
The RealVideo G2 with SVT codec is compatible with RealPlayer G2 Update 1 (version 6.0.6) or later. RealPlayers with lower version numbers are prompted to autoupdate to the latest version of RealPlayer before viewing the clip.
The RealVideo G2 codec without SVT is compatible with RealPlayer G2 and later. It is not compatible with RealPlayer 5 or earlier.
In RealProducer, you cannot explicitly choose the RealVideo standard codec, which was the default codec before RealSystem G2 was released. RealProducer uses this codec solely for backward compatibility with RealPlayer 5.
The RealVideo 8 and RealVideo G2 with SVT codecs include Scalable Video Technology (SVT), which scales down frame rates when clips play on slower computers. RealVideo's variable frame rate means that one scene may be encoded at 7 fps, whereas another one is encoded at 15 fps. High frame rates take a lot of processing power to decompress. Although fast PCs handle high frame rates well, slower PCs may have trouble. With SVT, RealPlayer can lower the frame rate "on the fly" to keep a PC's CPU from sputtering. So although a given scene is encoded at 15 fps, it may play on some RealPlayers at 8 fps if those computers lack the power to decompress 15 fps video clips.
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 optimum video quality for each streaming speed.
To start video production, you capture the source video by shooting a scene with a video camera, for example, or gathering prerecorded content from a tape, satellite, laserdisc, or other source.
![]() |
Additional Information |
---|
"Recording Video" provides guidelines for shooting a video. |
You next digitize the video to convert it 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.
![]() |
Additional Information |
---|
See "Digitizing Video" for tips on video editing. For more information on live broadcasting, read Chapter 11. |
With your digitized file optimized or your live broadcast ready to go, you encode your source as a RealVideo clip. When you do this, you target a network bandwidth or a set of bandwidths.
![]() |
Additional Information |
---|
"Encoding RealVideo with RealProducer" provides encoding tips. |
With your presentation ready to go, you make your RealVideo clip or broadcast available through your Web site. If you are combining video with another streaming clip, you write a SMIL file that assembles the pieces.
![]() |
Additional Information |
---|
Chapter 6 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. |
Read this section carefully if you intend to shoot a new video rather than use existing video content. Because video loses image quality if it's highly compressed, always start with the best video source available.
![]() |
Additional Information |
---|
For pointers on recording audio, see "Capturing Audio". |
Whether you shoot a video yourself or digitize existing material, start with a high-quality video media. The following are common video formats, listed in order of descending quality:
Consider the video's final frame size before you shoot the first frame. Streaming over 28.8 Kbps modems requires a small video window, so you need to frame important visual elements well. For recommended window sizes, see "RealVideo Frame Rates".
The fewer things that change from frame to frame, the sharper the image will appear in a low-bandwidth video. 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, allow 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, have the box remain stationary for a few seconds so that the image resolves.
![]() |
Tip |
---|
RealPix makes a great companion to RealVideo. When presenting a lecture, for example, use RealVideo to show the speaker, and use 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 uniformly dark colors for backgrounds, and uniformly 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 streams live, you digitize the source video on your computer or video editing station. You can then edit the file with your preferred editing software before encoding it as a RealVideo clip. This section provides tips for digitizing video.
![]() |
Tip |
---|
Always keep copies of the video source files. You cannot convert RealVideo clips back to their original source formats or any other streaming formats. |
Video playback devices commonly have at least two common output typesS-video and composite. Use S-video, as it produces better results.
Always use 24-bit color. Lower color resolution results in poor clips.
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 files as long as the computer used to encode RealVideo clips has the same Video for Windows driver used to compress the AVI file.
Capture the video content at 15 frames per second (fps) if your clip will stream at less than 100 Kbps. For higher-speed streaming, capture it at 30 fps. Because a RealVideo clip's frame rate varies, some scenes may be encoded at less than the capture rate depending on bandwidth constraints. SVT enables RealPlayer to lower the frame rate on computers that have low processing power, ensuring that high frame rates will not overburden slow computers.
![]() |
Additional Information |
---|
For more information on SVT, see "Scalable Video Technology". |
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. You can capture full-motion video at the full-screen size of 640 by 480 pixels if:
Using your editing software or RealProducer, you can reduce the window size for your RealVideo clip if necessary. For recommended RealVideo window sizes, see "RealVideo Window Sizes".
Because video capture places a large burden on a computer's CPU and hard drive, be sure to use a fast computer. To avoid dropping frames during video capture, use a hard drive specially made for audio and video work. On Windows computers, you can use any video capture card that supports Video for Windows.
Use the following 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)8,000,000
Suppose you want to capture a three-minute video at 15 frames per second, with 24-bit color, in a window that is 320 by 240 pixels. As you can see from the following equation, your digitized source file would be approximately 622 MB:
(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, or both.
The Macintosh and some Windows file systems limit a single file to 2 GB (2048 MB) in size. At a 320-by-240 window size and 15 fps, this translates to about 9.5 minutes of video. Certain video production programs support the OpenDML (AVI 2.0) standard, which allows the creation of files larger than 2 GB. RealProducer may be able to accept a video source file larger than 2 GB as input, depending on the production software used to create the file.
If you plan to produce long videos or videos with a large window size, check whether or not your video production software is limited to a 2 GB output file size. If it is not limited to 2 GB, create a video file larger than 2 GB and test to determine if RealProducer can accept the file as input.
![]() |
Additional Information |
---|
Search RealNetworks' Knowledge Base for "AVI limit" at http://service.real.com/kb/index.html. |
To produce RealVideo clips, you start with video input from a live source, a digitized file, or media such as a tape or CD. You then encode a RealVideo clip from this input using a RealVideo encoding tool. The most widely used tools for encoding RealVideo are RealProducer Basic (a free product) and RealProducer Plus, which are available from RealNetworks at:
http://www.realnetworks.com/products/producer/info.html
RealProducer on Macintosh accepts the input formats widely used on that platform, whereas RealProducer on Windows or UNIX supports the formats widely used on those platforms. Check the RealProducer manual for your operating system for a list of accepted formats, which may include:
When you encode RealVideo clips, you choose a bandwidth target or set of targets, then set parameters such as audio type (voice or music) and an emphasis on either smooth motion or sharp images. RealProducer then decides which RealAudio codecs are best to use for the soundtrack. It uses SureStream technology to encode the RealVideo clip for all your bandwidth choices, ensuring that each stream requires only a few seconds of preroll.
![]() |
Additional Information |
---|
Refer to the RealProducer manual or online help for step- by-step instructions for encoding clips. A document explaining RealVideo codecs and options in-depth is at http://service.real.com/help/library/blueprints.html. |
![]() |
Note |
---|
RealVideo encoding tools other than RealProducer may not include all the features described in the following sections. |
For all practical purposes, RealVideo's streaming bit rate is infinitely scalable. You can encode RealVideo at any speed you want, from 20 Kbps to hundreds or thousands of kilobits per second. Plus you can encode precisely at any bandwidth you choose, such as 89 Kbps, 117 Kbps, 575 Kbps, 1.5 Mbps, and so on. With RealProducer Plus, you do this by adjusting RealVideo's target audience settings.
If your RealVideo clip will play in parallel with another clip, you may need to lower RealVideo's bit rate for each target audience. This way, the clip does not consume all of a connection's bandwidth. For a 56 Kbps modem, for example, RealProducer standardly encodes the clip to stream at 34 Kbps. Using the RealVideo target audience settings, you can lower this value to 20 Kbps, for example, leaving 14 Kbps free for another clip.
Whenever you lower RealVideo speed, the new bit rate includes the rate of the RealAudio codec used for the soundtrack. If you use a 32 Kbps RealAudio codec and set a total RealVideo bit rate of 36 Kbps, you will not have much bandwidth left for the visuals (maybe a frame every few seconds). You'll need to select a lower-bandwidth RealAudio codec.
There are no strict rules for the ratio of soundtrack bandwidth to total RealVideo bandwidth. The ratio depends entirely on whether you want to emphasize the audio track or the visuals. RealVideo normally allots no more than 25 percent of the total bandwidth to the soundtrack because the visual information contains much more data. At bandwidths of several hundred kilobits per second, you can use considerably less bandwidth for the soundtrack in relation to the visual track.
RealProducer can include in SureStream clips a stream that RealPlayer 5 can play. This backward-compatible stream is set for your lowest target bandwidth. For example, if your clip targets 28.8 Kbps modems, 56 Kbps modems, and DSL speeds, the RealPlayer 5 stream is for 28.8 Kbps modems. It uses older RealAudio and RealVideo codecs, and RealServer streams it to RealPlayer 5 using the older PNA protocol rather than the newer RTSP.
RealProducer's preferences include filtering options you can use when encoding RealVideo clips. These filters remove artifacts that appear in the encoded clips because of the methods used to create the source video.
Noise distortion is similar to the "snow" that often shows up on TV screens as a result of signals received over an antenna. RealProducer has low and high noise filters you can use if your source video clip has a little noise or a lot of noise, respectively. The best way to eliminate noise, though, is to follow good production practices, as described in "Recording Video".
When you resize a RealVideo clip with RealProducer, you can use a resizing filter that performs either a fast resize or a high-quality resize. These resizing options affect the source video only when you make the clip smaller. They tell RealProducer to throw out video data by using either a quick method (fast resize) or a complex analysis (high-quality resize). A high-quality resize results in a superior image, but it also lengthens the encoding time.
The Inverse-Telecine filter is for cinematic film that was transferred to NTSC video. It has no effect on PAL video. Film is usually photographed at 24 frames per second (fps), and the film-to-video conversion (called "telecine") duplicates some frames to achieve the NTSC standard of 30 fps. To strip out redundant frames, use the inverse-telecine filter when encoding NTSC video that was transferred from film and has a frame rate of 25 to 30 fps.
The de-interlace filter removes jaggedness from interlaced video. It is useful only for interlaced source video that is at least 240 lines high. Typical source video used for television is 480 lines high. If you digitize the video with a video capture card that captures at 240 lines or fewer, the card throws out either the odd or the even lines, de-interlacing the video itself.
The RealProducer preferences include several RealVideo encoding options that affect the quality of RealVideo clips by modifying RealProducer's encoding methods.
Variable bit rate (VBR) encoding is optional for RealVideo. It varies a clip's
playback bit rate while keeping the streaming bit rate constant. This gives more bandwidth to scenes that are hard to compress and less to scenes that are easy to compress. In a video that streams at 225 Kbps, for example, one second may get 150 Kb of data while another gets 300 Kb. VBR encoding generally provides video quality superior to that achieved with constant bit rate (CBR) encoding, making the most difference in videos with a mix of high- and low-action scenes.
With two-pass encoding, RealProducer runs through the source video once to gather information. It then makes a second pass to encode the RealVideo streams. Two-pass encoding helps the most with variable bit rate (VBR) encoding. With this type of encoding, RealProducer analyzes the entire source video first to determine how best to vary the playback bit rate. Without it, RealProducer analyzes small sections of the source video during encoding, creating a string of VBR sections within the clip.
RealProducer's loss-protection feature adds error-correction data to RealVideo streams, helping them maintain quality in lossy environments. RealProducer adds as much error-correction data as it can without lessening the video quality. Although you'll get more benefit from this feature when streaming across the Internet rather than over an intranet, it is useful to turn loss protection on for all encoded content.