[FFmpeg-devel] [PATCH 1/1] avformat/movenc: use modern iTunes copyright atom
Timo Teras
timo.teras at iki.fi
Fri Mar 30 04:06:03 EEST 2018
On Fri, 30 Mar 2018 02:39:13 +0200
Michael Niedermayer <michael at niedermayer.cc> wrote:
> On Thu, Mar 29, 2018 at 10:12:50PM +0300, Timo Teras wrote:
> > On Thu, 29 Mar 2018 20:29:44 +0200
> > Michael Niedermayer <michael at niedermayer.cc> wrote:
> >
> > > On Wed, Mar 28, 2018 at 07:02:48PM +0300, Timo Teräs wrote:
> > > > iTunes currently uses the 'cprt' atom to store the copyright
> > > > notice and this patch fixes compatibility with majority of
> > > > software that supports the 'ilst' atom. Other software and
> > > > documentation using this:
> > > > - AtomicParseley encodes and parses only 'cprt'
> > > > - Most players recognize only 'cprt'
> > > > -
> > > > https://sno.phy.queensu.ca/~phil/exiftool/TagNames/QuickTime.html
> > > > documents both tag types
> > > > - http://mutagen.readthedocs.io/en/latest/api/mp4.html
> > > > documents only 'cprt'
> > > >
> > > > ffmpeg mov reader properly parses the 'cprt' tag inside 'ilst'
> > > > tag and functions correctly with streams produced with this
> > > > commit.
> > > >
> > > > Since 'cprt' seems to be the current correct atom, it is used by
> > > > default. "-movflags legacy_copyright" option is added to revert
> > > > back to the old atom type in case that is needed.
> > > >
> > > > Signed-off-by: Timo Teräs <timo.teras at iki.fi>
> > > > ---
> > > > If the legacy option is not needed, I'm happy to resend patch
> > > > just changing the atom types.
> > >
> > > why dont you store both ?
> > > the old should do no harm or am i missing something ?
> > > and it avoids the need for the user parameter (which few will
> > > find if they run in a file that doesnt work)
> >
> > AFAIK, 'cprt' is the canonical tag and always has been for iTunes
> > list. I tried to look where the current ffmpeg atom came from, but
> > did not find anything conclusive. It might be copy paste error on
> > ffmpeg from other container variants, and others who supports it in
> > iTunes list is to support ffmpeg generated .movs.
>
> git log points to
> bed4fc54c947b9e36d2103b400d438bfb4dd80dd
>
> This commit added both cpy and cprt, that makes your hypothesis not
> fit very well
That commit adds it to three places:
- MOV mode which is basically in mov_write_udta_tag() using '\251cpy'
which published in Apple docs
- 3GP mode using 'cprt' which is in ISO standard
- mov_write_ilst_tag() is iTunes which is non-documented
The commit adds exactly one tag to each variant. To me my hyptothesis
still looks correct.
> did you ask the author, who added this ? Maybe he remembers where it
> came from.
> It would be better to understand where it came from before its changed
@Baptiste: Any comment why \251cpy tag was used for iTunes list and not
cprt?
> If it was a typo or something like that, i agree that it should be
> removed/replaced. I was assuming it come from some official
> reference/software ...
iTunes list format is unfortunately not documented. MOV and 3GP modes
are standardized.
Timo
More information about the ffmpeg-devel
mailing list