HLS Presets in Compressor Defective: Download New Presets Here

I was noodling around in Compressor 4’s presets, and noticed the presets for HTTP Live Streaming. “HMMM,” I thought, “I wonder if Apple chunks the files and creates the required manifest files?” (Didn’t in my tests). Then I pondered, “I wonder if Apple’s presets match their recommendations in Technical Note TN2224?” So, I opened all the presets, recorded their encoding parameters and compared them to the Tech Note. That’s when things got interesting and I found (what I think are) errors in two of the presets.

Here’s the relevant screen grab from the Tech Note:

technote.png

Here are the numbers that I compiled:

HLSpresets3.png

Some minor differences in resolution (428×240 as compared to 416×234), but no big deal. The numbers that were curious, however, are the circled ones. For example, why in the Cellular Low preset would the frame rate be 15 and the key frame interval 30? That computes to a key frame interval of two seconds, while all other presets use three seconds (45 keyframe / 15 fps = 3; 90 keyframe / 30 fps = 3). One of the tenants of encoding for adaptive streaming is to use an identical key frame interval in all files, which appears to be in error here.

Here’s the actual preset from Compressor to verify my observations.

cellular low2.png

Looking at the chart from the Tech Note, I would guess that the frame rate is supposed to be 10, which would give you a three-second key frame interval. In the Corrected Cellular Low preset that you can download below, I made that fix.

The other issue is why would Apple produce two presets, Cellular High and Cellular Low, at exactly the same data rate? Here’s the Cellular High preset from Compressor.

cellular high.png

If you look at the Description line, you’ll see that the total was intended to be 500 kbps, not 216 kbps. The obvious fix is to boost the data rate to 460 kbps for a total of 500 kbps. A bit higher than the 400 kbps in the Tech Note, but better than the original preset. However, at 460 kbps for a 428×240@15 fps file, you get a rediculously high bits-per-pixel value of .299, which is probably why the equivalent preset in the Tech Note was encoded at 29.97 fps. So, in the Corrected Cellular High preset you can download below, I changed the data rate to 456 kbps and the frame rate to 29.97.

To use the presets, download them and drag them into the Custom folder in Compressor’s Settings window. If you’re encoding for adaptive streaming, substitute these for the presets that Apple provided.

About Jan Ozer

Avatar photo
I help companies train new technical hires in streaming media-related positions; I also help companies optimize their codec selections and encoding stacks and evaluate new encoders and codecs. I am a contributing editor to Streaming Media Magazine, writing about codecs and encoding tools. I have written multiple authoritative books on video encoding, including Video Encoding by the Numbers: Eliminate the Guesswork from your Streaming Video (https://amzn.to/3kV6R1j) and Learn to Produce Video with FFmpeg: In Thirty Minutes or Less (https://amzn.to/3ZJih7e). I have multiple courses relating to streaming media production, all available at https://bit.ly/slc_courses. I currently work as www.netint.com as a Senior Director in Marketing.

Check Also

Steve Strong Details Norsk's Suitability for Broadcasters

Norsk for Broadcasters: Interview with id3as’ Steve Strong

Recently, I spoke with Steve Strong, id3as’ co-founder and director, about Norsk’s suitability for broadcasters. …

Five star review for video quality metrics course.

New Five Star Review for Video Quality Metrics Course

The Computing and Using Video Quality Metrics course teaches encoding pro to compute and use video metrics like VMAF, PSNR, and SSIM.

Figure shows the different components to live streaming latency.

The Quality Cost of Low-Latency Transcoding

While low-latency transcoding sounds desirable, low-latency transcode settings can reduce quality and may not noticeably …

Leave a Reply

Your email address will not be published. Required fields are marked *