-->
Save your seat for Streaming Media NYC this May. Register Now!

Media Cleaner Pro: Batch Processing and Productivity Tips for Compression

Workflow is a key element to a streaming media production environment. This tutorial will focus on using Media Cleaner Pro as part of your overall streaming media production. The software only works for producing Video-on-Demand (VOD) content, as it's not a real-time processing tool. Many applications and producers of VOD can benefit from the advanced preprocessing and compression techniques built into MCP. This part of the tutorial focuses on the following topics:

  1. Source File Formats
  2. Test Procedures and Best Practices
  3. Batch Processing
  4. Output File Options

1. Source File Formats.

As mentioned in Part I of this tutorial, it's vital to start with the highest quality source material possible. Remember, "Garbage In, Garbage Out." Uncompressed video is great, but if it's not within your budget, a quality video capture system based on Motion JPEG (M-JPEG), DV or some proprietary format will work well. These systems do allow a degree of lossy video compression as it's captured, but as long as your compression ratio is low, acceptable results are achievable.

When choosing a capture system, keep the output formats in mind. Media Cleaner Pro can accept standard AVI or QuickTime files, but you will need to run MCP on the same computer as your capture hardware while using a proprietary codec for capturing. This means tying up your system while compressing, which won't be productive in the long run.

Because of the emphasis on advanced signal processing, it's important to feed MCP the highest resolution video and audio you can store. Capturing at full screen, 30 fps, allows you to perform optimal cropping and scaling techniques in MCP. And keeping your audio at CD quality (44 KHz, 16-bit, stereo) allows MCP to apply all audio preprocessing and down-sampling prior to compression. You should also archive your high-quality captured video and audio in digital form -- in case you need to re-purpose it with emerging compression technologies.

2. Test Procedures and Best Practices.

Another common adage in compression is "test early, test often." This is especially true in streaming media, which is dependent on real-world, congested networks for delivery.

You'll need a systematic way to keep track of settings and results during compression testing. Media Cleaner Pro allows you to customize settings using the New, Save, and Rename buttons within the Advanced Settings Window (as shown in Figure 1). You can use the Revert function to return to the original (prior to saving) and delete when your Settings Folders become inundated.


Figure 1. New settings files can be created using the Advanced Settings commands New, Save As, and Rename.

When creating a new settings file, MCP requires you to name it and select the folder for storage (as shown in Figure 2). All templates are stored in Settings Folders within the MCP folder on you hard drive. You can also create a new folder in this directory, which will appear in the Media Cleaner Settings directory structure or pull-down (as shown in Figure 2).


Figure 2. MCP stores settings files in folders, chosen using a) the Windows directory tree or b) the pull-down menu on the Mac.

Altering one parameter at a time is the best practice for testing compression. It's also important to use long setting names -- and thank goodness you're not stuck in the DOS world of 8.3 filenames! You can edit your Preferences and select "Append Setting to File Name" to keep track of variations between each output file. We'll cover detailed testing explanations in the next few sections to help you achieve efficient results for your compression testing.

Testing Your Audio Preprocessing

The audio filtering options, described in Part I of this tutorial, can be time consuming -- even with today's CPUs. If you want to experiment, it's best to find a few short audio samples representative of typical content you need to compress. First, preprocess the samples by selecting the "None" codec and choose the sample rate (in KHz) and bit depth of your final target stream. After running a series of tests using various filter combinations, select the best preprocessing setting and redo with the compression settings to ensure it hasn't introduced any distortions or artifacts.

Testing Your Video Preprocessing

Video preprocessing and testing is a bit more complicated because of the interactions between filtering and codecs. If you are providing video at 320x240 for broadband, perform all scaling at capture time or within MCP without compression. You'll want your scaling parameters to be simple integers. Changing frame rates will cause the codec to drop frames, resulting in jerky motion if not done evenly. Since these interim files require more storage, decide whether this extra expense is worth the time-saving you may achieve.

Image parameters such as brightness, contrast, and gamma control are easily tested using MCP's Dynamic Preview feature. Open the source by double clicking its name or icon in the Process Window, or by selecting "Source" in the Windows pull-down menu. You can scrub through the video to select a few representative frames to test. As you make adjustments to the settings, use the Go to Time or Go To Frame items in the Edit Menu to easily switch between them.

The Dynamic Preview window (as shown in Figure 3), is also chosen from the Windows pull-down. The A/B slider and Process check boxes determine the part of the image to be processed. When you alter the settings, Ctrl-D updates the window. The Compress checkbox allows you to view the results even after compression and is only active when MCP can display the compressed formats internally. Note: This is currently not available for Real G2 or Windows Media Video.


Figure 3. The Dynamic Preview window allows the user to see the effect of image processing parameters on their source, either beforeor after compression.

The Dynamic Preview window displays only single keyframes in your compressed movie, which is sometimes not a good indicator of overall appearance. In order to test motion clips, open the source window and select in and out points for processing from the Edit pull-down menu (or by using the keyboard short-cuts listed there). You can also clear the in/out points in this pull-down. You can monitor the Output window during the compression process to study the before and after effects of your settings.

3. Batch Processing

The Process window (shown in Figure 4) is command central for batch processing. Media Cleaner Pro launches with the last batch created. Start a New Batch by using the command under the File menu, (also shown in Figure 4). You can always save your batch to a new file -- usually stored in the Media Cleaner Pro folder on your hard drive.


