Why is H.265 not the future? The past, present and future of internet video compression


H.264 aka AVC (Advanced Video Coding) and H.265 aka HEVC ( High Efficiency Video Coding) are both video compression standards, which are used to reduce the bandwidth and storage space requirement for streaming and video storage. 

Video compression achieves this by taking advantage of redundancies and perceptual limitations in video data. For example, if parts of an image don’t change from one frame to the next, a video codec can just encode the differences rather than encoding each frame in full. 

Similarly, if there are details that the human eye can’t easily perceive, the codec can encode those details with lower fidelity to save data. Through techniques like these, video codecs can achieve substantial reductions in data usage while still delivering good visual quality.

The Past

There were many proprietary codecs before H.264, from RealVideo, Intel, Microsoft and MPEG (Moving Picture Experts Group). MPEG2 compression was popular during storage in the DVD age. MPEG 4 became widely used as internet streaming and usage of p2p video sharing became more popular. Remember Divx?

The H.264/AVC project was started by the ITU-T Video Coding Experts Group (VCEG) in conjunction with the MPEG. The goal was to create a standard that provided good video quality at substantially lower bit rates than previous standards (such as MPEG-2), without increasing the complexity of design so much that it would be impractical or excessively expensive to implement.

The development of H.265/HEVC was a collaboration between the ITU-T and the MPEG. The goal was to create a new standard that could provide significantly improved compression efficiency over earlier standards, particularly for higher resolution video content such as 1080p and 4K.

Present

The initial version of the H.264 was released in May 2003 by the Joint Video Team (JVT), VCEG and MPEG. It provides good video quality and efficient compression, which has made it a popular choice for a wide range of applications, from streaming video on the web to HD broadcasts on cable and satellite TV. 

The first version of H.265 was completed in April 2013. This was known as HEVC Version 1 and covered video resolutions up to 8K UHD offers more efficient compression than H.264. 

One of its main advantages of H.264 today is its broad compatibility; almost all modern devices and browsers support H.264. H.265 can deliver similar video quality at about half the bitrate, or significantly better quality at the same bitrate compared to H.264. 

This makes it a great choice for 4K video and other high-resolution formats. However, it also requires more processing power to encode and decode, which means it is not widely supported by older devices due to computing and power trade offs. 

Adoption

Over the years, H.264 has been widely adopted in a range of applications. It is used in Blu-ray Discs, internet video streaming platforms (like YouTube and Netflix), web software such as the Adobe Flash Player and Microsoft Silverlight, broadcast and satellite television services, and in video conferencing solutions.

H.265/HEVC has been adopted in various applications where its increased coding efficiency can provide substantial benefits. These include 4K UHD video services, video streaming platforms like Netflix, digital storage media like Ultra HD Blu-Ray, and video conferencing tools. However, its adoption has been somewhat hampered by patent licensing issues, with different entities owning parts of the patent pool.

Browser Support

AVC (H.264)HEVC (H.265)

Source https://caniuse.com/hevc

Licensing

MPEG LA’s AVC Patent Portfolio License does not charge royalties for AVC video that is sold to end-users for a fee as digital content that is downloaded (either permanently or temporarily), streamed, or otherwise delivered. For Internet broadcast of AVC video that is free to end-users (e.g., YouTube, streaming websites), the license is also royalty-free. 

HEVC incurs patent licensing fees, which can be a concern for some use cases. Firefox still does not support it for this reason. Apple however has been pushing for HEVC all the way in both Mac and mobile devices such as iPhone and iPads.

Testing

Using Handbrake we re-encoded a 20 second long video sample file originally encoded with MJPEG. 

Most professional cameras use MJEPG to compress each frame to save space while retaining high fidelity video for further processing. The result is pretty conclusive.

Input file:
Stream 0
Codec: H264 – MPEG-4 AVC (part 10) (avc1)
Video resolution: 1920×1080
Frame rate: 24
Color space: ITU-R BT.709 Range

