Created attachment 464644 [details] HTML/JS and media to deploy locally Certain videos encoded with Intel QSV in CBR mode and encrypted with CBCS 1:9 cause Safari 16.2 (both regular and TP) on macOS 13.1 on M1 Air to throw an error after a few seconds of playback. I've used both my own encryptor and Shaka Packager - the result is the same. At the same time there are no errors on my old Intel-based MBP (mid 2012) / macOS 10.15.7 / Safari 15.6 as well as on iPad Air 2 / iPadOS 15.5, which leads me to believe the faulty link is Safari 16, maybe in combination with Apple silicon. The demo is deployed here (it's pretty much Apple's own FairPlay sample code with castLabs DRMtoday license acquisition): http://pop-av.icu:8898/
It's also worth mentioning it works perfectly fine with third-party decryptors/players: Chrome on any platform/hardware via MSE with ClearKey or Widevine or PlayReady, ffplay (ffplay -decryption_key 3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c out-2-encr.mp4, but not with the stable 5.1.2 as it has couple of bugs around 'trun' parsing which are fixed in main), etc
<rdar://problem/104674800>
Moved the demo to https://vitaly-castlabs.github.io/safari16-decr-issue
ffmpeg Stable has been updated to 6.0 since, so "ffplay -decryption_key..." now works fine too
Verbose MSE log: [Debug] SourceBuffer::monitorBufferingRate(9FFAD41A0090001) 0.2638390404863951 [Debug] SourceBuffer::sourceBufferPrivateAppendComplete(9FFAD41A0090001) buffered = [{0/1 = 0}..{1477/1000 = 1.477}] [Debug] SourceBuffer::appendBufferInternal(9FFAD41A0090001) size = 19836, buffered = [{0/1 = 0}..{1477/1000 = 1.477}] [Debug] SourceBuffer::monitorBufferingRate(9FFAD41A0090001) 0.2649563195125863 [Debug] SourceBuffer::sourceBufferPrivateAppendComplete(9FFAD41A0090001) buffered = [{0/1 = 0}..{1495/1000 = 1.495}] [Error] SourceBuffer::sourceBufferPrivateDidReceiveRenderingError(9FFAD41A0090001) 0 [Log] MediaSource::streamEndedWithError(9FFAD41A0098DE6) decode [Log] MediaSource::onReadyStateChange(9FFAD41A0098DE6) old state = open, new state = ended [Debug] MediaSource::scheduleEvent(9FFAD41A0098DE6) scheduling 'sourceended' [Log] MediaSource::detachFromElement(9FFAD41A0098DE6) [Log] MediaSource::onReadyStateChange(9FFAD41A0098DE6) old state = ended, new state = closed [Debug] MediaSource::scheduleEvent(9FFAD41A0098DE6) scheduling 'sourceclose' [Debug] MediaSource::removeSourceBuffer(9FFAD41A0098DE6) [Error] SourceBuffer::sourceBufferPrivateDidReceiveRenderingError(9FFAD41A0090001) 0