Related Articles

Distribute Expertise: Encoding Survival Kit

Mar 1, 2008 12:00 PM, By Jan Ozer

How automated quality analysis can aid workflow efficiency for digital content producers.


         Subscribe in NewsGator Online   Subscribe in Bloglines

<i>Although it’s a bit pricey at $995, Inlet Technologies Semaphore could be a huge timesaver for encoding quality control in even moderate production environments—and a free trial is available.</i>

Although it’s a bit pricey at $995, Inlet Technologies Semaphore could be a huge timesaver for encoding quality control in even moderate production environments—and a free trial is available.

Suppose you've just encoded multiple Windows Media, Flash, or H.264 streaming files for a quality-conscious client. Call it 40 files, averaging 5 minutes each, for a total of 200 minutes of video. The bit-rate target is tight, and you're wondering how to ensure that quality is adequate — that there are no dropped frames to mar smooth playback or data spikes that might interrupt streaming over a slow connection. You'd also like a fast and easy way to ensure the files adhere to consistent parameters — using the same audio and video codec, the same bit-rate control method (variable- or constant-bit-rate encoding), and the same audio parameters.

<i>Semaphore’s main interface offers useful graphs and alert bars beneath the video window.</i>

Figure 1. Semaphore’s main interface offers useful graphs and alert bars beneath the video window.

For quality control, you could steel yourself to sit and watch 200 minutes of video, but you know that you'll drift off and perhaps miss the critical few frames with unacceptable quality or you'll glance off to check email just when frames start dropping. And how in the world would you check for data spikes playing the file back from your hard drive? Ensuring consistent encoding parameters is even tougher, because there are few tools that deliver this information.

Fortunately, there's an automated solution from Inlet Technologies that can give you the compression-quality analysis you need and more. Although it's a bit pricey at $995, Semaphore could be a huge timesaver in even moderate production environments — regardless of which encoder or encoders you pair it with — and a free trial is available.

Speeds and feeds

After the release of Semaphore 2.5 in January, Semaphore can analyze Windows Media (including VC-1), H.264, FLV, and MPEG-2 files. In the main Semaphore interface, you can analyze each file one by one or compare two at a time, or open multiple instances of Semaphore to compare even more files (I've compared as many as six at a time). Or you can run multiple files through a batch process that will provide text, XML, or HTML reports and set up alerts that warn you when your predetermined criteria are met. You can also set up a watch folder to automate the reporting process, with reports sent via email.

Irrespective of how you use Semaphore — watch folder, batch report, or in the main user interface — you can configure the program to track and set up alerts relating to quantization levels, bit rate, frame size, dropped frames, skipped frames, buffer fullness, and audio levels — which makes it easy to identify problem areas. You can also configure property reports that identify codecs used, encoding methods, and target (for CBR) and actual (for VBR) bit rates in the file.

<i>You can create alerts to identify problem areas in your file using this window.</i>

Figure 2. You can create alerts to identify problem areas in your file using this window.

The Semaphore interface

Figure 1 shows the Semaphore interface displaying a video of local guitar maker Wayne Henderson showing off the 400th guitar that he's produced. You can see two graphs below the frame; the top represents the average bit rate, which varies erratically around the 400kbps target line and frequently exceeds it.

The second graph relates to quantization level. Briefly, quantization is a measure of how much compression was required to produce a particular frame, with 1 being the least and 31 the most for Windows Media and MPEG-2, and 51 the most for H.264 and Flash. While there are no absolutes, once the quantization level exceeds 8 (for Windows Media and MPEG-2) or 25 (for AVC and Flash), blocks and other artifacts may start to appear in your video.

You can play the file in realtime or page through frame by frame (Windows Media and MPEG-2) or keyframe by keyframe (Flash and H.264). The little Current Values box on the left shows values of a number of metrics on that particular frame. For example, you can see that it's a P frame with a quantization value of 9 and that the average bit rate on that frame is .35Mbps.

Below both graphs is an audio waveform, which lets you quickly scan the audio file for clipping or inadequate audio volumes — although as you'll see in a bit, you can set alerts for both conditions. Directly beneath the video window, you can see a timeline. The regular vertical red stripes are keyframes, while the horizontal stripes are alerts that I've pre-configured and run against this file. In Figure 2, you'll see how I created them. Specifically, the red bar identifies when the quantization level exceeds 8 for more than half a second, the green bar alerts me when the data rate exceeds 400kbps for more than 2 seconds, and the orange bar tells me if and when I drop frames, which I don't in this file.

As you can see in Figure 2, you can also test for measures such as frame size, buffer fullness, and keyframe size, as well as whether audio levels exceed certain minimum or maximum levels for specified periods. You can associate a different color to each condition, so I know that when I see red, it's a quantization issue.

<i>Semaphore generates a report for each file that tells you critical file details and identifies any alerts within the file—in this case, bit-rate and quantization issues.</i>

Figure 3. Semaphore generates a report for each file that tells you critical file details and identifies any alerts within the file—in this case, bit-rate and quantization issues.

How would this work in an automated setting? I would either batch-test all my files or set up a watch folder and drop the files to be tested into that folder. Semaphore generates a report for each file that tells me critical file details and identifies any alerts within the file. You can see such a report in Figure 3. I click to open the report, see whether there are any alerts, and if there are, Semaphore tells me where they're located in the Alert Details section of the page.

Operation is extremely fast, with Semaphore ripping through 16 files with an average duration of about 6 minutes in less than 1 minute on a 3.0GHz Intel Core 2 Duo-based Dell Precision 390 workstation. Once you know there's a problem, you can load the compressed video file into Semaphore and use icons atop the program to jump directly to the alerts in the file.

Now that you know there are problems, what can you do about them? Interesting question. If you're working with Windows Media files and have Inlet Technologies Fathom encoder, you could re-encode just the offending segments to higher bit rates. However, Fathom can't perform section-by-section encoding for other codecs.

If you don't own Fathom, or another encoder that offers section-by-section encoding (and I'm not currently aware of any), you'll have to show the quality decision-maker the problem areas and let them decide whether to accept the file as is or re-encode the entire file to a higher bit rate or using different parameters or encoding tools. Whatever the response, Semaphore is clearly the most efficient mechanism for identifying and documenting potential problem areas.

<i>Semaphore lets you compare two files in the analysis timeline. Here you 
can see that the Windows Media encoder (black bit rate line) produces a much smoother bit rate than the other file, produced by a different encoding tool, with lower data spikes.</i>

Figure 4. Semaphore lets you compare two files in the analysis timeline. Here you can see that the Windows Media encoder (black bit rate line) produces a much smoother bit rate than the other file, produced by a different encoding tool, with lower data spikes.

File analysis

Beyond these alerts, Semaphore reveals a significant amount of file-related information that's critical to know — especially when you're experimenting with different encoders, encoding techniques, and encoding parameters. For example, with H.264 files, in addition to the basics mentioned above, Semaphore reveals whether you encoded using the Main or Baseline profile and whether the file contains I, B, and P frames, or just I and P. And while the QuickTime Player can provide lots of file statistics for QuickTime files and Sliq Media Technologies' excellent WMSnoop does the same for Windows Media files (and it's free at www.sliq.com), neither can batch-process or provide alerts, and I'm not aware of any tool that can usefully analyze .flv files. Note that the file-related information supplied by Semaphore varies by format and encoding tools — with lots of stats for Windows Media, H.264, and MPEG and much fewer for Flash.

As mentioned briefly above, you can also analyze two files at one time. While you can only see the video frames from one file, all graphs show both values (Figure 4) using different colors for each video. This analysis is particularly useful when experimenting with different encoders and encoding parameters, because you can compare average bit rates, file sizes, or even quantization levels for both files frame by frame. For example, in Figure 4, you can see that the file represented by the black line has fewer data spikes, and it should play more smoothly over bandwidth-constricted networks.

Again, at $995, Semaphore isn't cheap, but the free trial makes it easy to try before you buy. If you're producing even moderate volumes of streaming files, particularly for third-party clients in a service bureau environment, the tool should quickly pay for itself in time saved and better service.


To comment on this article, email the Digital Content Producer staff at feedback@digitalcontentproducer.com.

© 2008 Penton Media, Inc.

Browse Back Issues
BROWSE ISSUES
   
DCP
April 2008
Millimeter
Mar/Apr 2008
DCP
March 2008
DCP
February 2008
Millimeter
Jan/Feb 2008
DCP
January 2008
Back to Top