FilenameSizeCodecSpace SavingsTime
autumn-sunset.mjpeg.mov253MMJPEG
autumn-sunset.mpeg4.m4v53MMPEG-468%11s
autumn-sunset.h254.m4v31MH.26488%8s
autumn-sunset.h265.m4v30MH.26589%16s

Can you notice any difference in visual picture quality? Although there is not much motion between frames in this video.

Analysis

The Future

Work has been ongoing on further video coding standards, like H.266/Versatile Video Coding (VVC), which was finalized in 2020 and aims to again substantially improve coding efficiency.

Meet AV1

As an alternative AV1 “AOMedia Video 1”, it is being developed by the Alliance for Open Media (AOMedia), a consortium of Google, Microsoft, Mozilla, Netflix, Amazon, Intel, and Cisco. It is an open, royalty-free video coding format designed for video transmissions over the Internet. 

The main objective of AV1 is to be efficient and flexible for use over a wide range of applications on the internet, including both low and high bit rates, low and high latency, as well as still and moving images. It is especially well-suited for streaming video content over the internet due to its efficient compression algorithms, which can deliver high-quality video with lower data usage.

Compared to its contemporary, H.265/HEVC, AV1 aims to provide similar if not better levels of compression efficiency, but without the associated patent licensing costs that come with H.265. This has been a major selling point for the adoption of AV1.

However Apple Devices do not support AV1 codec despite Apple being a member of the alliance. This is a major barrier for adoption of AV1. Microsoft, the contender, follows Apple’s suit with their Google Chrome forked browser called Edge.

H.265/HEVC is offering advantages over H.264 in terms of compression efficiency, especially for high-resolution content. If compatibility and reach are most important, H.264 may be the better choice. If maximizing video quality while minimizing bandwidth usage is the goal, and the target devices and platforms support it, then H.265 may be preferable. It’s also worth noting that there are other codecs like VP9 and AV1 to consider, each with its own advantages and trade-offs.

At CircleHD Enterprise Video Platform, we encode all videos with H.264 for wider compatibility across devices and browsers. We do support H.265 for specific use cases and optimizations but not solely depend on it yet. We are hopeful as standards evolve AV1 or AV2 might become one open standard free from royalties to move the industry forward.

CircleHD has been a pioneer in transforming corporate communications using a powerful video content management system and deploying user friendly Company TV. You can also check out this related article which gives information on calculating video file size accurately. If you’d like to learn more about how CircleHD’s Enterprise Video Learning platform can help improve your company’s productivity,  we’d love to chat


Screen Recording on Apple Macbook


Screen recording has become increasingly popular due to its wide range of applications and benefits. Here are some key reasons why individuals and professionals choose to record their screens:

Tutorials and Training: Screen recording is an effective way to create instructional videos and tutorials. Whether you want to teach someone how to use a software program, demonstrate a process, or provide step-by-step instructions, recording your screen allows you to visually guide viewers, making it easier for them to understand and follow along.

Content Creation: Screen recording is valuable for content creators, such as YouTubers and online educators. It enables them to produce engaging videos by showcasing software reviews, gameplay, design processes, presentations, and more. Screen recording helps capture on-screen actions, making it easier to convey information or share knowledge with their audience.

Apple Mac computers include Macbook Pro, MacBook Air and MacMini come with powerful built-in tools that make screen recording a seamless experience. In this article, we will walk you through the process of screen recording on an Apple Mac M1 using the built-in tools.

Meet QuickTime, the media player for Apple Mac.

Quick time also serves as a versatile screen recording tool. With its user-friendly interface and built-in functionality, QuickTime allows you to capture your screen effortlessly. In this guide, we will walk you through the step-by-step process of screen recording on an Apple Mac using QuickTime.

Step 1: Launching QuickTime Player

To begin, locate and open the QuickTime Player application on your Mac. You can find it in the “Applications” folder or use the Spotlight search (press Command + Space and type “QuickTime Player”).

Step 2: Accessing the Screen Recording Feature

Once QuickTime Player is open, click on “File” in the menu bar at the top of the screen. From the drop-down menu, select “New Screen Recording.” You can also use the keyboard shortcut Command + Control + N.

Step 3: Configuring Recording Settings

A small screen recording window will appear on your screen. Before you start recording, you can configure some settings. Click on the small arrow next to the red record button to access options like choosing a microphone for audio recording, showing mouse clicks, and selecting a portion of the screen to record. Adjust these settings according to your preferences.

Step 4: Initiating the Screen Recording

Once you have configured the recording settings, you can start the screen recording. Click on the red record button in the screen recording window to begin. You may also choose to record the entire screen or drag the cursor to select a specific area to record.

Step 5: Capturing Your Screen

After clicking the record button, QuickTime Player will start capturing your screen activities. You can navigate to the application, window, or screen you want to record. The recording will capture everything within the selected area or the entire screen, depending on your choice.

Step 6: Controlling and Stopping the Recording

While recording, a small recording control bar will appear at the top of the screen. You can use this control bar to pause, resume, or stop the recording. To stop the recording, click on the square stop button in the control bar. You can also use the keyboard shortcut Command + Control + Esc to stop the recording.

Step 7: Saving and Exporting the Recording

Once you stop the recording, QuickTime Player will automatically open the recorded video in a new window. To save the recording, go to “File” in the menu bar and choose “Save.” You can then select the destination folder and provide a name for the recording. Additionally, QuickTime Player offers options to trim, edit, or export the recorded video in different formats if desired.

Screen recording on an Apple Mac using QuickTime Player is a simple and efficient process. By following the step-by-step instructions outlined in this guide, you can easily capture and save your screen activities for various purposes, such as creating tutorials, recording presentations, or documenting software processes. QuickTime’s intuitive interface and built-in functionality make it a valuable tool for screen recording on your Apple Mac.

Alternatives to Quicktime for Screen Recording

While QuickTime Player provides basic screen recording capabilities on a Mac, there are several alternative third-party applications that offer more advanced features and customization options. Here are some popular screen recording alternatives for Mac:

OBS Studio: 

OBS Studio (Open Broadcaster Software) is a free and open-source screen recording and streaming software. It offers extensive customization options, multiple audio and video sources, scene transitions, and real-time editing capabilities. OBS Studio is widely used by gamers, content creators, and professionals.

ScreenFlow: 

ScreenFlow is a comprehensive screen recording and video editing software designed specifically for Mac. It offers a user-friendly interface, advanced editing features, including annotations, transitions, and effects, and the ability to record both the screen and webcam simultaneously. ScreenFlow is popular among educators, presenters, and video creators.

Camtasia: 

Camtasia is a well-known screen recording and video editing tool available for both Mac and Windows. It provides a range of features such as screen recording, video editing, annotations, transitions, and effects. Camtasia offers a straightforward interface and is often used by professionals for creating high-quality tutorials and presentations.

Snagit: 

Snagit is a versatile screen capture and recording software for Mac. It allows you to capture screenshots, record videos, add annotations, and easily share your captures. Snagit is known for its simplicity and is suitable for quick screen recording tasks or capturing specific elements on the screen.

Capto: 

Capto is a screen recording and video editing tool designed specifically for Mac. It offers a range of features, including screen recording, video and image annotation, and basic editing capabilities. Capto is popular among Mac users who require a lightweight and intuitive screen recording solution.

Movavi Screen Recorder: 

Movavi Screen Recorder is a feature-rich screen recording software for Mac. It provides options to capture screen activity, record audio, capture webcam footage, and edit recordings with built-in editing tools. Movavi Screen Recorder is known for its user-friendly interface and wide range of recording and editing features.

When choosing a screen recording tool for your Mac, consider your specific needs, such as desired features, ease of use, editing capabilities, and budget. These alternatives offer a variety of options to cater to different requirements and workflows, allowing you to find the ideal screen recording solution for your Mac.

CircleHD has been a pioneer in transforming corporate communications using a powerful video content management system and deploying user friendly Company TV. If you’d like to learn more about how CircleHD’s Enterprise Video Learning platform can help improve your productivity,  we’d love to chat


Screen Recording on Windows with Native Recording Tools and alternatives. A Step-by-Step Guide.


Screen recording is an essential feature for many individuals and professionals alike, allowing them to capture and share their activities on a computer screen. Fortunately, Microsoft Windows operating systems offer built-in tools that make screen recording a breeze. In this article, we will walk you through the process of screen recording on Windows.

Windows (XBOX) 10 Game Bar: the built-in windows screen recording tool.

Windows 10 and Windows 11 come with a feature called the Game Bar aka XBOX Game Bar, which includes a screen recording tool. To access it, simply press the “Windows key” and “G” key simultaneously on your keyboard. A small Game Bar overlay will appear on your screen.

Step 1: Configuring Recording Settings

In the Game Bar overlay, you’ll see a variety of options. Before you start recording, it’s important to configure your recording settings. Click on the “Settings” icon (a gear-shaped icon) to access the Game Bar settings. Here, you can specify the audio source for recording (system audio, microphone, or both) and toggle features such as recording timer, microphone audio, and more. Adjust these settings according to your preferences.

Step 2: Initiating Screen Recording

Once you have configured your settings, you’re ready to start recording. Return to the Game Bar overlay and click on the “Capture” button (a circular icon with a dot inside). Alternatively, you can press the “Windows key,” “Alt” key, and “R” key simultaneously on your keyboard to start recording instantly.

Step 3: Capturing Your Screen

After initiating the recording, the Game Bar overlay will disappear, indicating that the screen recording has begun. You can now navigate to the application, window, or screen that you want to capture. It’s worth noting that the Game Bar only captures full-screen or windowed applications, and it does not record the desktop or File Explorer.

Step 4: Controlling and Stopping the Recording

While recording, you can control the recording process through the Game Bar overlay. You’ll see a small toolbar at the top of your screen with options to pause, resume, and stop the recording. You can also access these controls by pressing the “Windows key,” “Alt” key, and “R” key simultaneously on your keyboard. If you prefer using your mouse, move your cursor to the top-center of the screen to display the toolbar.

Step 5: Reviewing and Saving the Recording

Once you’ve finished recording, click on the “Stop” button in the Game Bar overlay or press the “Windows key,” “Alt” key, and “R” key simultaneously on your keyboard. Windows will then save the recording to your designated “Videos” folder, specifically in the “Captures” subfolder. You can access this folder by navigating to “This PC” or “File Explorer” and selecting “Videos” from the sidebar.

Alternatives to Gamebar for screen recording on Windows

Screen recording on Windows using the game bar is a straightforward process. By following the steps outlined in this guide, you can effortlessly capture and share your screen activities for various purposes, whether it’s creating tutorials, recording gameplay, or demonstrating software functionality. While the native screen recording tools in Windows offer a convenient way to capture your screen, there are also several alternative third-party applications available that provide additional features and customization options. Here are some popular alternatives to consider:

OBS Studio: 

OBS Studio (Open Broadcaster Software) is a free and open-source screen recording and streaming software. It offers advanced features such as customizable overlays, scene transitions, and audio mixing. OBS Studio is highly flexible and widely used by gamers, content creators, and professionals.

Camtasia: 

Camtasia is a comprehensive screen recording and video editing software. It provides an intuitive user interface, powerful editing tools, and features like annotations, effects, and transitions. Camtasia is popular among professionals who require advanced editing capabilities and polished final videos.

Bandicam: 

Bandicam is a lightweight screen recording software that offers high-quality video capture. It supports real-time drawing and mouse effects, and it allows you to record specific areas of the screen or the entire screen. Bandicam is known for its minimal impact on system performance.

Snagit: 

Snagit is a screen capture and recording tool with a focus on simplicity and ease of use. It allows you to capture screenshots, record videos, and add annotations and effects. Snagit is particularly useful for quickly capturing and sharing visual content.

ShareX: 

ShareX is an open-source screen capture and recording tool with extensive customization options. It supports multiple capture modes, including full screen, window, region, and scrolling capture. ShareX also offers various annotation and sharing features.

XSplit Gamecaster: 

XSplit Gamecaster is a screen recording and streaming tool designed specifically for gamers. It provides features like in-game overlays, live chat integration, and easy streaming to popular platforms like Twitch and YouTube. XSplit Gamecaster offers a user-friendly interface and real-time video editing capabilities.

Give these tools a try and compare the features and functionalities of these alternative tools to find the one that best suits your specific needs and preferences. Whether you require advanced editing options, streaming capabilities, or simplicity, these alternatives can enhance your screen recording experience beyond the native Windows tools.

CircleHD has been a pioneer in transforming corporate communications using a powerful video content management system and deploying user friendly Company TV. If you’d like to learn more about how CircleHD’s Enterprise Video Learning platform can help improve your productivity,  we’d love to chat


Secure Live Streaming and Enterprise Webinars for Employee and Internal Use


In today’s fast-paced, digital world, staying connected and informed is essential for the success of any organization. Enterprise live streaming and webinars offer a powerful, interactive way for businesses to engage with their employees, streamline communication, and enhance collaboration. 

By leveraging Live streaming and Enterprise Webinar for internal use, companies can harness the benefits of modern technology to foster a more connected and productive workforce. In this article, we will explore the use cases and benefits.

Use Cases:

Training and Onboarding

One of the most common use cases for enterprise live streaming and webinars is for training and onboarding new employees. These platforms offer a convenient, cost-effective, and efficient way to deliver training content to employees, regardless of their physical location. Live streaming enables trainers to conduct real-time sessions, while webinars provide an opportunity for employees to revisit the content at a later date, ensuring everyone has access to the same information.

Company Announcements and Updates

Keeping employees up to date on company news and developments is crucial for maintaining a strong corporate culture. Live streaming and webinars offer a platform for executives and managers to deliver important announcements, share updates, and discuss changes in the company’s strategy, all while engaging with employees through Q&A sessions and interactive polls.

Virtual Town Hall Meetings

Town hall meetings are a valuable way for employees to voice their concerns, ask questions, and discuss ideas with company leadership. By hosting virtual town hall meetings through live streaming and webinars, companies can ensure that all employees have an opportunity to participate and engage with the leadership team, regardless of their location.

Collaboration and Team Building

Live streaming and webinars can also be used to promote collaboration and team building among remote or distributed teams. By hosting virtual workshops, brainstorming sessions, or project updates, employees can work together and build rapport, even when they’re not physically in the same location.

Benefits:

Cost Savings

One of the most significant benefits of using live streaming and webinars for internal communication is the cost savings. With no need to cover travel, accommodation, or venue expenses, companies can allocate resources to other areas of their business.

Increased Employee Engagement

Live streaming and webinars promote a culture of open communication, giving employees the opportunity to actively engage with company leadership and their peers. This increased engagement can lead to higher job satisfaction, improved morale, and better overall retention rates.

Time Efficiency

By delivering content through live streaming and webinars, companies can ensure that employees receive the necessary information in a timely manner. This can help streamline workflows and reduce time spent on redundant meetings and presentations.

Scalability and Flexibility

Enterprise live streaming and webinars offer a scalable and flexible solution for organizations of all sizes. As a company grows, it can easily expand its streaming capabilities to accommodate more viewers and cover additional topics, ensuring that all employees remain informed and engaged.

Security

In an era where data breaches and cybersecurity threats are on the rise, ensuring secure enterprise live streaming is crucial for protecting sensitive company information and maintaining the privacy of employee communications. In this article, we will explore the best practices and key considerations for implementing a secure live streaming solution, exclusively for employees within your organization.

