John Gonzalez

When to Choose High, Main, and Baseline While Encoding H.264
By John Gonzalez

Many current and forthcoming LEIGHTRONIX products with H.264 encoding provide the ability for users to choose the video profile that best suits a given stream. In other words, these products allow users to choose between High, Main, and Baseline H.264 encoding compression capabilities. An H.264 profile more or less defines which bells and whistles the encoder will use when compressing your video, and helps to ensure that your target audience’s playback devices will be able to display your video.

Not having a clear understanding of what these options mean before opting for one video profile over another during an event could have negative consequences on the success of your stream. For instance, choosing the wrong H.264 profile could mean that not all of your viewers will be able to see the stream on their mobile devices, you exceed your network’s bandwidth allotment and bring the broadcast or stream to a halt, or the output isn’t displayed in the quality you had hoped.

In this post, I’ll provide a few things you should consider when broadcasting or streaming an event and offer advice within each category on which profile you should choose to help you get what you’re looking for out of the encoded video stream.

H.264 Profiles

Playback Devices Your Viewers Are Using:

When choosing an H.264 profile, the main thing to consider is the devices your viewers will be using to decode your stream. The decoders provided with the IncodeX One™ Point-to-Point solution support High profile, so LEIGHTRONIX recommends this profile setting for use with this solution’s included decoder. In the case of our live internet streaming solutions however, many mobile devices and older and/or less powerful computers attempting to view your stream are only able to decode streams encoded with the Baseline profile. So if you were looking to provide viewers with access to a live stream of an event on the widest range of mobile devices, using Baseline profile would be the best option.

Why is this? Generally, Baseline profile restricts the encoder to certain basic features only. That’s why videos encoded with the Baseline profile can be easily played back or decoded, even on devices with lower computational power, such as smartphones. Android phones, for example, only play video encoded with the baseline profile according to Google’s specification.

Main profile works for some modern smartphones and tablets but doesn’t provide the ability to guarantee viewership on as large of a range of smartphones and tablets as the Baseline profile would.

In summary:

High Profile—Best for big screens with a good decoder
Main —Good for more modern smartphones and tablets
Baseline—Compatible with most smartphones and tablets, including older mobiles

Image Quality You’re Looking to Deliver:

Another consideration is the type of image quality you’re aiming to provide your viewers. High profile will offer the highest quality video stream. As you might guess, the higher-level profiles use more complex encoding algorithms and will produce better quality video at an equivalent transfer rate. So, Main and High profiles deliver better quality video than Baseline profile. The catch is, as you use these more complex encoding techniques, the stream becomes more difficult to decode, ultimately making it harder and in some cases impossible to display on older smartphones and tablets. Furthermore, a High profile stream may not play smoothly on older, slower computers.

The trade-off here is better quality for a stream that is harder to decode.

Amount of Bandwidth That You Have Available:

Baseline profile uses the fewest compression features while High profile offers the highest quality video stream at an equivalent transfer rate. For example, B Frames are only allowed in Main profile and above. They can be used to save on bandwidth, but are harder to decode, which is why some devices, as discussed earlier, might not support them.

So in short, Baseline profile is easier to decode, but Main and High profiles offer better compression and therefore use less bandwidth to achieve the same quality stream.

When Considering Devices, Image Quality, and Bandwidth:

In closing, when producing H.264 video, the general rule is to use the maximum profile supported by the target playback platform, since that delivers the best quality at any given data rate. Keeping all three of these considerations in mind when preparing for an event, you’ll be able to provide the best quality video directly to your intended audiences and all of their viewing devices.

For one last point, I highly recommend getting in the habit of testing your encoding settings prior to the start of your event. Make sure that you’re testing during a time that mirrors any network activity you predict during the time of your scheduled stream to ensure an accurate test. During your test, make sure that all of the devices you’d like to be able to access the broadcast or stream are able to display them. Test to be sure that your image quality is what you had hoped it would be on each of those devices. Testing early allows for time to make adjustments and perfect your output settings, making sure you’re ready to go at the start of the main event.

John manages the daily operations of the LEIGHTRONIX Technical Support team and coordinates software and firmware testing and releases. He also troubleshoots analog and digital video systems, provides software support, and handles TCP/IP networking.

Want regular LEIGHTRONIX updates sent directly to your inbox? Sign up and never miss out on new blog posts, videos, and special announcements!