http-streaming icon indicating copy to clipboard operation
http-streaming copied to clipboard

Is HLS aes encryption supposed to work for fmp4?

Open phloxic opened this issue 2 years ago • 4 comments

Not the full template, just a question.

Here's an example of an aes encrypted fmp4 HLS VOD stream, segmented by mediafilesegmenter. Plays fine in Safari.

http-streaming barks: 'RangeError: buffer length for Int32Array should be a multiple of 4'

Are there some compatibility docs which I can't find?

Note: Video codecs are not HEVC, but avc1 h264. So this question differs somewhat from #1290.

phloxic avatar Jul 23 '22 23:07 phloxic

Correction: the example does not work in Safari plain videotag either, hangs after first segment. Sorry about this. Looks like a bug in mediafilesegmenter (the unencrypted fmp4 definitely works in both native Safari and videojs).

However, I'd still like to know whether aes-128 encrypted HLS fmp4 streams are supposed to work in videojs?

phloxic avatar Jul 24 '22 09:07 phloxic

Ah: https://developer.apple.com/forums/thread/131625

phloxic avatar Jul 24 '22 09:07 phloxic

Here's a sample stream

Here it is in the netlify demo.

The error is triggered on variant switch. You may have to switch manually.

phloxic avatar Jul 24 '22 12:07 phloxic

Hey! We've detected some video files in a comment on this issue. If you'd like to permanently archive these videos and tie them to this project, a maintainer of the project can reply to this issue with the following commands:

  • for https://d12zt1n3pd4xhr.cloudfront.net/dev/ahoy-fmp4-aes.m3u8: say @video-archivist-bot save vj9ZXw
  • for https://videojs-http-streaming.netlify.app/?debug=false&autoplay=false&muted=false&fluid=false&minified=false&sync-workers=false&liveui=false&llhls=false&url=https%3A%2F%2Fblacktrash-media.s3.amazonaws.com%2Fdev%2Fahoy-fmp4-aes.m3u8: say @video-archivist-bot save NjLr4A

video-archivist-bot avatar Jul 24 '22 12:07 video-archivist-bot

FWIW, with newer Safari it works (Safari 15.6.1 tested). See demo, with overrideNative turned off.

phloxic avatar Aug 30 '22 09:08 phloxic

Hey! We've detected some video files in a comment on this issue. If you'd like to permanently archive these videos and tie them to this project, a maintainer of the project can reply to this issue with the following commands:

  • for https://videojs-http-streaming.netlify.app/?debug=false&autoplay=false&muted=false&fluid=false&minified=false&sync-workers=false&liveui=false&llhls=false&url=https%3A%2F%2Fd12zt1n3pd4xhr.cloudfront.net%2Fdev%2Ffmp4-aes-en-nif.m3u8: say @video-archivist-bot save vjNXnA

video-archivist-bot avatar Aug 30 '22 09:08 video-archivist-bot

Opened an issue here.

Closing this.

phloxic avatar Sep 29 '22 10:09 phloxic