Glossary
These are some terms you will come across while building a video streaming setup and implementing DRM to the pipeline.
Codecs: H264, H265, VP9, AAC​
H264 (also called AVC) is the most versatile and popular video codecs which can be prepared and played by almost any popular software. It has hardware acceleration available for all consumer and server hardware.
H265 (also called HEVC) is a successor of H264 with the objective of providing greater efficiency. Efficiency, here, means providing the same perceived visual quality at the lower bitrate. This is not supported in most devices. Only latest macOS and iOS Safari have reliable support for H265
VP9 is another high efficiency codec which is better than H264 and as efficient as H265. This has support in most modern browsers other than Safari.
AV1 is the latest video codec developed as a royalty free high-efficiency codec. It is getting ready for production use with support in latest Firefox and Chrome.
AAC is an audio codec. The above four applies only to the video stream. Audio streams have their own algorithms for compression. AAC is the most popular of them due to its support by all streaming protocols and browsers.
DRM systems: Widevine, Fairplay​
These are the providers for content-decryption-modules. Content-decryption modules are the closed-source modules available as part of either an OS or a browser. These modules are often baked into the hardware such that no-one can read the file decryption keys.
Closed-source CDMs are the backbone of any DRM system because they provide the obfuscation required for copy-protection. While the EME spec itself if public, its implementation relies on the fact that the system will have access to a CDM.
The most common DRM systems are Widevine, Fairplay and Playready. Together, these three cover almost all consumer devices.
Streaming protocols: DASH, HLS, CMAF​
These are the containers of compressed video and audio. Consider these like alternatives
to the good-old mp4 and avi files. A regular mp4 file can be streamed over the web in a
<video /> tag, but it has several limitations. It can not auto-adapt quality in response
to changing network speed. It can not customise the buffer loading process. It can not
be served as separate audio and video files. To add such features into web streaming, we
use specialised delivery protocols such as DASH and HLS.
These consists of a manifest file and separate media data files. The manifest file is a text file with structured information that tells the player/browser how to load and play the video. The media files are binary files which contains the compressed output from the codecs often with minimal headers. The structure of manifest file and the header required in media files is the definition of a streaming protocol.
DASH manifest uses the extension .mpd while HLS uses the extension .m3u8. The extensions
of media chunks does not matter since they are loaded by player. Conventionally, dash uses
.mp4 or .m4s for fragmented-mp4 (also called fmp4) format of media chunks. While HLS
uses .ts extension for its transport-stream format.
HLS also supports fragmented-mp4 chunks together in HLS which has led to development of CMAF
streams. CMAF is an idea of using the same media files with two different manifests, a
m3u8 for HLS and a .mpd for DASH. This saves on storage and improves cache efficiency.
Encryption methods: CENC, CBCS, SAMPLE-AES​
AES-128 that you might have seen used with HLS streams is not a DRM encryption method. AES128 + HLS means that the keys are transmitted to the player in plain text and therefore does not prevent download of streams. A number of downloader plugins actually have this decryption as part of their download logic.
Widevine uses either CENC or CBCS encryption methods. CENC is the available everywhere Widevine is supported, while CBCS is supported by updated devices and browsers only.
Fairplay supports SAMPLE-AES and CBCS encryption methods. SAMPLE-AES is supported in all macOS and iOS versions since Fairplay was added. CBCS was added later, and some very old OS might not support it.