Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-31 Thread Michael Niedermayer
On Wed, Dec 30, 2015 at 09:53:35PM +, Eran Kornblau wrote: > > > Please let me know if you think that is ok, and I will resubmit the patch > > > with all fixes. > > > > should be ok > > > Updated patch attached, diff from previous patch is: > > --- a/libavformat/mov.c > +++ b/libavformat/mo

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-30 Thread Eran Kornblau
> > Please let me know if you think that is ok, and I will resubmit the patch > > with all fixes. > > should be ok > Updated patch attached, diff from previous patch is: --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -4026,6 +4026,14 @@ static int mov_read_frma(MOVContext *c, AVIOContext *p

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-30 Thread Michael Niedermayer
On Tue, Dec 29, 2015 at 08:05:28PM +, Eran Kornblau wrote: > > > > > +case MKTAG('e','n','c','v'):// encrypted video > > > > > +case MKTAG('e','n','c','a'):// encrypted audio > > > > > +id = mov_codec_id(st, format); > > > > > +st->codec->codec_id = id; >

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-29 Thread Eran Kornblau
> > > > +case MKTAG('e','n','c','v'):// encrypted video > > > > +case MKTAG('e','n','c','a'):// encrypted audio > > > > +id = mov_codec_id(st, format); > > > > +st->codec->codec_id = id; > > > > > > this seems missing a check for st->codec->codec_id being "u

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-29 Thread Michael Niedermayer
On Mon, Dec 28, 2015 at 09:27:41PM +, Eran Kornblau wrote: > > > +case MKTAG('e','n','c','v'):// encrypted video > > > +case MKTAG('e','n','c','a'):// encrypted audio > > > +id = mov_codec_id(st, format); > > > +st->codec->codec_id = id; > > > > this see

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-28 Thread Eran Kornblau
> > +case MKTAG('e','n','c','v'):// encrypted video > > +case MKTAG('e','n','c','a'):// encrypted audio > > +id = mov_codec_id(st, format); > > +st->codec->codec_id = id; > > this seems missing a check for st->codec->codec_id being "unset" > before setting i

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-28 Thread Michael Niedermayer
On Mon, Dec 28, 2015 at 05:29:35AM +, Eran Kornblau wrote: > Bumping up this thread (latest patch attached) > > Happy holidays ! happy holidays as well! > > Eran > [...] > @@ -4007,6 +4009,162 @@ static int mov_read_free(MOVContext *c, AVIOContext > *pb, MOVAtom atom) > return 0; >

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-27 Thread Eran Kornblau
Bumping up this thread (latest patch attached) Happy holidays ! Eran 0001-mov-support-cenc-common-encryption.patch Description: 0001-mov-support-cenc-common-encryption.patch ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mail

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-22 Thread Eran Kornblau
> you are not subscribed (with this email address you used here at least > it seems) > Right, apparently the subscription confirmation message went to the junk folder... Anyway, glad this one is now resolved :-) and sorry for the trouble. > > > > > > > +id = mov_codec_id(st, format); > > > >

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-22 Thread Michael Niedermayer
On Tue, Dec 22, 2015 at 07:36:41AM +, Eran Kornblau wrote: > > > You're right, didn't know that. > > > Please let me know if there are any changes you want me to apply in order > > > to push the third one (decryption support). > > > > sounds like you missed: > > http://ffmpeg.org/pipermail/ff

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-21 Thread Eran Kornblau
> > You're right, didn't know that. > > Please let me know if there are any changes you want me to apply in order > > to push the third one (decryption support). > > sounds like you missed: > http://ffmpeg.org/pipermail/ffmpeg-devel/2015-December/185235.html > http://ffmpeg.org/pipermail/ffmpeg-d

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-21 Thread Michael Niedermayer
On Mon, Dec 21, 2015 at 07:19:45PM +, Eran Kornblau wrote: > > > > Weren't patches 1&2 already applied? > > http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=23ac99dc > > http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=4469e8eb > > > You're right, didn't know that. > Please let me kno

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-21 Thread Eran Kornblau
> > Weren't patches 1&2 already applied? > http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=23ac99dc > http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=4469e8eb > You're right, didn't know that. Please let me know if there are any changes you want me to apply in order to push the third o

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-21 Thread Carl Eugen Hoyos
Eran Kornblau kaltura.com> writes: > Bumping up this thread, would love to see this getting merged > (attaching the same patch files) Weren't patches 1&2 already applied? http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=23ac99dc http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=4469e8eb

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-21 Thread Eran Kornblau
Bumping up this thread, would love to see this getting merged (attaching the same patch files) Thank you Eran 0001-libavutil-add-aes-ctr-support.patch Description: 0001-libavutil-add-aes-ctr-support.patch 0002-movenc-support-cenc-common-encryption.patch Description: 0002-movenc-support-cenc-

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-15 Thread Michael Niedermayer
On Tue, Dec 15, 2015 at 09:16:11AM +, Eran Kornblau wrote: > > > > using a random IV value would break any regression tests > > see AVFMT_FLAG_BITEXACT > > > Fixed, only generating a random IV when bitexact is not enabled. > Updated patch files attached. > > > > > is this filling in a rando

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-15 Thread Michael Niedermayer
On Tue, Dec 15, 2015 at 09:16:11AM +, Eran Kornblau wrote: [...] > @@ -4007,6 +4008,147 @@ static int mov_read_free(MOVContext *c, AVIOContext > *pb, MOVAtom atom) > return 0; > } > > +static int mov_read_frma(MOVContext *c, AVIOContext *pb, MOVAtom atom) > +{ > +uint32_t format =

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-15 Thread Eran Kornblau
> > > > +struct AVAESCTR; > > Is this needed? > Indeed compiles for me without it, I matched the existing code in aes.h, and in general I prefer to define the structs in advance. If you prefer that I will remove it, please let me know > > +subsample_count = AV_RB16(sc->cenc.auxiliary_info_

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-15 Thread Eran Kornblau
> are these encrypted mp4 files some kind of standard encryption? > Yes, these files conform to the common encryption specification ISO/IEC 23001-7 > rephrased... will encrypted files created by ffmpeg be able to be > decrypted/decoded and played by quicktime? or any other player? > (assuming oth

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-15 Thread Eran Kornblau
> > using a random IV value would break any regression tests > see AVFMT_FLAG_BITEXACT > Fixed, only generating a random IV when bitexact is not enabled. Updated patch files attached. > > is this filling in a random IV that later is overridden ? > random_seed() can be slow so it would be better

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-14 Thread Carl Eugen Hoyos
Hi! On Monday 14 December 2015 09:25:01 am Eran Kornblau wrote: > diff --git a/libavformat/isom.h b/libavformat/isom.h > index a082e40..3b0230a 100644 > --- a/libavformat/isom.h > +++ b/libavformat/isom.h > @@ -37,6 +37,8 @@ extern const AVCodecTag ff_codec_movsubtitle_tags[]; > int ff_mov_iso63

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-14 Thread Jan Ekstrom
On Mon, Dec 14, 2015 at 10:48 PM, compn wrote: > dumb question > > are these encrypted mp4 files some kind of standard encryption? > > rephrased... will encrypted files created by ffmpeg be able to be > decrypted/decoded and played by quicktime? or any other player? > (assuming other player ha

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-14 Thread compn
On Mon, 14 Dec 2015 08:25:01 + Eran Kornblau wrote: > Hi, > > Bumping up this thread... please let me if you want me to make any > additional changes or this can be merged. Attaching the patch files > again (same ones I sent in my last post) dumb question are these encrypted mp4 files

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-14 Thread Michael Niedermayer
On Mon, Dec 14, 2015 at 08:25:01AM +, Eran Kornblau wrote: > Hi, > > Bumping up this thread... please let me if you want me to make any additional > changes or this can be merged. > Attaching the patch files again (same ones I sent in my last post) [...] > +int ff_mov_cenc_init(MOVMuxCencCon

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-14 Thread Eran Kornblau
Hi, Bumping up this thread... please let me if you want me to make any additional changes or this can be merged. Attaching the patch files again (same ones I sent in my last post) Thank you Eran 0001-libavutil-add-aes-ctr-support.patch Description: 0001-libavutil-add-aes-ctr-support.patch 0

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-07 Thread Ganesh Ajjanagadde
On Mon, Dec 7, 2015 at 7:01 AM, Eran Kornblau wrote: >> >> changes to libavutil and libavformat should likely be in seperate >> patches/commits, more generally any independant changes should be >> in seperate patches (i dont know if there are any other changes that >> should be split off) >> > Don

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-07 Thread Eran Kornblau
> > changes to libavutil and libavformat should likely be in seperate > patches/commits, more generally any independant changes should be > in seperate patches (i dont know if there are any other changes that > should be split off) > Done, new patch files attached, I also included the patch for d

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-06 Thread Michael Niedermayer
On Sun, Dec 06, 2015 at 03:42:34PM +, Eran Kornblau wrote: > Hi, > > Sorry for spamming, ran some more tests and found a bug in my patch, updated > patch file attached. > The bug was that in case subsample encryption was enabled (the default for > AVC) the subsample size > reported in the 's

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-06 Thread Eran Kornblau
Hi, Sorry for spamming, ran some more tests and found a bug in my patch, updated patch file attached. The bug was that in case subsample encryption was enabled (the default for AVC) the subsample size reported in the 'saiz' atom was wrong - it did not include the size of the IV. I originally tes

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-06 Thread Eran Kornblau
Hi > One more question: Is FFmpeg able to decrypt the files (if the keys are > available)? If not, it would be nice if you could also add the decryption > function... > (I only realize now that the subject promises both.) > In any case, a fate test will be needed (but is not necessarily part of

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-06 Thread Carl Eugen Hoyos
Hi! On Saturday 05 December 2015 09:16:22 pm Eran Kornblau wrote: > Fixed the else convention and squashed all commits into one, the updated > patch is attached. Thank you! One more question: Is FFmpeg able to decrypt the files (if the keys are available)? If not, it would be nice if you could

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-05 Thread Eran Kornblau
Hi > No, please merge them (without adding trailing whitespace, it cannot > be committed to our repository). > While at it, please fix this nit (several times): > > +} > > +else { > > should be on one line, there is tools/patcheck that should have told > you (and also tells you about tr

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-05 Thread Carl Eugen Hoyos
Hi! On Saturday 05 December 2015 12:17:56 am Eran Kornblau wrote: > > Please send the patches to the mailing list. See > > https://github.com/FFmpeg/FFmpeg/pull/153 > > Attached, note there are two files, the second commit is just a tiny > fix to a bug in the first one, hope that's ok. No, pleas

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-04 Thread Eran Kornblau
> Hi, > > Please do not top post. > Sorry, I hope this one comes out fine, didn't find a reasonable way to do it with Outlook ;-( > > Please send the patches to the mailing list. See > https://github.com/FFmpeg/FFmpeg/pull/153 > Attached, note there are two files, the second commit is just a tiny

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-04 Thread Timothy Gu
Hi, Please do not top post. On Fri, Dec 4, 2015 at 10:57 AM Eran Kornblau wrote: > Thank you ! > > Opened a pull request here: https://github.com/FFmpeg/FFmpeg/pull/162 > Please send the patches to the mailing list. See https://github.com/FFmpeg/FFmpeg/pull/153 > I used libavutil/aes as you

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-12-04 Thread Eran Kornblau
vember 25, 2015 1:56 AM To: FFmpeg development discussions and patches Cc: Eran Kornblau ; Eran Etam Subject: Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files On Tue, 24 Nov 2015 12:10:43 + Eran Kornblau wrote: > Before we start working on this feature, since we really

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-11-24 Thread compn
On Tue, 24 Nov 2015 12:10:43 + Eran Kornblau wrote: > Before we start working on this feature, since we really prefer not > to manage our own fork of the code, we wanted to check with you > whether you will be willing to merge such a feature ? (assuming it > conforms to the coding standards, n

Re: [FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-11-24 Thread Paul B Mahol
On 11/24/15, Eran Kornblau wrote: > Hi all, > > We're thinking about adding support for MP4 files encrypted using the CENC > scheme to ffmpeg (such as the ones supported by GPAC - > https://gpac.wp.mines-telecom.fr/mp4box/encryption/common-encryption/) > The motivation is to be able to transcode f

[FFmpeg-devel] support for reading / writing encrypted MP4 files

2015-11-24 Thread Eran Kornblau
Hi all, We're thinking about adding support for MP4 files encrypted using the CENC scheme to ffmpeg (such as the ones supported by GPAC - https://gpac.wp.mines-telecom.fr/mp4box/encryption/common-encryption/) The motivation is to be able to transcode files without having the media ever resident