Skip to content

Need advice on SAMPLE-AES packaging and playback #4792

@ghost

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions