[FFmpeg-devel] [PATCH] muxing chapters in matroska
Michael Niedermayer
michaelni
Fri Oct 16 13:14:30 CEST 2009
On Thu, Oct 15, 2009 at 06:54:10PM +0200, Anton Khirnov wrote:
> Hi,
> attached patches add support for muxing chapters to matroskaenc, and
> make ffmpeg.c copy chapters with other metadata.
>
> Anton Khirnov
> matroskaenc.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 48 insertions(+)
not mine, not reviewed
[...]
> ffmpeg.c | 7 +++++++
> 1 file changed, 7 insertions(+)
> 0469696dad7a0a7357bc64d0f5c0318f488623b1 0002-ffmpeg-copy-chapters-along-with-metadata.patch
> From 22f85272684315656463d41a3f397cda93d9d786 Mon Sep 17 00:00:00 2001
> From: Anton Khirnov <wyskas at gmail.com>
> Date: Thu, 15 Oct 2009 18:27:54 +0200
> Subject: [PATCH 2/2] ffmpeg: copy chapters along with metadata.
>
> ---
> ffmpeg.c | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/ffmpeg.c b/ffmpeg.c
> index 2988419..3e2e9dd 100644
> --- a/ffmpeg.c
> +++ b/ffmpeg.c
> @@ -2095,6 +2095,13 @@ static int av_encode(AVFormatContext **output_files,
> mtag=NULL;
> while((mtag=av_metadata_get(in_file->metadata, "", mtag, AV_METADATA_IGNORE_SUFFIX)))
> av_metadata_set(&out_file->metadata, mtag->key, mtag->value);
> +
> + for(j=0;j<in_file->nb_chapters;j++) {
> + AVChapter *oc, *ic = in_file->chapters[j];
> + oc = ff_new_chapter(out_file, ic->id, ic->time_base, ic->start, ic->end, NULL);
i dont think this is correct given -ss X and such that could change
timestamps but even without that the timestamps probably need some adjustment
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA
-------------- 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/20091016/533f8991/attachment.pgp>
More information about the ffmpeg-devel
mailing list