axiomatic-systems / Bento4

Full-featured MP4 format, MPEG DASH, HLS, CMAF SDK and tools
http://www.bento4.com
2.03k stars 483 forks source link

Cleanup Widevine PSSH #986

Closed ftyp closed 6 days ago

ftyp commented 1 week ago

image https://tools.axinom.com/decoders/PsshBox

Remove deprecated Algorithm field 1 which should not be used conjunction with Protection Scheme field 9

If backward compatibility is needed please consider using the Algorithm field only for CENC instead, e.g.

if encryption_scheme == 'cenc':
    protobuf_fields.append((1, 1))
else:
    four_cc = struct.unpack('>I', encryption_scheme.encode('ascii'))[0]
    protobuf_fields.append((9, four_cc))