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".

[FFmpeg-user] Setting colour range.

2018-11-27 Thread Kieran O'Leary
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

ffmpeg version N-92540-g28c96c2ce2 Copyright (c) 2000-2018 the FFmpeg developers

  built with Apple LLVM version 8.0.0 (clang-800.0.42.1)

  configuration:

  libavutil  56. 24.101 / 56. 24.101

  libavcodec 58. 40.100 / 58. 40.100

  libavformat58. 23.100 / 58. 23.100

  libavdevice58.  6.100 / 58.  6.100

  libavfilter 7. 46.100 /  7. 46.100

  libswscale  5.  4.100 /  5.  4.100

  libswresample   3.  4.100 /  3.  4.100

Input #0, lavfi, from 'testsrc':

  Duration: N/A, start: 0.00, bitrate: N/A

Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 320x240 [SAR 
1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc

Stream mapping:

  Stream #0:0 -> #0:0 (rawvideo (native) -> prores (native))

Press [q] to stop, [?] for help

[prores @ 0x7fe74a820200] encoding with ProRes  (ap4h) profile

[prores @ 0x7fe74a822a00] encoding with ProRes  (ap4h) profile

[prores @ 0x7fe74a825200] encoding with ProRes  (ap4h) profile

[prores @ 0x7fe74a827a00] encoding with ProRes  (ap4h) profile

[prores @ 0x7fe74a82a200] encoding with ProRes  (ap4h) profile

[prores @ 0x7fe74a82ca00] encoding with ProRes  (ap4h) profile

[prores @ 0x7fe74a82f200] encoding with ProRes  (ap4h) profile

[prores @ 0x7fe74a831a00] encoding with ProRes  (ap4h) profile

[prores @ 0x7fe74a834200] encoding with ProRes  (ap4h) profile

[prores @ 0x7fe74a836a00] encoding with ProRes  (ap4h) profile

[prores @ 0x7fe74a839200] encoding with ProRes  (ap4h) profile

[prores @ 0x7fe74a83ba00] encoding with ProRes  (ap4h) profile

[prores @ 0x7fe74a013200] encoding with ProRes  (ap4h) profile

Output #0, mov, to 'prores_jpeg.mov':

  Metadata:

encoder : Lavf58.23.100

Stream #0:0: Video: prores () (ap4h / 0x68347061), yuv444p10le(pc), 
320x240 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 25 fps, 12800 tbn, 25 tbc

Metadata:

  encoder : Lavc58.40.100 prores

frame=   25 fps=0.0 q=-0.0 Lsize= 676kB time=00:00:00.96 
bitrate=5768.7kbits/s speed=46.4x


$ ./ffprobe -v 0 -show_streams prores_jpeg.mov |grep range

color_range=tv


However, when setting the same flag '-color_range jpeg' using Matroska, 
mediainfo picks up on the colour range flag, but ffprobe still says tv:


$ ./ffmpeg -f lavfi -i testsrc  -color_range jpeg -c:v prores -t 1 
prores_jpeg.mkv

ffmpeg version N-92540-g28c96c2ce2 Copyright (c) 2000-2018 the FFmpeg developers

  built with Apple LLVM version 8.0.0 (clang-800.0.42.1)

  configuration:

  libavutil  56. 24.101 / 56. 24.101

  libavcodec 58. 40.100 / 58. 40.100

  libavformat58. 23.100 / 58. 23.100

  libavdevice58.  6.100 / 58.  6.100

  libavfilter 7. 46.100 /  7. 46.100

  libswscale  5.  4.100 /  5.  4.100

  libswresample   3.  4.100 /  3.  4.100

Input #0, lavfi, from 'testsrc':

  Duration: N/A, start: 0.00, bitrate: N/A

Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 320x240 [SAR 
1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc

Stream mapping:

  Stream #0:0 -> #0:0 (rawvideo (native) -> prores (native))

Press [q] to stop, [?] for help

[prores @ 0x7ff6e4825c00] encoding with ProRes  (ap4h) profile

[prores @ 0x7ff6e4828400] encoding with ProRes  (ap4h) profile

[prores @ 0x7ff6e482ac00] encoding with ProRes  (ap4h) profile

[prores @ 0x7ff6e482d400] encoding with ProRes  (ap4h) profile

[prores @ 0x7ff6e482fc00] encoding with ProRes  (ap4h) profile

[prores @ 0x7ff6e4832400] encoding with ProRes  (ap4h) profile

[prores @ 0x7ff6e4834c00] encoding with ProRes  (ap4h) profile

[prores @ 0x7ff6e4837400] encoding with ProRes  (ap4h) profile

[prores @ 0x7ff6e4839c00] encoding with ProRes  (ap4h) profile

[prores @ 0x7ff6e483c400] encoding with ProRes  (ap4h) profile

[prores @ 0x7ff6e483ec00] encoding with ProRes  (ap4h) profile

[prores @ 0x7ff6e4841400] encoding with ProRes  (ap4h) profile

[prores @ 0x7ff6e4802a00] encoding with ProRes  (ap4h) profile

Output #0, matroska, to 'prores_jpeg.mkv':

  Metadata:

encoder : Lavf58.23.100

Stream #0:0: Video: prores () (ap4h / 0x68347061), yuv444p10le(pc), 
320x240 [SAR 1:1 DAR 4:3], q=2-31, 200 k