[FFmpeg-devel] [PATCH 3/3] lavf/movenc: support iTunes cover art

Michael Niedermayer michaelni at gmx.at
Tue Jul 2 22:43:39 CEST 2013


On Tue, Jul 02, 2013 at 09:33:04PM +0200, Matthieu Bouron wrote:
> On Tue, Jul 2, 2013 at 7:46 PM, Michael Niedermayer <michaelni at gmx.at>wrote:
> 
> > On Sun, Jun 30, 2013 at 04:15:46PM +0200, Matthieu Bouron wrote:
> > > Cover art muxing is done by introducing the -cover_stream_index option
> > > which takes an output stream index as argument.
> > > The stream used for the cover art is not muxed as a track in the
> > > resulting file.
> > > ---
> > >  libavformat/movenc.c     | 157
> > +++++++++++++++++++++++++++++++++++++++++++----
> > >  libavformat/movenc.h     |   5 ++
> > >  libavformat/movenchint.c |   1 +
> > >  3 files changed, 152 insertions(+), 11 deletions(-)
> > >
> > > diff --git a/libavformat/movenc.c b/libavformat/movenc.c
> > > index 5577530..f411493 100644
> > > --- a/libavformat/movenc.c
> > > +++ b/libavformat/movenc.c
> > > @@ -63,6 +63,7 @@ static const AVOption options[] = {
> > >      { "ism_lookahead", "Number of lookahead entries for ISM files",
> > offsetof(MOVMuxContext, ism_lookahead), AV_OPT_TYPE_INT, {.i64 = 0}, 0,
> > INT_MAX, AV_OPT_FLAG_ENCODING_PARAM},
> > >      { "use_editlist", "use edit list", offsetof(MOVMuxContext,
> > use_editlist), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 1,
> > AV_OPT_FLAG_ENCODING_PARAM},
> > >      { "video_track_timescale", "set timescale of all video tracks",
> > offsetof(MOVMuxContext, video_track_timescale), AV_OPT_TYPE_INT, {.i64 =
> > 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM},
> > > +    { "cover_stream_index", "video stream index to use for cover art",
> > offsetof(MOVMuxContext, cover_stream_index), AV_OPT_TYPE_INT, {.i64 = -1},
> > -1, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM},
> > >      { NULL },
> >
> > isnt AV_DISPOSITION_ATTACHED_PIC enough ?
> > why is this option needed ?
> >
> 
> I guess AV_DISPOSITION_ATTACHED_PIC could be enough.
> My idea here was to let the user choose the cover art from any output
> streams he likes with -cover_stream_index. If the input does not have any
> cover arts, can a custom stream be flagged as an attached pic ?

if it cannot then such feature should be added but certainly doesnt
belong in a single individual muxer

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

Many things microsoft did are stupid, but not doing something just because
microsoft did it is even more stupid. If everything ms did were stupid they
would be bankrupt already.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130702/a481eaf6/attachment.asc>


More information about the ffmpeg-devel mailing list