這個bitstream filter可以給已編碼的碼流文件添加colorspace色域信息或修改色域信息。
但這個filter 只支持改變蘋果ProRes422編碼的視頻流的色域信息。對mp4封裝格式也不支持。mov支持
若使用h264編碼的源利用prores_metadata改變色域信息,會報錯,如下所示:
[AVBSFContext @ 0x7fa9c7c074c0] Codec 'h264' (27) is not supported by the bitstream filter 'prores_metadata'. Supported codecs are: prores (147)
Error initializing bitstream filter: prores_metadata
color_primaries
Set the color primaries. Available values are:
‘auto’
Keep the same color primaries property (default).
‘unknown’
‘bt709’
‘bt470bg’
BT601 625
‘smpte170m’
BT601 525
‘bt2020’
‘smpte431’
DCI P3
‘smpte432’
P3 D65
transfer_characteristics
Set the color transfer. Available values are:
‘auto’
Keep the same transfer characteristics property (default).
‘unknown’
‘bt709’
BT 601, BT 709, BT 2020
matrix_coefficients
Set the matrix coefficient. Available values are:
‘auto’
Keep the same colorspace property (default).
‘unknown’
‘bt709’
‘smpte170m’
BT 601
‘bt2020nc’
eg1: Set Rec709 colorspace for each frame of the file
ffmpeg -i INPUT -c copy -bsf:v prores_metadata=color_primaries=bt709:color_trc=bt709:colorspace=bt709 output.mov
但是貌似ffmpeg4.1以上版本才支持,ffmpeg4.2.1是支持的