[Ffmpeg-devel] [PATCH] dumping support for encrypted MXFs
Baptiste Coudurier
baptiste.coudurier
Wed Jan 10 13:45:55 CET 2007
Hi
Reimar D?ffinger wrote:
> Hello,
> attached patch would at least allow dumping of encrypted streams with
> MPlayer's -dumpvideo/-dumpaudio.
> This is not too useful and a bit hackish (since there is no indication
> whether we have an encrypted stream or not), but on the other hand it
> still seems like an improvement over the current treatment (mxf_read_header
> parses the file until EOF).
>
> Greetings,
> Reimar D?ffinger
>
> [...]
>
> @@ -1062,7 +1065,8 @@
> seconds = av_rescale(sample_time, st->time_base.num, st->time_base.den);
> url_fseek(&s->pb, (s->bit_rate * seconds) >> 3, SEEK_SET);
> if (!mxf_read_sync(&s->pb, mxf_essence_element_key, 12))
> - return -1;
> + if (!mxf_read_sync(&s->pb, mxf_enc_essence_element_key, 12))
> + return -1;
>
> /* found KLV key */
> url_fseek(&s->pb, -12, SEEK_CUR);
>
That won't work since mxf_read_sync will always match essence element
key since it is present within encrypted triplet, and mxf_read_sync will
read until EOF is reached, so you need to seek back (yes that's a bit ugly).
I would prefer to use mxf_encrypted_triplet_key like in specs, and it is
a complete key (16 bytes) according to specs.
It seems to work because there is an hack when mxf only contains one
track, what if multiple streams are encrypted ?
You need to parse further into the encrypted triplet to get track number .
Im ok with the patch besides that.
Nice to see you are working on DCI D-Cinema files.
--
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A. http://www.smartjog.com
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312
More information about the ffmpeg-devel
mailing list