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

2016-11-04 Thread Neil Birkbeck
On Wed, Jun 8, 2016 at 11:27 PM, Dave Rice  wrote:

>
> > On Jun 8, 2016, at 11:03 PM, Neil Birkbeck 
> 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 
> wrote:
> >> Updated patch attached.
> >>
> >> On Sat, Apr 16, 2016 at 7:08 PM, Michael Niedermayer
> >>  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 
>  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 
> >>>
> >>> 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@ffmpeg.org
> >>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >>>
> > ___
> > ffmpeg-devel mailing list
> > ffmpeg-devel@ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
From e83d6ca87c7da2d6a9ff09dcec339cadc054610f Mon Sep 17 00:00:00 2001
From: Neil Birkbeck 
Date: Thu, 3 Nov 2016 17:13:03 -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 
---
 libavformat/matroskaenc.c | 49 ---
 1 file changed, 46 insertions(+), 3 deletions(-)

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 2cfeee9..4287171 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -804,17 +804,61 @@ static int mkv_write_codecprivate(AVFormatContext *s, AVIOContext *pb,
 }
 
 static 

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

2016-06-09 Thread Dave Rice

> On Jun 8, 2016, at 11:03 PM, Neil Birkbeck  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

> On Tue, Apr 19, 2016 at 8:12 AM, Neil Birkbeck  
> wrote:
>> Updated patch attached.
>> 
>> On Sat, Apr 16, 2016 at 7:08 PM, Michael Niedermayer
>>  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 
 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 
>>> 
>>> 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: 9FF2128B147EF6730BADF133611EC787040B0FAB
>>> 
>>> Democracy is the form of government in which you can choose your dictator
>>> 
>>> ___
>>> ffmpeg-devel mailing list
>>> ffmpeg-devel@ffmpeg.org
>>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>> 
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


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

2016-06-08 Thread Neil Birkbeck
The most recent patch should still apply cleanly (unless we have a
better way to set these elements). Thanks

On Tue, Apr 19, 2016 at 8:12 AM, Neil Birkbeck  wrote:
> Updated patch attached.
>
> On Sat, Apr 16, 2016 at 7:08 PM, Michael Niedermayer
>  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 
>>> 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 
>>
>> 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: 9FF2128B147EF6730BADF133611EC787040B0FAB
>>
>> Democracy is the form of government in which you can choose your dictator
>>
>> ___
>> ffmpeg-devel mailing list
>> ffmpeg-devel@ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


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

2016-04-19 Thread Neil Birkbeck
Updated patch attached.

On Sat, Apr 16, 2016 at 7:08 PM, Michael Niedermayer
 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 
>> 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 
>
> 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: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Democracy is the form of government in which you can choose your dictator
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


0001-lavf-matroskaenc.c-use-metadata-key-value-to-set-mas.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


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

2016-04-16 Thread Michael Niedermayer
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 
> 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 

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: 9FF2128B147EF6730BADF133611EC787040B0FAB

Democracy is the form of government in which you can choose your dictator


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


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

2016-04-11 Thread Neil Birkbeck
We've added support for the correct elements in matroskadec and matroskaenc:
https://github.com/FFmpeg/FFmpeg/commit/e7e5c5e6c4d7e85531bd90a84cbd35c3d84f0453
https://github.com/FFmpeg/FFmpeg/commit/bbda13a7713b8ae8c725c5bb774ac45d614b34eb

The intention of this patch is to expose a way to set this data via
the command-line, but in hindsight I see that wasn't clear in my
description. I'm proposing using the key/value pair on command line to
set the values, e.g.,

 -metadata:s:v:0
master-display="G(13248,34499)B(7500,2999)R(34000,15999)WP(15700,17550)L(1000,100)"

The value is not written in the matroska tags, only to the colour elements.

I'm happy to consider alternatives, but wasn't sure there was a
precedent for instantiating the packet side data from command line.

On Sun, Apr 3, 2016 at 5:13 PM, Dave Rice  wrote:
>
>> On Apr 3, 2016, at 6:38 PM, 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.
>> <0001-lavf-matroskaenc.c-use-metadata-key-value-to-set-mas.patch>___
>
> Wouldn’t it reduce confusion if the proposed MasteringMetadata elements[1] 
> were used rather than rather than storing the same data as Matroska tags?
>
> Dave Rice
>
> [1] as discussed on the CELLAR list 
> https://mailarchive.ietf.org/arch/msg/cellar/hIKLhMdgTMTEwUTeA4ct38h0tmE
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


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

2016-04-03 Thread Dave Rice

> On Apr 3, 2016, at 6:38 PM, 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.
> <0001-lavf-matroskaenc.c-use-metadata-key-value-to-set-mas.patch>___

Wouldn’t it reduce confusion if the proposed MasteringMetadata elements[1] were 
used rather than rather than storing the same data as Matroska tags?

Dave Rice

[1] as discussed on the CELLAR list 
https://mailarchive.ietf.org/arch/msg/cellar/hIKLhMdgTMTEwUTeA4ct38h0tmE
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel