Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need advice on SAMPLE-AES packaging and playback #4792

Closed
ghost opened this issue Jul 18, 2022 · 2 comments
Closed

Need advice on SAMPLE-AES packaging and playback #4792

ghost opened this issue Jul 18, 2022 · 2 comments

Comments

@ghost
Copy link

ghost commented Jul 18, 2022

Hey folks,

I'm currently using VideoJS, and I'm a bit disappointed as it does not seem to support SAMPLE-AES encrypted playback at all. I saw that hls.js supports it, so I would like to start implementing.

At the moment, I use ffmpeg to generate a HLS structure from a media input file like mp4, flac, m4a etc.
The output is fragmented mp4 (.m4s files). These m4s files I then encrypt using the bento4 toolstack (mp4encrypt) to be specific here.

I basically generate an encryption key for each track of my adaptive-bitrate representations (ABR) and upload the key for that track onto a webserver so that the player can pull it from the reference found in the m3u8 file.

I now have some questions onto my packaging flow:

  1. Do I need to encrypt the init segment of each track? Some players want this encrypted, some others don't. What does hls.js expect here?
  2. Is my HLS structured correctly? Please see attached example.zip. This stream is encrypted, so playback won't be possible. This should only show how it's setup. In this example, the init segments are not encrypted.
    example.zip

Thanks in advance

@phloxic
Copy link
Contributor

phloxic commented Aug 24, 2022

Sample AES is only supported with MPEG-2 TS containers, not fmp4: https://github.com/video-dev/hls.js#features

@robwalch
Copy link
Collaborator

Duplicates #2934

Software SAMPLE-AES will not be supported for mp4. It will only be supported with EME.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants