Re: [FFmpeg-user] Setting colour range.

2018-11-29 Thread Kevin Wheatley
from memory only ISO movies have the option of adding the range bit to
the ATOM, QuickTime (.mov) does not.

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

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Setting colour range.

2018-11-27 Thread Martin Vignali
>
> I think prores encoder will soon get color_range writing from prores_ks.


Doesn't seems like prores_ks do something about color_range.
The color difference between prores_ks and aw, have been fixed, by setting
the color prim, trc, space in prores frame header in prores_aw
(already in master, patch on mailing list about this, are only to restrict
the valid values)

As far as i know, quicktime (and prores), doesn't have a way to set as full
or legal range.
need to be interpreted as legal by default, but some app can use the
outside range information (like super white).

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

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Setting colour range.

2018-11-27 Thread Paul B Mahol
On 11/27/18, Kieran O Leary  wrote:
> On Tue, Nov 27, 2018 at 8:03 PM Dave Rice  wrote:
>
>>
>> > On Nov 27, 2018, at 10:29 AM, Kieran O Leary 
>> wrote:
>> >
>> > On Tue, 27 Nov 2018, 15:21 Paul B Mahol > one...@gmail.com> wrote:
>> >
>> >> On 11/27/18, Kieran O'Leary  wrote:
>> >>> When creating MOV files, setting the -color_range option does not seem
>> to
>> >>> have any effect. What am I doing wrong? Could it have anything to do
>> with
>> >>> the removal of the yuvj pixel formats?
>> >>> Is setting this metadata even possible in the MOV container, or is it
>> >>> something that is expected to be flagged at the stream level? I was
>> >> having
>> >>> difficulty finding info on where this info is even located in a file
>> >>> in
>> >>> both:
>> >>>
>> https://developer.apple.com/library/archive/technotes/tn2162/_index.html
>> >> and
>> >>>
>> >>
>> https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFPreface/qtffPreface.html
>> >>>
>> >>> Worrying, if I set a value of jpeg, mpeg, or 0, ffprobe says that the
>> >> file
>> >>> has TV range.
>> >>>
>> >>> How to replicate:
>> >>>
>> >>> $ ./ffmpeg -f lavfi -i testsrc  -color_range jpeg -c:v prores -t 1
>> >>> prores_jpeg.mov
>> >>
>> >> That encoder incorrectly never changes color range.
>> >>
>> >
>> > Can this metadata ever be set at a container level for mov? Must it
>> always
>> > be the stream that holds this info?
>>
>> By default the colr atom is not written by ffmpeg, even when mandated
>> (such as described in TN2162 for uncompressed in QuickTime). You can
>> enable
>> the colr atom while muxing by adding, -movflags write_colr. It’s been over
>> 4 years since Vittorio added colr atom support, perhaps time to consider
>> making it enabled by default.
>> Dave Rice
>>
>
> I tried adding the -movflags +write_colr argument in my testing but it
> didn't do anything. And it looks like the colr atom doesn't store a value
> for colour range anyhow:
> https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap3/qtff3.html
> But +1 to enabling by default.

I think prores encoder will soon get color_range writing from prores_ks.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Setting colour range.

2018-11-27 Thread Kieran O Leary
On Tue, Nov 27, 2018 at 8:03 PM Dave Rice  wrote:

>
> > On Nov 27, 2018, at 10:29 AM, Kieran O Leary 
> wrote:
> >
> > On Tue, 27 Nov 2018, 15:21 Paul B Mahol  one...@gmail.com> wrote:
> >
> >> On 11/27/18, Kieran O'Leary  wrote:
> >>> When creating MOV files, setting the -color_range option does not seem
> to
> >>> have any effect. What am I doing wrong? Could it have anything to do
> with
> >>> the removal of the yuvj pixel formats?
> >>> Is setting this metadata even possible in the MOV container, or is it
> >>> something that is expected to be flagged at the stream level? I was
> >> having
> >>> difficulty finding info on where this info is even located in a file in
> >>> both:
> >>>
> https://developer.apple.com/library/archive/technotes/tn2162/_index.html
> >> and
> >>>
> >>
> https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFPreface/qtffPreface.html
> >>>
> >>> Worrying, if I set a value of jpeg, mpeg, or 0, ffprobe says that the
> >> file
> >>> has TV range.
> >>>
> >>> How to replicate:
> >>>
> >>> $ ./ffmpeg -f lavfi -i testsrc  -color_range jpeg -c:v prores -t 1
> >>> prores_jpeg.mov
> >>
> >> That encoder incorrectly never changes color range.
> >>
> >
> > Can this metadata ever be set at a container level for mov? Must it
> always
> > be the stream that holds this info?
>
> By default the colr atom is not written by ffmpeg, even when mandated
> (such as described in TN2162 for uncompressed in QuickTime). You can enable
> the colr atom while muxing by adding, -movflags write_colr. It’s been over
> 4 years since Vittorio added colr atom support, perhaps time to consider
> making it enabled by default.
> Dave Rice
>

I tried adding the -movflags +write_colr argument in my testing but it
didn't do anything. And it looks like the colr atom doesn't store a value
for colour range anyhow:
https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap3/qtff3.html
But +1 to enabling by default.

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

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Setting colour range.

2018-11-27 Thread Dave Rice

> On Nov 27, 2018, at 10:29 AM, Kieran O Leary  wrote:
> 
> On Tue, 27 Nov 2018, 15:21 Paul B Mahol   wrote:
> 
>> On 11/27/18, Kieran O'Leary  wrote:
>>> When creating MOV files, setting the -color_range option does not seem to
>>> have any effect. What am I doing wrong? Could it have anything to do with
>>> the removal of the yuvj pixel formats?
>>> Is setting this metadata even possible in the MOV container, or is it
>>> something that is expected to be flagged at the stream level? I was
>> having
>>> difficulty finding info on where this info is even located in a file in
>>> both:
>>> https://developer.apple.com/library/archive/technotes/tn2162/_index.html
>> and
>>> 
>> https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFPreface/qtffPreface.html
>>> 
>>> Worrying, if I set a value of jpeg, mpeg, or 0, ffprobe says that the
>> file
>>> has TV range.
>>> 
>>> How to replicate:
>>> 
>>> $ ./ffmpeg -f lavfi -i testsrc  -color_range jpeg -c:v prores -t 1
>>> prores_jpeg.mov
>> 
>> That encoder incorrectly never changes color range.
>> 
> 
> Can this metadata ever be set at a container level for mov? Must it always
> be the stream that holds this info?

By default the colr atom is not written by ffmpeg, even when mandated (such as 
described in TN2162 for uncompressed in QuickTime). You can enable the colr 
atom while muxing by adding, -movflags write_colr. It’s been over 4 years since 
Vittorio added colr atom support, perhaps time to consider making it enabled by 
default.
Dave Rice 

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

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Setting colour range.

2018-11-27 Thread Kieran O Leary
On Tue, 27 Nov 2018, 15:56 Gyan Doshi  On 27-11-2018 09:17 PM, Gyan Doshi wrote:
> > On 27-11-2018 08:59 PM, Kieran O Leary wrote:
> >
> >>
> >> Can this metadata ever be set at a container level for mov? Must it
> >> always
> >> be the stream that holds this info?
> >
> > The muxer only writes it for MP4s,
> >
> > The QT spec doesn't accommodate its signaling :
> >
>
> >
> https://developer.apple.com/library/archive/technotes/tn2162/_index.html#//apple_ref/doc/uid/DTS40013070-CH1-TNTAG7
>
> Correction. Meant to quote this,
>
>  "The remaining component values (e.g., 1-15 and 241-254 for n=8
> bits and 4-63 and 961-1019 for n=10 bits) accommodate occasional filter
> undershoot and overshoot in image processing. In some applications,
> these values are used to carry other information (e.g., transparency).
> The writer of a QuickTime image may use these values and the reader of a
> QuickTime image must expect these values."
>
> This implies that 'these values' is treated as 'other information'
> rather than range expansion.
>

This is wonderful. No wonder I could find no information in the atom
description regarding these values! I thought that the colr atom would be
where it was stored.

Thanks Gyan,

Kieran O'Leary
Irish Film Institute
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Setting colour range.

2018-11-27 Thread Gyan Doshi

On 27-11-2018 09:17 PM, Gyan Doshi wrote:

On 27-11-2018 08:59 PM, Kieran O Leary wrote:



Can this metadata ever be set at a container level for mov? Must it 
always

be the stream that holds this info?


The muxer only writes it for MP4s,

The QT spec doesn't accommodate its signaling :



https://developer.apple.com/library/archive/technotes/tn2162/_index.html#//apple_ref/doc/uid/DTS40013070-CH1-TNTAG7 


Correction. Meant to quote this,

"The remaining component values (e.g., 1-15 and 241-254 for n=8 
bits and 4-63 and 961-1019 for n=10 bits) accommodate occasional filter 
undershoot and overshoot in image processing. In some applications, 
these values are used to carry other information (e.g., transparency). 
The writer of a QuickTime image may use these values and the reader of a 
QuickTime image must expect these values."


This implies that 'these values' is treated as 'other information' 
rather than range expansion.



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

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Setting colour range.

2018-11-27 Thread Gyan Doshi

On 27-11-2018 08:59 PM, Kieran O Leary wrote:



Can this metadata ever be set at a container level for mov? Must it always
be the stream that holds this info?


The muxer only writes it for MP4s,

The QT spec doesn't accommodate its signaling :

"In scheme A, Cb and Cr have a 2n-2 (254 for n=8 bits) excursion 
while Y´ has a 2n-1 (255 for n=8 bits) excursion. Furthermore, ECb=0 and 
ECr=0 imply Cb=0 and Cr=0, respectively (Cb and Cr have a 0 center). You 
may encounter video data with two's complement Cb and Cr components that 
have other excursions and centers. In particular, you may encounter data 
with a 2n-1 (255 for n=8 bits) excursion and a -0.5 center, which is 
known as a "Full-Range" mapping. You may also encounter data with a 2n 
excursion (256 for n=8 bits) and a 0 center. These forms of data are not 
representable using the labels described in this document. Be sure to 
convert the data properly when bringing it into QuickTime using a 
compression type from this document. Failure to so could, for example, 
incorrectly generate the value -2n-1."


from


https://developer.apple.com/library/archive/technotes/tn2162/_index.html#//apple_ref/doc/uid/DTS40013070-CH1-TNTAG7



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

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Setting colour range.

2018-11-27 Thread Kieran O Leary
On Tue, 27 Nov 2018, 15:21 Paul B Mahol  On 11/27/18, Kieran O'Leary  wrote:
> > When creating MOV files, setting the -color_range option does not seem to
> > have any effect. What am I doing wrong? Could it have anything to do with
> > the removal of the yuvj pixel formats?
> > Is setting this metadata even possible in the MOV container, or is it
> > something that is expected to be flagged at the stream level? I was
> having
> > difficulty finding info on where this info is even located in a file in
> > both:
> > https://developer.apple.com/library/archive/technotes/tn2162/_index.html
> and
> >
> https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFPreface/qtffPreface.html
> >
> > Worrying, if I set a value of jpeg, mpeg, or 0, ffprobe says that the
> file
> > has TV range.
> >
> > How to replicate:
> >
> > $ ./ffmpeg -f lavfi -i testsrc  -color_range jpeg -c:v prores -t 1
> > prores_jpeg.mov
>
> That encoder incorrectly never changes color range.
>

Can this metadata ever be set at a container level for mov? Must it always
be the stream that holds this info?
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Setting colour range.

2018-11-27 Thread Paul B Mahol
On 11/27/18, Kieran O'Leary  wrote:
> When creating MOV files, setting the -color_range option does not seem to
> have any effect. What am I doing wrong? Could it have anything to do with
> the removal of the yuvj pixel formats?
> Is setting this metadata even possible in the MOV container, or is it
> something that is expected to be flagged at the stream level? I was having
> difficulty finding info on where this info is even located in a file in
> both:
> https://developer.apple.com/library/archive/technotes/tn2162/_index.html and
> https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFPreface/qtffPreface.html
>
> Worrying, if I set a value of jpeg, mpeg, or 0, ffprobe says that the file
> has TV range.
>
> How to replicate:
>
> $ ./ffmpeg -f lavfi -i testsrc  -color_range jpeg -c:v prores -t 1
> prores_jpeg.mov

That encoder incorrectly never changes color range.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".