[FFmpeg-user] Setting colour range.

Kieran O'Leary kieran.oleary at irishfilm.ie
Tue Nov 27 16:37:07 EET 2018


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

  libavformat    58. 23.100 / 58. 23.100

  libavdevice    58.  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.000000, 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 4444 (ap4h) profile

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

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

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

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

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

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

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

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

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

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

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

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

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

  Metadata:

    encoder         : Lavf58.23.100

    Stream #0:0: Video: prores (4444) (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

  libavformat    58. 23.100 / 58. 23.100

  libavdevice    58.  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.000000, 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 4444 (ap4h) profile

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

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

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

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

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

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

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

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

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

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

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

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

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

  Metadata:

    encoder         : Lavf58.23.100

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

    Metadata:

      encoder         : Lavc58.40.100 prores

frame=   25 fps=0.0 q=-0.0 Lsize=     677kB time=00:00:00.96 bitrate=5770.4kbits/s speed=  49x

video:675kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.246580%


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

color_range=tv


$ mediainfo prores_jpeg.mkv |grep range

Color range                              : Full



Best,


Kieran.



------
This email has been scanned for spam and malware by The Email Laundry.




More information about the ffmpeg-user mailing list