HDR和SDR视频互转,可以用以下命令套以下参数完成设置:
C:\Users\Administrator\Desktop>ffmpeg -i input.mp4 -bsf:v h264_metadata=colour_primaries={你的参数}:transfer_characteristics={你的参数}:matrix_coefficients={你的参数} output.mp4
当然我的建议是最好单向来转,从HDR降级到SDR~
'''
color-primaries 输入内容的色彩格式
0 - reserved,
1 - ITU-R BT.709,
2 - unspecified,
3 - reserved,
4 - ITU-R BT.470M,
5 - ITU-R BT.470BG - BT.601 625,
6 - ITU-R BT.601 525 - SMPTE 170M,
7 - SMPTE 240M,
8 - FILM,
9 - ITU-R BT.2020,
10 - SMPTE ST 428-1,
11 - SMPTE RP 432-2,
12 - SMPTE EG 432-2,
22 - EBU Tech. 3213-E - JEDEC P22 phosphors
transfer-characteristics 输入内容的传输特性(CICP)
0 - reserved,
1 - ITU-R BT.709,
2 - unspecified,
3 - reserved,
4 - Gamma 2.2 curve - BT.470M,
5 - Gamma 2.8 curve - BT.470BG,
6 - SMPTE 170M,
7 - SMPTE 240M,
8 - Linear,
9 - Log,
10 - Log Sqrt,
11 - IEC 61966-2-4,
12 - ITU-R BT.1361 Extended Colour Gamut,
13 - IEC 61966-2-1,
14 - ITU-R BT.2020 10 bit,
15 - ITU-R BT.2020 12 bit,
16 - ITU-R BT.2100 Perceptual Quantization (ST-2084),
17 - SMPTE ST 428-1,
18 - ARIB STD-B67 (HLG)
matrix-coefficients 输入内容的矩阵系数
0 - Identity,
1 - ITU-R BT.709,
2 - unspecified,
3 - reserved,
4 - US FCC 73.682,
5 - ITU-R BT.470BG,
6 - SMPTE 170M,
7 - SMPTE 240M,
8 - YCoCg,
9 - BT2020 Non-constant Luminance,
10 - BT2020 Constant Luminance,
11 - SMPTE ST 2085,
12 - Chroma-derived Non-constant Luminance,
13 - Chroma-derived Constant Luminance,
14 - ITU-R BT.2100-0
'''