[FFmpeg-devel] [RFC] avcodec/avcodec.h: Add encryption info side data

Michael Niedermayer michael at niedermayer.cc
Sat Jan 6 00:18:33 EET 2018


On Mon, Dec 18, 2017 at 11:17:48AM -0800, Jacob Trimble wrote:
> >> @@ -1327,6 +1384,19 @@ enum AVPacketSideDataType {
> >>       */
> >>      AV_PKT_DATA_A53_CC,
> >>
> >> +    /**
> >> +     * This side data is encryption "initialization data".
> >> +     * For MP4 this is the entire 'pssh' box.
> >> +     * For WebM this is the key ID.
> >> +     */
> >> +    AV_PKT_DATA_ENCRYPTION_INIT_DATA,
> >
> > So its basically like extradata is for a codec ?
> > If so it should be defined similarly as opaque encryption scheme specific data.
> > It should not be container specific.
> > Data taken from one container should be storable in another if both support
> > the features used
> 
> Yes, that's the idea.  Unfortunately the data is specific to a
> container.  This isn't taken from the common encryption spec, but from
> the EME spec.  The "EME initialization data registry" specifies
> several fixed formats for initialization data that are all specific to
> a container.  <https://www.w3.org/TR/eme-initdata-registry/>
> 
> It would be possible to parse the PSSH boxes and just push the generic
> data to the app.  This would allow new containers to hold the same
> data; then the app could wrap it back in a generic PSSH box for EME.
> But that would remove the key ID information that exists in v1 PSSH
> boxes.  Some apps parse the PSSH boxes and filter the initialization
> based on whether they already have those key IDs to avoid creating too
> many sessions.  So I would like to expose the whole PSSH box in the
> side data so apps can do that.

The format of teh side data should be choosen so that demuxers and encoders
producing it can interoperate with muxers and decoders consuming it.

Please correct me if iam wrong but if some containers can store more than
others, then the "other" containers would not use that extra information nor
set it but it could still be using a compatible representation for interoperability


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180105/b20758fb/attachment.sig>


More information about the ffmpeg-devel mailing list