[FFmpeg-devel] [PATCH] lavf/matroskaenc.c: use metadata key/value to set mastering metadata

Neil Birkbeck neil.birkbeck at gmail.com
Fri Nov 4 17:10:33 EET 2016


On Wed, Jun 8, 2016 at 11:27 PM, Dave Rice <dave at dericed.com> wrote:

>
> > On Jun 8, 2016, at 11:03 PM, Neil Birkbeck <neil.birkbeck at gmail.com>
> wrote:
> >
> > The most recent patch should still apply cleanly (unless we have a
> > better way to set these elements). Thanks
>
> There are specific mastering metadata elements as recently defined in the
> Matroska specification [1]. It would be better to use these defined
> elements from the specification rather than somehow fit this data into tags.
> Dave Rice
>
> [1] https://matroska.org/technical/specs/index.html#MasteringMetadata


Yes, the new elements are read and written, and are propagated within
ffmpeg in side data. This patch is to address how we can manually specify
those values when creating a new file from an input that doesn't have the
metadata already. The current patch doesn't write them to tags in the
output file, but uses the "metadata" command line. I kept this like
stereo_mode, but maybe we should instead use specific muxer option to do
this? Or perhaps there is another generic way to instantiate side data from
command line upstream from the muxer that I am missing.


>
>
> > On Tue, Apr 19, 2016 at 8:12 AM, Neil Birkbeck <neil.birkbeck at gmail.com>
> wrote:
> >> Updated patch attached.
> >>
> >> On Sat, Apr 16, 2016 at 7:08 PM, Michael Niedermayer
> >> <michael at niedermayer.cc> wrote:
> >>> On Sun, Apr 03, 2016 at 03:38:33PM -0700, Neil Birkbeck wrote:
> >>>> Use "master_display" key/value pair to specify mastering metadata in a
> >>>> similar formatting as accepted by libx265 (unless there is some other
> >>>> generic way to add side data to a stream from command line).
> >>>> Currently, the packet side data propagates from an input file to
> >>>> output file if it is transmuxed (mkv -> mkv). Perhaps we want to also
> >>>> use this same metadata key in matroskadec to also allow for the
> >>>> metadata to propagate during transcoding.
> >>>
> >>>> matroskaenc.c |   51 ++++++++++++++++++++++++++++++
> +++++++++++++++++----
> >>>> 1 file changed, 47 insertions(+), 4 deletions(-)
> >>>> d92564f3ec6cf08430a79b64f4d1ec304637afe1
> 0001-lavf-matroskaenc.c-use-metadata-key-value-to-set-mas.patch
> >>>> From b30d80f6ba4b09811039f64af3e7f709d86df5fe Mon Sep 17 00:00:00
> 2001
> >>>> From: Neil Birkbeck <neil.birkbeck at gmail.com>
> >>>> Date: Fri, 1 Apr 2016 17:02:42 -0700
> >>>> Subject: [PATCH] lavf/matroskaenc.c: use metadata key/value to set
> mastering
> >>>> metadata
> >>>>
> >>>> Add key/value metadata interface to allow command line setting of
> AVMasteringDisplayMetadata. The formatting is the same as the option in
> libx265.
> >>>>
> >>>> Signed-off-by: Neil Birkbeck <neil.birkbeck at gmail.com>
> >>>
> >>> this does not apply cleanly anymore after codecpar
> >>>
> >>> Applying: lavf/matroskaenc.c: use metadata key/value to set mastering
> metadata
> >>> Using index info to reconstruct a base tree...
> >>> Falling back to patching base and 3-way merge...
> >>> Auto-merging libavformat/matroskaenc.c
> >>> CONFLICT (content): Merge conflict in libavformat/matroskaenc.c
> >>> Failed to merge in the changes.
> >>> Patch failed at 0001 lavf/matroskaenc.c: use metadata key/value to set
> mastering metadata
> >>> When you have resolved this problem run "git am --resolved".
> >>> If you would prefer to skip this patch, instead run "git am --skip".
> >>> To restore the original branch and stop patching run "git am --abort".
> >>>
> >>>
> >>> [...]
> >>>
> >>> --
> >>> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC7
> 87040B0FAB
> >>>
> >>> Democracy is the form of government in which you can choose your
> dictator
> >>>
> >>> _______________________________________________
> >>> ffmpeg-devel mailing list
> >>> ffmpeg-devel at ffmpeg.org
> >>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >>>
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavf-matroskaenc.c-use-metadata-key-value-to-set-mas.patch
Type: text/x-patch
Size: 4751 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20161104/77f38c69/attachment.bin>


More information about the ffmpeg-devel mailing list