Also keep in mind that security comes in layers. Implement one or more of the following techniques discussed below to secure your internal broadcast from prying eyes.  

Choose a Secure Live Streaming Platform

When selecting an enterprise live streaming platform, prioritize security features and ensure that the provider has a solid reputation for protecting user data. Look for platforms that offer end-to-end encryption, password protection, and single sign-on (SSO) integration with your company’s existing identity management system.

Use a VPN or Private Network

To ensure the privacy of your live streaming sessions, use a virtual private network (VPN) or a private network to encrypt your internet connection. This will help prevent unauthorized access and protect sensitive data transmitted during the live stream.

Implement Access Control

Restrict access to your live streaming events by implementing access control measures. This can include using unique access codes, requiring user authentication, or integrating with your organization’s SSO system. Access control measures help ensure that only authorized employees can view the live stream.

Utilize Password Protection

Password-protecting your live streaming events adds an additional layer of security. Require employees to enter a secure, unique password before gaining access to the live stream. Update passwords regularly to minimize the risk of unauthorized access.

Monitor and Moderate the Live Stream

Assign moderators to monitor the live stream, ensuring that only appropriate content is shared and that employees adhere to your organization’s guidelines for conduct. Moderators can also help manage interactive features, such as Q&A sessions and chat rooms, to prevent the sharing of sensitive information.

Implement Secure Storage for Recorded Sessions

If you plan to record live streaming sessions for later viewing, ensure that the recorded content is securely stored. Use encrypted storage solutions and restrict access to the recordings using the same access control measures implemented for live events.

Train Employees on Security Best Practices

Educate your employees about the importance of maintaining security during live streaming events. Provide them with guidelines on secure login practices, password management, and how to report suspicious activity or potential security threats.

Regularly Review and Update Security Measures

Continuously evaluate your live streaming security measures and update them as needed to stay ahead of emerging threats. Conduct regular security audits and stay informed about the latest developments in cybersecurity to ensure your organization is protected.

As organizations continue to adapt to the evolving landscape of remote and distributed work, enterprise live streaming and webinars offer a reliable solution for maintaining strong internal communication and fostering employee engagement. By leveraging these tools, companies can enhance collaboration, increase efficiency, and ultimately drive success in today’s competitive business environment.

Secure enterprise live streaming is essential for maintaining the privacy and confidentiality of employee communications. By implementing strong security measures and best practices, organizations can reap the benefits of live streaming while safeguarding sensitive data and protecting employee privacy. With the right combination of technology and security protocols, companies can confidently leverage live streaming as a powerful tool for communication and collaboration within their workforce.

If you’d like to learn more about how CircleHD’s Enterprise Video Management and Learning platform can help you engage with your employees better,  we’d love to chat


Understanding HLS: HTTP Live Streaming and Its Encryption Features for Enterprise use


Introduction

HTTP Live Streaming (HLS) is a popular adaptive bitrate streaming protocol developed by Apple Inc. It is widely used to deliver high-quality media content over the internet in real-time, enabling seamless streaming of live events and video-on-demand (VOD) services. This article will provide an overview of how HLS works and explore the security features available to protect your content, including encryption methods and DRM (Digital Rights Management). 

It is important to note that HLS is one of the most widely adopted streaming protocols globally, but stands out from the other similar technologies such as RTMP, RTSP and MPEG-DASH because of its simplicity and stronger adoption on mobile platforms, specifically iOS and Apple devices. Its popularity can be attributed to several factors, including:

  1. Device compatibility: HLS is natively supported on a wide range of devices, including iOS, Android, macOS, and Windows platforms. This broad support increases its adoption by streaming service providers, as it ensures a seamless experience for viewers across various devices.
  2. Adaptive bitrate streaming: HLS’s ability to adapt to different network conditions and device capabilities makes it a preferred choice for delivering high-quality content over the internet. This feature ensures smooth and uninterrupted streaming experiences for viewers.
  3. Content protection: HLS’s built-in encryption features enable content creators and service providers to secure their media and prevent unauthorized access. This is crucial for premium and copyrighted content.
  4. Scalability: HLS is designed to work well with content delivery networks (CDNs), enabling efficient and scalable delivery of media to a large number of viewers worldwide.

