Open kolevgeorgie opened 3 years ago
Use of SAMPLE-AES-CENC (renamed to SAMPLE-AES-CTR in later versions) requires fMP4 container. That is the reason you get EXT-X-MAP, and also the reason you get version 6, from the HLS spec -
Use of the EXT-X-MAP tag in a Media Playlist that DOES NOT contain the EXT-X-I-FRAMES-ONLY tag REQUIRES a compatibility version number of 6 or greater.
This encryption scheme works only with unmuxed video/audio, from what you pasted, I'm guessing you are requesting index.m3u8... If you will request master.m3u8 instead, you will get separate index.m3u8's for video/audio, and the URLs inside them will work.
Thanks for the input. Any recommendation that will not require intervention of the source and keep the MP4 container?
AFAIK there's no such thing cenc scheme using MPEG-TS
, if that is the question...
The question is - how can I apply drm without adding EXT-X-MAP:URI
which actually points to mp4 that does not exist.
So, as I wrote above, you can't have video+audio muxed on the same segment when you use SAMPLE-AES-CENC, meaning - request for index.m3u8 will not work, but index-v1.m3u8 / index-a1.m3u8 are expected to work fine. If you use master.m3u8, it will return a manifest that uses EXT-X-MEDIA in order to have the video/audio separate.
Right, thanks for clarification. I tested with simple configuration and it "seems" to be working - master.m3u8 delivers both audio and video streams and they are loaded, but cannot be played. I suspect that something with the encryption/decryption might not be ok, but then even adding vod_drm_clear_lead_segment_count 5;
so that first 5 segments are not encrypted, player fails to load any content.
I'm testing with hls.js here: https://hls-js.netlify.app/demo/
IIRC I tested this configuration only on Shaka player, but you will need the latest code - they changed the spec at some point, and renamed METHOD=SAMPLE-AES-CENC to METHOD=SAMPLE-AES-CTR
I have a running configuration that serves HLS VOD and I'm trying to test integration with Widevine DRM. The configuration seems to be working and nginx successfully serves manifest but it's changed in a way that breaks delivery.
My working configuration:
which deliveres the following:
To that configuration I add the following:
but this generates different m3u8:
(domain/file are dummy, replacing the real path to file for the purpose of issue) So I see that EXT-X-VERSION changed to 6 and the
EXT-X-MAP:URI
which points in my case to a file that does not exist. Also the segments changed fromts
tom4s
.I really can't find any reason for nginx-vod doing this and also no documentation on the issue. Any help is appreciated.