Figure 4. The Process window in MCP is command central for running batches and testing compression settings.

Add source files to your batch by dragging them into the Process window, or use the Add to Batch command in the File pull-down (see Figure 4). You can also drop folders or volumes into this window to process multiple files at once. Sources are identified by using the Icon view, chosen from the pull-down on the bottom left of the window.

If you want to control the process order, set priorities to each entry using the List View. Clicking on an entry's Priority number will display the check-list (as shown in Figure 5). Note: Lower numbers have higher priority.


Figure 5. Priorities can be assigned to entries in the Process window to control what order they are processed.

You can also sort the batch by Priority, Alphabetical order, or Status, by clicking on the associated column heading in the Process window. If all priorities are equal, MCP will process the batch from top to bottom.

Media Cleaner Pro allows you to set the destination of your processed files under the Process pull-down menu. If you are only processing one file, it will require a destination when initiating compression. After running your first batch process, it will default to the previous destination folder unless you choose the Specify Destination command. MCP will never overwrite files, but rather appends a version number in the form 01, 02, etc., to the output file name. Note: It's wise to rename these versions with more descriptive names after running each batch.

In your streaming media production environment, there will be times when you cannot tweak every parameter exactly for every source and output format you need to encode. If you have large volumes of content, it's best to settle on standard settings based on your target bit rates and the type of content you are serving. If you hit quality control issues on certain clips, go back and adjust the parameters based on the experience you've acquired during your pre-testing research.

When content starts rolling in, the batch processing features of MCP become your best friends. If you have multiple source files, highlight the various entries in the Process window by holding down the control key (shift key on Macs) as you click on them. Next, double click on one of the entry's Settings windows or use the Advanced Settings command in the Windows pull-down. After selecting a setting and clicking Apply, MCP will assign the setting to every highlighted entry in the Process window.

You may also want to offer your audience different bit rates to choose from without having to deliver SureStreams or Intellistreams (as discussed in Part 2 of this tutorial). This requires different settings for the same source


Figure 6. Customized settings files can be created with different bit rates for more efficient encoding in the production environment.

The steps to do this are as follows:

  1. Create new settings files such as the ones shown in Figure 6 in the Windows Media - WWW folder.
  2. Add one or more sources to your batch in the Process Window
  3. Select the Settings entry on one source to open the Advanced Settings window.
  4. If you are running Windows, select multiple settings by holding down the "Ctrl" key as you click on the desired files listed (see Figure 6). You can unselect a setting by clicking on the name again while still holding down the "Ctrl" key.(OR on the Mac you can use the Shift or Command keys in the same manner).
  5. Hit the Apply button in the Advanced Settings window and MCP will make multiple entries for each source with the different settings applied.

4. Output File Options.

The three major streaming media formats have standard file suffixes and auxiliary files necessary for true streaming. These, as well as the html code necessary for your web page, can all be generated in Media Cleaner Pro. This section will discuss details for output options across the three formats covered herein.

QuickTime Output Options.

The special features of a QuickTime file format are shown in Figure 7. The file suffix associated with your media is .mov on most clients. You can also add Movie Information to the header and compress it for faster downloading. The special html tags in MCP, associated with your movie, can also be created in this panel (see Figure 7).


Figure 7. Special features of the QuickTime format are shown in the Output panel when this format is chosen for encoding.

Poster Frame is a unique QuickTime feature in MCP, created by checking this option in the Output panel. To select a particular frame, open the Source window and click on the "Set Output Movie Poster Frame" command in the Edit menu. Poster frames are stored as a single frame in a separate movie file with "_PSTR" appended to its name. This feature is useful to provide your audience with a preview of the media prior to streaming or downloading

On the server side, there are several output options you can choose from as well. If you are delivering a true streaming media format from a QuickTime Streaming Server (or Real Server now as well), use the Hints button under the Prepare for Streaming Server option (see Figure 7). You can also set the Server Path and override the default Preferences at the bottom of this panel.

RealVideo Output Options.

RealMedia doesn't posses as many features as the QuickTime format, but the standard ones are available under the Output panel (shown in Figure 8). You can select the movie file suffix, which defaults to .rm and create the .ram file for reference from a RealServer. You can enter Movie Information into the header (as in QuickTime), but there is no option to compress the information. MCP will also create html code to put the movie on your web page. Please refer to the RealMedia documentation for up-to-date information on the other output options (listed in Figure 8).


Figure 8. Output features of RealMedia files.

Windows Media Output Options.

There are even less features built into the Windows Media format (as listed in Figure 9). The file suffixes associated with this format are .asf for the media files and .asx for the reference file (metafile), which MCP can create for you. Just as in Real and QuickTime, Movie Information can be added to the header and html code can be generated using the checkboxes shown in Figure 9.


Figure 9. Output features of Windows Media files.

Wrapping Up

As you can see, the features of Media Cleaner Pro will significantly increase productivity as you integrate streaming media into your own site and/or that of your customers. The application can take some of the guess-work out of the complex process of encoding media, as discussed in Parts I and II of this tutorial. By gaining experience in this field, you will also learn to quickly spot and adjust for compression artifacts likely to crop up in your encoding productions.

Streaming Covers
Free
for qualified subscribers
Subscribe Now Current Issue Past Issues