[FFmpeg-devel] [PATCH]ffmpeg.c: add option for copying chapters

Michael Niedermayer michaelni
Sun Feb 28 23:15:05 CET 2010


On Sun, Feb 28, 2010 at 10:19:59PM +0100, Anton Khirnov wrote:
> On Sun, Feb 28, 2010 at 07:37:18PM +0100, Michael Niedermayer wrote:
> > On Thu, Feb 25, 2010 at 04:05:33PM +0100, Anton Khirnov wrote:
> > > Hi,
> > > 
> > > $subj
> > > 
> > > Anton Khirnov
> > 
> > >  doc/ffmpeg-doc.texi |    3 ++
> > >  ffmpeg.c            |   78 +++++++++++++++++++++++++++++++++++++++++++++++++++-
> > >  2 files changed, 80 insertions(+), 1 deletion(-)
> > > 6365bd394dd3a804132673b6d607cd25c864a6a9  0001-ffmpeg.c-add-map_chapters-option-for-copying-chapter.patch
> > > From 875650637e70521632526f8776697fe3d6f02dcc Mon Sep 17 00:00:00 2001
> > > From: Anton Khirnov <wyskas at gmail.com>
> > > Date: Wed, 24 Feb 2010 23:00:31 +0100
> > > Subject: [PATCH] ffmpeg.c: add -map_chapters option for copying chapters.
> > > 
> > > ---
> > >  doc/ffmpeg-doc.texi |    3 ++
> > >  ffmpeg.c            |   78 ++++++++++++++++++++++++++++++++++++++++++++++++++-
> > >  2 files changed, 80 insertions(+), 1 deletions(-)
> > > 
> > > diff --git a/doc/ffmpeg-doc.texi b/doc/ffmpeg-doc.texi
> > > index 2a5313c..ea90148 100644
> > > --- a/doc/ffmpeg-doc.texi
> > > +++ b/doc/ffmpeg-doc.texi
> > > @@ -729,6 +729,9 @@ Set stream mapping from input streams to output streams.
> > >  Just enumerate the input streams in the order you want them in the output.
> > >  @var{sync_stream_id} if specified sets the input stream to sync
> > >  against.
> > > + at item -map_chapters @var{infile}[:@var{chapter}]
> > > +Copy chapters from input streams to output streams. If @var{chapter}
> > > +is omitted, then all chapters are copied.
> > 
> > why is it not just copying the chapters that apply (-ss/-t wise)
> > what use case is there for copying just 1 chapter ?
> > 
> you might want to keep only some chapters, for whatever reason,
> like there's too many of them or some are incorrect.

you might want to edit chapters but this doesnt do it

if you have 20 chapters and split the video onto 2 dvds with 10 chaps
each, one would have to by hand specify 10 chapters.
we arent specifying 60000 frames by hand either when transcoding a
stream.
i simply think this patch introduces a user interface that is
not very convenient. And an implementation that is not scaleable

Convenient-> dump metadata to file, edit with text editor, load
we should have one single option to add metadata and specify in this
option to what stream if any and what time if any it applies.
Mapping metadata if you want it could be done with wildcards like

like:
-map_meta file0:global:auth*->file1:stream1

would copy all metadata matching 'auth*' from per file metadata from
file0 to stream1 of file1

with the 1 option for each possible way to copy you just have an explosion
of needed options and code, programs, chapters, streams, global
thats 4 to just copy within them.
But users will want to split a file of several chapters so there would be
1 chapter per file (here chapter metadata becomes global metadata)
or do the inverse and merge 2 videos like terminator 1 and 2.
here global becomes chapters.

maybe this isnt easy and maybe it has problems but it definitly looks
nicer to me to avoid adding gazillions of options for metadata

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

The real ebay dictionary, page 2
"100% positive feedback" - "All either got their money back or didnt complain"
"Best seller ever, very honest" - "Seller refunded buyer after failed scam"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100228/f6c21456/attachment.pgp>



More information about the ffmpeg-devel mailing list