Support of HLS in Web browsers

Support of HLS in web browsers is generally good. Most major browsers, including Chrome, Firefox, Safari, and Edge, support HLS natively. This means that you can play HLS streams in these browsers without having to install any additional plugins or extensions.

There are a few exceptions to this rule. For example, Internet Explorer does not support HLS natively. However, there are a number of third-party plugins that can be used to add HLS support to Internet Explorer.

Overall, the state of native support of HLS in web browsers is good. If you want to play HLS streams in your web browser, you should be able to do so without any problems.

Here is a table of native HLS support in major web browsers:

BrowserVersionSupport
Chrome4 and upYes
Firefox2 and upYes
Safari3.2 and upYes
Edge12 and upYes
Internet ExplorerNo (requires third-party plugin)

HLS Workflow: How it Works

  1. Media segmentation: The source media file is broken down into smaller chunks, usually ranging from 2 to 10 seconds each. These segments are typically encoded in the H.264 video codec and AAC audio codec for compatibility with a wide range of devices.
  2. Creating multiple bitrate versions: To accommodate varying network conditions and device capabilities, the media is encoded at different bitrates. This allows the client to choose the best quality stream based on its current bandwidth and performance.
  3. Generating playlists: For each bitrate version, a Media Playlist (M3U8 file) is created. This file contains the URIs of the media segments and additional metadata, such as segment duration and sequence numbers. A Master Playlist is also generated, which lists all the available Media Playlists and their respective bandwidths, resolutions, and codecs.
  4. Content delivery: The media segments and playlists are hosted on a web server or content delivery network (CDN), allowing clients to access and download the content using standard HTTP requests.
  5. Adaptive streaming: The client starts by requesting the Master Playlist to determine the best Media Playlist based on its current network conditions and device capabilities. The client then downloads and plays the media segments sequentially. During playback, the client continuously monitors its performance and adjusts the selected bitrate accordingly, ensuring a smooth and uninterrupted streaming experience.

HLS Encryption for Content Security

To protect copyrighted content and prevent unauthorized access, HLS provides an encryption feature that secures the media segments using the Advanced Encryption Standard (AES). The encryption process follows these steps:

  1. Key generation: A unique encryption key (a 128-bit or 256-bit AES key) is generated for each piece of content. This key will be used to encrypt and decrypt the media segments.
  2. Media encryption: Each media segment is encrypted using the AES encryption algorithm and the generated key. The encrypted segments are then saved on the web server or CDN.
  3. Key distribution: The encryption key must be securely distributed to authorized clients. This can be done using various methods, such as:
    a. Storing the key on a separate server and securing it with authentication and access control mechanisms. b. Transmitting the key over a secure channel, such as HTTPS or a secure token-based system.
  4. Updating playlists: The Media Playlists are updated to include a reference to the key, which is required for decryption. This reference is typically a URI pointing to the key’s location on the key server.
  5. Client-side decryption: Authorized clients fetch the encryption key and use it to decrypt the downloaded media segments during playback.

How to create HLS Content? (Technical details)

Hosting HLS content involves preparing the media files and setting up a web server or content delivery network (CDN) to serve those files to viewers. Here’s a step-by-step guide to host your HLS content:

  1. Prepare your HLS content:

Use a video processing tool like FFmpeg to convert your video into HLS format. This involves segmenting the video into small chunks (.ts files) and creating playlists (.m3u8 files) that reference those chunks. You can create single or multi-bitrate streams depending on your requirements.

In this example we use ffmpeg ( a powerful, open-source multimedia processing tool )that can be used to create HLS (HTTP Live Streaming) content. The following is a basic command-line reference for using FFmpeg to generate an HLS stream. Please note that you may need to modify the commands to suit your specific requirements and input formats.

  1. Single bitrate HLS stream:

