Opened 7 years ago
Last modified 4 months ago
#6132 open enhancement
SMPTE 2084 support in colorspace filter
Reported by: | sdot | Owned by: | |
---|---|---|---|
Priority: | wish | Component: | avfilter |
Version: | git-master | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
This is not a bug but a feature request
Please add support for SMPTE 2084 in the colorspace filter
Source file is http://demo-uhd3d.com/files/uhd4k/Samsung_HDR_-_Chasing_the_Light.ts
mediainfo :
ID : 257 (0x101)
Menu ID : 1 (0x1)
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5.1@High
Codec ID : 36
Duration : 1 min 34 s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate : 59.940 (60000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Writing library : ATEME Titan File 3.7.3 (4.7.3.1002)
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : SMPTE ST 2084
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : R: x=0.680000 y=0.320000, G: x=0.265000 y=0.690000, B: x=0.150000 y=0.060000, White point: x=0.312700 y=0.329000
Mastering display luminance : min: 0.0500 cd/m2, max: 1000.0000 cd/m2
ffmpeg -i
Input #0, mpegts, from 'Samsung_HDR_-_Chasing_the_Light.ts':
Duration: 00:01:34.63, start: 1.066722, bitrate: 67554 kb/s
Program 1
Stream #0:0[0x101]: Video: hevc (Main 10) ([36][0][0][0] / 0x0024), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], 59.94 fps, 59.94 tbr, 90k tbn, 59.94 tbc
Stream #0:1[0x102](und): Audio: aac ([15][0][0][0] / 0x000F), 0 channels, fltp
ffmpeg -i Samsung_HDR_-_Chasing_the_Light.ts -vf "colorspace=space=bt709:primaries=bt2020"
[Parsed_colorspace_0 @ 00000000003de400] Unsupported input transfer characteristics 16 (smpte2084)
Change History (3)
comment:1 by , 7 years ago
Component: | undetermined → avfilter |
---|
comment:3 by , 4 months ago
It seems the FFmpeg build in Handbrake was patched in 2019 to allow smpte2084 input. If this is a reasonable fix, could someone work on getting it ported back into mainline FFmpeg?
FWIW, what I want to facilitate is converting UHD HDR content from Blu-Ray—i.e., yuv420p10le(tv, bt2020nc/bt2020/smpte2084)
—to 8-bit 1080p for less-capable devices—i.e., yuv420p(tv, bt709, progressive)
—via -pix_fmt yuv420p -vf "colorspace=all=bt709:fast=0,scale=1920:-2:flags=lanczos"
. I realize a common workaround is to build with z.lib and use the zscale
and tonemap
filters, but I don't see any reason colorspace
shouldn't also work.
Why we cannot automatically switch to zscale for ICtCp, CL and NCL, including primaries derived CL and NCL?