previous next

Chapter 1: RealPix Authoring

With RealPix you can create streaming images, combining them with other media clips such as audio or text. This chapter explains the basics of RealPix authoring and streaming.

Image Formats

RealPix can stream images in these formats:

With the images ready, you simply create a RealPix file with mark-up similar to HTML. This mark-up describes how and when the images display, specifying special effects such as a fade to a solid color or a "wipe" transition between two images.

Image Caching

Because RealPlayer G2 does not maintain a disk cache or allow users to copy or download images, users do not have access to copyrighted materials in a RealPix presentation. RealPix caches images in memory for the duration of the RealPix presentation, however. A RealPix presentation can thereby reuse an image without consuming additional bandwidth. Each cache is specific to each RealPix presentation, though. A RealPix presentation does not have access to the image cache of another presentation playing concurrently.

Hosting a RealPix Presentation

Use RealServer G2 instead of a Web server to host your RealPix presentation. When delivered by RealServer, images in a RealPix presentation stream at different times depending on their place in the RealPix timeline. This lets you structure a RealPix presentation to keep it flowing smoothly. When delivered by a Web server, however, all RealPix images begin to download as soon as presentation playback begins. This causes a higher preroll.

Additional Information
See RealSystem G2 Production Guide available at http://service.real.com/help/library/index.html for more on RealServer and Web server hosting.

Preparing Images

For a RealPix presentation, you can use scanned pictures, clip art, or images downloaded from the Web. When preparing your presentation, maintain three separate sets of images:

  1. Original set

    The original set includes the unedited files you start with, such as original images off a scanner. Keep this set in case you need to change an image in the working set by, for example, restoring an area you cropped out. Leave these images uncompressed.

  2. Working set

    The working set comprises the files you have edited. You may have cropped the original images or combined them to form new images, for example. Keep these files uncompressed so that you can edit them later if necessary.

  3. Presentation set

    This set consists of the compressed files used in the presentation. For a given working set, you may have several presentation sets. For instance, you may have slightly compressed images for a high-bandwidth presentation, heavily compressed images for a low-bandwidth version.

Establishing a Timeline

If your presentation consists solely of streaming RealPix images, you have full control over the RealPix timeline. When you combine RealPix with another component such as RealAudio or RealText, however, the other component may establish the timeline. You then need to coordinate the RealPix images with the other clip's existing timeline. In these cases it is better to finish the other component first, then assemble your RealPix presentation to the final timeline.

When working with an audio track, for example, think about the order of the images, deciding at which points in the audio timeline each image must display. When you are ready to assemble your RealPix presentation, play back the audio and note where you want to add an image. This will establish your RealPix presentation timeline.

Once you have a timeline for your presentation and have ideas about how to place the images, you are ready to create a RealPix presentation. You may find it easier to create a storyboard to lay out the transitions and effects. Or you may want to dive right in, using the presentation in progress as your guide. Either way, carefully consider the bandwidth implications as you place your image and set the start times and durations.

Additional Information
For more on bandwidth, see "Bandwidth Usage".

Using JPEGTRAN

JPEGTRAN optimizes JPEG (.jpg) images for streaming with RealPix. It modifies them so that if packets are lost, missing image data is randomly dispersed instead of appearing as continuous blank lines across the image. A windows version (jpegtran.exe) is included in the utils directory of this manual. A Macintosh version is not yet available.

To use JPEGTRAN, first create JPEG-format images with the image editor of your choice. Then run JPEGTRAN from the command line on Windows 32-bit operating systems.From the directory that holds the JPEGTRAN program, use this command to process an image:


jpegtran -restart 1B -outfile output.jpg input.jpg

Additional Information
You can run jpegtran.exe in batch mode from the RealPix Bandwidth Calculator. For more information on the calculator, see "Running JPEGTRAN from the Calculator".

Creating a RealPix Presentation

The following steps describe how to create a RealPix file. A following section describes the RealPix mark-up tags in detail.

To Create a RealPix Presentation:

  1. Prepare your image presentation set. If you are using JPEG images, run the JPEGTRAN utility on them to prepare them for streaming.

    Additional Information
    For more on this utility, see "Using JPEGTRAN".

  2. Open a new text document in your text editor. At the top of the file, add the <imfl> tag. Add the </imfl> end tag at the bottom:
    
    <imfl>
    ...All Other Mark-up Goes Between These Tags...
    </imfl>

  3. Between the <imfl> and </imfl> tags, add the mark-up that defines how and when the RealPix images appear:
    
    <imfl>
    ...
    <image handle="1" name="drums.jpg"/>
    <image handle="2" name="franklin.jpg"/>
    ...
    </imfl>

    Additional Information
    See "Tag Descriptions".

  4. Save the file as plain text, using the .rp extension to mark the file as a RealPix file. On your local machine, open the RealPix file with RealPlayer to test the presentation.

    Note
    Playing a RealPix file on your local machine indicates whether the RealPix mark-up is correct. However, it does not guarantee that the file will stream across a network well. See "Bandwidth Usage" for information on making a RealPix presentation stream well.

  5. To combine RealPix with another file, create a SMIL file that controls the overall presentation. For example, the SMIL file can list a RealPix file and an audio soundtrack to be played together:
    
    <smil>
    <body>
    <par>
    <ref src="rtsp://realserver.company.com/pix/ads.rp"/>
    <audio src="rtsp://realserver.company.com/pix/ads.ra"/>
    </par>
    </body>
    </smil>

    Additional Information
    See RealSystem G2 Production Guide available at http://service.real.com/help/library/index.html for information about creating a SMIL file.

  6. Move your files to RealServer. If you are using an Internet Service Provider, for example, contact the ISP's RealServer administrator for instructions on doing this.

  7. In your Web page, add a hypertext link to the SMIL file. Or if the RealPix file is the only file in your presentation, simply link to that file.

    Additional Information
    RealSystem G2 Production Guide available at http://service.real.com/help/library/index.html explains the options for linking your Web page to your presentation. It also explains how to play your RealPix presentation in your Web page rather than in RealPlayer.

  8. Test the RealPix presentation by clicking the hyperlink in your Web page. This launches RealPlayer, which displays the streaming images with the properties you defined through the RealPix mark-up.

Controlling Image Size, Placement, and Aspect

In your RealPix file you define a presentation display window. When RealPlayer plays your presentation, it expands its main window to this size (or larger if your presentation contains multiple clips laid out with SMIL). To create a simple presentation such as a basic slide show, you can simply fade the images in and out of the display window. Images the same size as the presentation window appear full-size. Larger images shrink to fit the window, smaller images expand.

You may want to display just a portion of a source image, however. Or you may want to display two images side-by-side. RealPix lets you specify the area of a source image that appears in the display window. It also lets you determine the size and placement of images in the display window. To understand how this works, keep in mind the following definitions.

Source Image

An image used in your presentation. A presentation may display one source image at a time, or it may display several source images arranged in a checkerboard pattern, for instance.

Display Window

The RealPlayer window in which your presentation plays back. You set the display window size with the RealPix <head/> tag's width and height attributes.

Source rectangle

The portion of a source image you want to display. You might want to display only the top half of a source image in the display window, for example. You can think of the source rectangle as a cropped version of your source image.

Destination rectangle

The area of the display window where the source rectangle appears. Think of the destination rectangle as a separate window within the RealPlayer display window. The source and destination rectangles do not have to be the same size.

Defining Image Size and Placement

To use just a portion of a source image or the display window for an effect, you define the source or destination rectangle (or both) in a RealPix tag. To do this, you work with these attributes:

"srcx" or "dstx"

Horizontal coordinate in pixels for the left-hand corner of the source rectangle (srcx) or destination rectangle (dstx).

"srcy" or "dsty"

Vertical coordinate in pixels for the left-hand corner of the source rectangle (srcy) or destination rectangle (dsty). For example, the upper, left-hand corner of the source image is identified as srcx="0", srcy="0". The upper, left-hand corner of the destination window is identified as dstx="0", dsty="0".

"srcw" or "dstw"

Width of the source rectangle (srcw) or destination rectangle (dstw) in pixels. A width of 0 (zero) is assumed to be the source image's or destination window's default width.

"srch" or "dsth"

Height of the source rectangle (srch) or destination rectangle (dsth) in pixels. A height of 0 (zero) is assumed to be the source image's or destination window's default height.

Placement Examples

In the example below, both the source image and destination window are 256 pixels high by 256 pixels wide. The source tags make the top, left quadrant of the source image display in the destination window, effectively magnifying the source rectangle by a factor of 2. Because the destination rectangle defaults to the destination window size, no destination rectangle coordinates are needed.

Part of the Source Image Filling All of the Destination Window

In this next example, the source image displays in the top, right quadrant of the destination window, effectively reducing the size of the source image by half. No source coordinates are included, so the entire source image displays in the destination rectangle.

All of the Source Image Filling Part of the Destination Window

This last example shows a portion of the source image displayed at a slightly larger size in the display window. In this case, both source and destination coordinates are given to define the source and destination rectangles.

Part of the Source Image Filling a Part of the Destination Window

Note
A source or destination attribute defaults to 0 (zero). Zero for height or width means the source image or destination window's default height or width. You can therefore leave an attribute out to set x to "0," y to "0," w to the default width, or h to the default height.

Controlling Image Aspect

In the examples above, the source and destination rectangles all have height-to-width ratios of 1:1. This may not always be the case in your RealPix presentations. When source and destination rectangles have different height-to-width ratios, the RealPix <head/> tag's aspect attribute determines how the source image displays.

When aspect is "true", RealPix keeps a source rectangle's height-to-width ratio constant when the destination rectangle has a different ratio. For example, a source rectangle's height-to-width ratio of 1:1 stays constant even if the destination rectangle's height-to-width ratio is 2:3.

In these cases, RealPix centers the source rectangle in the destination rectangle. It scales the source and preserves its height-to-width ratio until one dimension reaches the rectangle's boundaries and the other dimension is within the boundaries. The existing background shows through any part of the destination rectangle not filled by the source rectangle.

If you turn the aspect feature off, the width-to-height ratio in the source rectangle changes as necessary to fill the destination rectangle fully. This may distort the source image. The following figure shows how a source image fills different destination rectangles when aspect is "false" or "true."

Effects of Overriding and Maintaining Image Aspect Ratios


Copyright © 1998 RealNetworks
For information on RealNetworks' technical support, click here.
Comments on this document? Click here.
This file last updated on 12/18/98 at 17:28:45.
previous next