To create a single bitrate HLS stream, use the following command:

bash

ffmpeg -i input.mp4 -codec:v libx264 -codec:a aac -map 0 -f hls -hls_time 4 -hls_list_size 0 -hls_segment_filename “output_%03d.ts” output.m3u8

In this command:

-i input.mp4: Specifies the input file (replace input.mp4 with your source video file)

-codec:v libx264 -codec:a aac: Sets the video codec to H.264 and the audio codec to AAC

-map 0: Includes all streams from the input file

-f hls: Specifies the output format as HLS

-hls_time 4: Sets the duration of each HLS segment to 4 seconds (you can adjust this value as needed)

-hls_list_size 0: Generates an unlimited HLS playlist (set to a specific number for a limited playlist)

-hls_segment_filename “output_%03d.ts”: Sets the naming format for the HLS segments (replace output with your desired prefix)

output.m3u8: Specifies the output playlist file (replace output.m3u8 with your desired playlist name)

  1. Multi-bitrate HLS stream:

Multi-bitrate HLS stream

bash

ffmpeg -i input.mp4 -map 0 -codec:v libx264 -codec:a aac -s:v:0 1280×720 -b:v:0 3000k -s:v:1 854×480 -b:v:1 1500k -s:v:2 640×360 -b:v:2 800k -f hls -hls_time 4 -hls_list_size 0 -hls_segment_filename “output_%v/output_%03d.ts” -var_stream_map “v:0,a:0 v:1,a:0 v:2,a:0” output.m3u8

In this command:

-s:v:0 1280×720 -b:v:0 3000k: Sets the resolution and bitrate for the first video stream (720p)

-s:v:1 854×480 -b:v:1 1500k: Sets the resolution and bitrate for the second video stream (480p)

-s:v:2 640×360 -b:v:2 800k: Sets the resolution and bitrate for the third video stream (360p)

-hls_segment_filename “output_%v/output_%03d.ts”: Sets the naming format for the HLS segments per bitrate version (replace output with your desired prefix)

-var_stream_map “v:0,a:0 v:1,a:0 v:2,a:0”: Maps the video and audio streams for each bitrate version (update this according to the number of bitrate versions you create)

These commands will generate the necessary HLS segments and playlists. Once generated, you can host them on a web server or content delivery network (CDN) for streaming.

Remember that FFmpeg provides a vast array of options for customizing your HLS stream. You can refer to the official FFmpeg documentation for more

  1. Choose a hosting solution:

There are two main options for hosting HLS content:

a. Web server: You can host HLS content on a web server like Nginx or Apache. This option is suitable for small-scale streaming with limited viewers or for testing purposes. For larger audiences, consider using a CDN.

b. Content Delivery Network (CDN): A CDN is a network of servers distributed across multiple geographical locations, which caches and delivers your content to viewers efficiently. CDNs are recommended for hosting HLS content, as they provide faster load times, lower latency, and better performance, especially for large-scale streaming.

  1. Test your HLS stream:

Once your HLS content is hosted, test the stream by accessing the playlist URL in an HLS-capable player. This can be a web-based player like hls.js or video.js, or standalone players like VLC and Safari. Verify that the stream plays smoothly and adapts to different network conditions.

By following these steps, you can host your HLS content and ensure a smooth streaming experience for your viewers.

Conclusion

HLS is a widely adopted streaming protocol that ensures a smooth and high-quality streaming experience for viewers. By utilizing adaptive bitrate streaming and offering encryption features, HLS provides a flexible and secure solution for delivering live and on-demand content over the internet. As a content creator or service provider, understanding the inner workings of HLS and its security features will help you make informed decisions on how to protect and distribute your valuable media content.

CircleHD Enterprise Video Platfrom supports HLS transcoding and takes care of video security including access control management and analytics out of the box. so your team can focus on the growing use case of video adoption. To request a demo, please contact us here.