video encoding Archives - VdoCipher Blog Secure Video Streaming Fri, 01 Sep 2023 09:05:58 +0000 en-US hourly 1 https://wordpress.org/?v=6.4.5 https://www.vdocipher.com/blog/wp-content/uploads/2016/11/cropped-VdoCipher-logo2-32x32.png video encoding Archives - VdoCipher Blog 32 32 CMAF Streaming Guide to Enhance Video Delivery and User Experience https://www.vdocipher.com/blog/cmaf-streaming/ Tue, 16 May 2023 05:59:15 +0000 https://www.vdocipher.com/blog/?p=13847 The Common Media Application Format (CMAF) is a versatile media format designed to simplify streaming delivery, reduce storage costs, and enable adaptive streaming across various devices and platforms. In this comprehensive guide, we will explore the benefits, applications, and best practices for implementing CMAF in your video streaming workflow. Table Of Contents: What is CMAF […]

The post CMAF Streaming Guide to Enhance Video Delivery and User Experience appeared first on VdoCipher Blog.

]]>
The Common Media Application Format (CMAF) is a versatile media format designed to simplify streaming delivery, reduce storage costs, and enable adaptive streaming across various devices and platforms. In this comprehensive guide, we will explore the benefits, applications, and best practices for implementing CMAF in your video streaming workflow.

What is CMAF (Common Media Application Format)?

CMAF, the Common Media Application Format, is an innovative and extensible standard aimed at streamlining the end-to-end delivery of HTTP-based streaming content. It simplifies the process of broadcasting to multiple devices while reducing costs, lowering latency, and eliminating workflow complexities for content owners or broadcasters.

Formalized as ISO/IEC 23000-19, CMAF was introduced by Apple and Microsoft following the decline of Flash’s Real-Time Messaging Protocol (RTMP). The spotlight shifted to HTTP-based technologies, which facilitated adaptive bitrate streaming and supported various file containers and formats. However, content owners had to encode and store video streams in different versions to cater to a broad audience base, attracting significant storage and maintenance costs. CMAF addresses this issue by providing a uniform streaming container that works with both HLS and DASH protocols. It also employs chunked encoding and chunked transfer encoding to lower latency.

Explore More ✅

Secure Your Videos with VdoCipher Video Hosting

VdoCipher can help you stream your videos. You can host your videos securely, and you get various features such as Video API, CDN, Analytics and Dashboard to manage your videos easily.

Although CMAF is not a protocol in itself, it is a container and set of standards for single-approach video streaming that works with protocols like HLS and MPEG-DASH. It supports various existing codecs, making it more compatible with a wider range of devices.

In the realm of content delivery, CMAF (Common Media Application Format) boasts several unique media components – CMAF Tracks, Switching Sets, Aligned Switching Sets, Selection Sets, and Presentations. Efficient caching and multi-platform distribution are its strengths.

CMAF Purpose and Benefits

The Common Media Application Format (CMAF) was developed to address the challenges of streaming latency, complexity, and costs. By creating a standardized format for delivery, CMAF aims to provide several benefits:

  • Reduced storage costs: CMAF eliminates the need to create different content renditions for compatibility with various streaming formats, thereby cutting down repackaging and CDN maintenance costs.
  • Simplified workflow: It allows for common encryption (CENC), which means data does not need to be encrypted multiple times. Reliable DRM solutions can quickly and easily decrypt encrypted data, removing unnecessary operational complexity.
  • Reduced latency: CMAF enables publishers to leverage chunked encoding, ensuring speedy delivery of content. By transmitting smaller chunks in sequence, CMAF offers ultra-low latency (ULL), close to real-time (three seconds or fewer), as opposed to other streaming protocols that result in higher latency.
  • Universal encryption: It creates a standard encryption method that each device can easily decode, reducing file size and improving transmission and playback.
  • Reduced data redundancies: CMAF simplifies the streaming process by reducing data redundancies created by multiple encryption formats and duplicate files.
  • Lowered processing costs: By reducing network bandwidth required to process, and encode video content, CMAF contributes to overall cost savings in the streaming process.

CMAF’s ultra-low latency is particularly notable, as it uses the same infrastructure as other higher latency options without increasing costs. This makes CMAF an ideal choice for delivering real-time or near-real-time streaming experiences.

Need of CMAF for Video Streaming

The world of video streaming is complex, with a multitude of codecs, media formats, protocols, and devices adding to the intricacy. Different media formats increase streaming latency and costs, making video delivery unnecessarily expensive and slow. Broadcasters aiming for a wider audience need to create multiple copies of each stream file in different file containers, which doubles the cost of packaging, storing, and caching on CDN servers.

Before CMAF, Apple’s HLS protocol depended on .ts (MPEG-TS) or MPEG container formats, while HTTP-based technologies like DASH relied on .mp4 (fMP4). With the advent of CMAF and Common Encryption (CENC), industry players like Microsoft and Apple now deliver content across HLS and DASH protocols using the fragmented MP4 (.fmp4) container.

CMAF streamlines interoperability of DRM (Digital Rights Management) solutions with the help of MPEG-CENC, further simplifying the video streaming process. Overall, CMAF significantly reduces latency, complexity, and costs associated with video streaming, making it an essential tool for the industry.

History and Developments of CMAF

The decline of Adobe’s Flash Player and RTMP in 2020 ushered in a new era of HTTP-based technologies for adaptive bitrate streaming. However, different streaming standards, such as MPEG-DASH and HLS, required different file containers like .mp4 and .ts, respectively.

In February 2016, Apple and Microsoft proposed a new uniform standard, the Common Media Application Format (CMAF), to the Moving Pictures Expert Group (MPEG) to reduce complexity and costs when transmitting video online. By June 2016, Apple announced support for the fMP4 format, and by July 2017, the CMAF specifications were finalized. In January 2018, the CMAF standard was officially published.

This achievement was more diplomatic than technical, as it brought about cooperation between major tech giants to establish a standardized container for seamless video streaming.

CMAF Encoding and Extensions

CMAF (Common Media Application Format) is a way to create special MP4 video files that can be easily streamed online. These files can be used with multiple streaming technologies, like DASH and HLS, making it easier for video providers to deliver content to different devices.

cmaf streaming logical workflow

File extensions like *.cmfv, *.cmfa, and *.cmft are suggested by the CMAF standard for video, audio, and text, but they are not strictly required. You can use other extensions like MP4 or M4A, and the files will still work with most CDNs (Content Delivery Networks). Some CDNs might have optimizations for specific extensions, so it’s essential to consider that.

CMAF is not related to transcoding (converting video files from one format to another). It is just a container format for storing video, audio, and text data. To create CMAF files, you can use tools like Bento4, Shaka, or FFmpeg, which help generate the right format for streaming.

Although CMAF is a useful format, its adoption has been slower than expected. It benefits CDN providers along with content creators and distributors. You can still create CMAF-like files using FFmpeg and other tools, even if there isn’t a dedicated CMAF muxer yet.

Comparing Between Elements Of CMAF, HLS And DASH

CMAF vs RTMP

RTMP (Real-Time Messaging Protocol), a TCP-based brainchild of Macromedia (now Adobe-owned) for streaming audio, video, and data between Flash player and server. While RTMP’s low latency and minimal buffering are noteworthy, it lacks quality and scalability, with dwindling support. CMAF outshines RTMP, ensuring low latency (3-5 seconds), superior quality, and scalability.

CMAF vs HLS

HLS (HTTP Live Streaming) is an adaptive HTTP-based protocol developed by Apple for transporting video and audio data from media servers to end users’ devices. While HLS is widely supported and ensures optimal user experience with minimal buffering, it offers a latency of 5-20 seconds. CMAF can work with HLS to improve latency and standardize container files. However, Apple has developed Low-Latency HLS, which reduces latency and competes with CMAF, raising questions about Apple’s commitment to standardization.

Explore More ✅

Protect Your VOD & OTT Platform With VdoCipher Multi-DRM Support

Vdocipher helps several VOD platforms to host their videos securely, helping them to boost their video revenues.

CMAF vs WebRTC

WebRTC (Web Real-Time Communications) is a revolutionary tech, enables real-time media exchanges between browsers and devices. Its ultra-low latency (0.5 seconds) is impressive, but it’s tailored more for real-time video conferencing and feedback-enabled systems.

While each protocol has its advantages and drawbacks, CMAF provides a consistent approach that simplifies content delivery and improves viewer experience with low latency of 3-5 seconds.

CMAF HLS DASH
Manifest HLS Master Playlist (.m3u8) files Media Presentation Description (.mpd) file
Presentation Presentation defined by Master Playlist and associated Media Playlists with aligned start points. DASH Period and associated Adaptation Sets defined in MPD.
Selection Sets Sets of parallel tiers of Media Playlists defined by appropriate sets of EXT-X-STREAM-INF tags. Such tiers could be defined, e.g. for different codecs. A group of Adaptation Sets defined for each Period in MPD.
Switching Set A set of Media Playlists or Variant Streams that can be used by player to play presentation. DASH Adaptation Set
Track HLS Variant Stream (specified by Media Playlist URI and EXT-X-STREAM-INF tag describing its properties), restricted to single media type. DASH Representation restricted to single media type.
Header Media Initialization Section, defined by EXT-X-MAP tag DASH Initialization Segment
Segment Sequence of fMP4 segments within same variant stream Sequence of DASH segments within same representation
Fragment HLS fMP4 segments limited to single media type (i.e. audio or video) DASH segment limited to single media type
Chunk Chunk of fMP4 segment limited to integral number of samples DASH subsegment
Presentation profile Only unencrypted or ‘cbcs’ encrypted profile are supported Unencrypted, and multiple types of encrypted profiles are supported

CMAF Supported Video Formats and Encoding

CMAF accommodates various video codecs, resolutions, and frame rates (think HDR and WCG content). CMAF’s popular video codecs – H.264 (AVC) and H.265 (HEVC) – offer efficient compression for high-quality streaming with low storage consumption. It also employs the ISOBMFF container, founded on the fragmented MP4 (fMP4) format, standardizing content delivery across HLS and DASH streaming protocols.

Audio codecs like AAC, AAC-LC, HE-AAC+ v1 & v2, and MP3 are also compatible with CMAF, ensuring high-quality audio complements video content for an immersive experience.

CMAF Streaming Tools for Encoding, Packaging and Playback

CMAF (Common Media Application Format) streaming tools help content providers encode, package, distribute, and playback their media content across various platforms and devices. Here is a list of some popular CMAF streaming tools and services:

Encoding tools

  • FFmpeg: A widely-used, open-source multimedia framework that supports encoding video and audio content in CMAF-compatible formats.
  • AWS Elemental MediaConvert: A cloud-based encoding service from Amazon Web Services that provides support for CMAF format conversion.

Packaging tools

  • Bento4: A set of open-source tools for working with fragmented MP4 (fMP4) files, which can be used to package CMAF-compatible content.
  • Shaka Packager: An open-source media packaging tool developed by Google that supports CMAF packaging along with other popular streaming formats.

Video players

  • VdoCipher Custom Player: An advanced video player with customization options and watermarking features. Also, has plugins, SDKs and APIs for easy integration.
  • Video.js: An open-source HTML5 video player that supports CMAF playback, making it compatible with various devices and platforms.
  • Shaka Player: An open-source, JavaScript-based player developed by Google that supports CMAF playback, along with other popular streaming formats.

These CMAF streaming tools can be combined to create a complete end-to-end streaming workflow, ensuring compatibility, security, and high-quality streaming experiences for viewers.

Combining DRM with CMAF for Video Security

To safeguard copyrighted content, Digital Rights Management (DRM) systems are essential. CMAF flawlessly integrates with major DRM systems (FairPlay, and Widevine) via the Common Encryption (CENC) standard. Content providers can encrypt video streams with a single method compatible with multiple DRMs.

When implementing CMAF with DRM, content providers need to consider the following steps:

  • Encrypt the content: Use an encryption tool that supports CENC to encrypt the video and audio streams.
  • Generate DRM licenses: Set up a license server for each DRM system (FairPlay, Widevine) to generate and manage licenses for authorized users.
  • Integrate with a video player: Use a video player that supports multi-DRM playback and can request the appropriate license from the license server based on the end user’s device and platform.

By combining CMAF with DRM systems, content providers can ensure the security of their video content while maintaining compatibility and delivering a high-quality streaming experience to their users.

Note: This implementation requires technical expertise. If you are looking for a CMAF based video hosting provider with DRM security, VdoCipher seems to be the obvious choice due to additional features.

FAQs

How does CMAF reduce latency?

CMAF uses chunked encoding and chunked transfer encoding processes to break digital content into smaller, manageable chunks with a fixed duration. These chunks can be published immediately upon encoding, allowing for near-real-time content delivery while the encoding process continues.

Is CMAF compatible with DRM (Digital Rights Management) systems?

Yes, CMAF supports major DRM systems like FairPlay, and Widevine. It aims to standardize encryption and DRM systems through Common Encryption (CENC), which simplifies content protection and ensures secure streaming.

Can CMAF be used with popular streaming protocols like HLS, DASH, and RTMP?

CMAF works seamlessly with HLS and DASH protocols, standardizing the container format for cross-protocol content delivery. But it doesn’t directly connect with RTMP, an older streaming protocol designed for Adobe Flash Player.

How does CMAF compare to WebRTC in terms of latency?

Though CMAF excels in low-latency streaming (3-5 seconds latency), WebRTC trumps it with ultra-low latency (0.5 seconds). While CMAF caters to most live streaming situations, WebRTC is the go-to for real-time communication and applications demanding minimal delay.

The post CMAF Streaming Guide to Enhance Video Delivery and User Experience appeared first on VdoCipher Blog.

]]>
What Is Video Encoding: Everything You Should Know! https://www.vdocipher.com/blog/video-encoding/ Sat, 30 Jan 2021 17:34:42 +0000 https://www.vdocipher.com/blog/?page_id=6908 In its raw or uncompressed form, the video can be quite heavy. It’s quite difficult to upload and share videos in their raw form. Also video streaming protocols are quite dependent on the type of device/browser where the video is playing. This is where video encoding comes into play. As the heavy raw files are […]

The post What Is Video Encoding: Everything You Should Know! appeared first on VdoCipher Blog.

]]>
In its raw or uncompressed form, the video can be quite heavy. It’s quite difficult to upload and share videos in their raw form. Also video streaming protocols are quite dependent on the type of device/browser where the video is playing. This is where video encoding comes into play. As the heavy raw files are compressed into a lighter version while maintaining most of the original quality and different protocols are encoded to adhere to the streaming protocols required. 

What is Video Encoding?

Video encoding is basically the process of converting raw or uncompressed video files into the required format. It is quite often used interchangeably with video transcoding, but there’s a slight difference. While video encoding converts raw files to another format. Video transcoding converts one format to another.

Video encoding is a lossy process, as not all the information originally in the video is kept. The final version of the video is the best approximation of the original video.

Why would you need to encode your videos?

Encoding your videos can help you in two parts, i.e. streaming, and compatibility. 

With streaming, the video encoding makes it way easier to broadcast your videos online. The compression with encoding ensures lower bandwidth consumption along with better video quality. 

Compatibility is another reason why you would need to encode your videos. Different devices support different video formats, so you need to encode your videos to those specific formats. Even with different browser engines, you’d need different formats. 

This is why, while uploading your videos online, you need to make sure that your videos are available in all the different formats for browsers as well as different quality. So that your users can stream videos seamlessly on any browser, regardless of their internet speed. 

Other reasons to encode your videos can be to reduce file size, change video resolution, change the audio format, or to make videos of different video bitrate,

What Is Video Codec?

Video codecs are software that is used for the compression and playback of video files. The word “codec” stands for coder and decoder. They compress the original video and make it lighter for storage and later it is decompressed for viewing.

Video streaming involves both audio and video codecs, along with video metadata. Each video format has its own video codec, such as H264, H265, HEVC, VP8, etc. Also an audio codec such as MP3, AAC, and WMA.

H.264 or AVC is the most widely used video codec. At the same file size, it provides a much better video bitrate than its predecessors.

Other popular video codecs are: 

H.265 or HVEC: It gives half the bitrate than H.264 and is good for playback high-resolution videos. But the downside is that it uses about three times more resources than H.264. Also, even after some time of its release, it’s still not as popular as H.264,

VP9: It is a royalty-free and open-source codec developed by Google. It gives half the bitrate of VP8 and like H.265 it is also good for high-resolution videos and live streaming. But it is more difficult to encode and is also not widely supported

In simpler terms, a video needs to meet certain criteria in order to play on different devices or browsers. To convert them into the right format, video encoding is done to make sure that the video is playable regardless of the device. 

Cloud Video Encoding

Having an in house video encoding solution certainly has its own advantages. As it gives you better control over your workflow than any other solution online. This certainly helps in cases where the video files are quite large and need a lot of bandwidth. This is ideal for any business with a good team and infrastructure.

In case you are a media platform or an e-learning platform, who wants to host their video online without facing the hassle of all the tech part. It’s best that you opt for a video hosting service, which takes care of the encoding for you. 

Business video hosting services like VdoCipher take care of it automatically whenever you upload videos on their platform. The raw videos are encoded into all the relevant formats and sizes. Making it easier for you to host videos, by just clicking the upload button, without having to care about video encoding, codecs and so.

This further saves the cost of creating, maintaining, and upgrading your in-house solution to encode your videos. 

The post What Is Video Encoding: Everything You Should Know! appeared first on VdoCipher Blog.

]]>