Changes between Version 61 and Version 62 of Scaling
- Timestamp:
- Aug 24, 2024, 2:53:29 AM (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Scaling
v61 v62 204 204 == Chroma sample location == 205 205 206 FFmpeg does not see the chroma sample location on either limited or full range file, so you should specify it by hand when going to .rgb (or upsampled from 4:2:0 to 4:4:4.yuv):206 FFmpeg does not see the chroma sample location on either limited or full range file, so you should specify it by hand when going to .rgb (or when upsampling from 4:2:0 to 4:4:4 in .yuv): 207 207 {{{ 208 208 ffmpeg -i cosmos.mkv -vf 'scale=in_h_chr_pos=0:in_v_chr_pos=128' -pix_fmt rgb24 qnfvarejwnfe3.rgb //for left … … 210 210 }}} 211 211 212 To create BT.2020-NCL matrix with top-left chroma this can be used (if the source image is not using bt.2020 primaries the color managment must be done first on linear data, also correct transfer must be tagged, either SDR or HDR one, again this requires color managment): 212 Recently introduced in_chroma_loc and out_chroma_loc can be used as well. 213 214 215 {{{ 216 ffmpeg -i cosmos-p5.mkv -vf scale=in_chroma_loc=left -pix_fmt rgb24 newway.rgb 217 }}} 218 219 220 {{{ 221 ffmpeg -i cosmos-p5.mkv -vf scale=in_chroma_loc=topleft -pix_fmt rgb24 newway.rgb 222 }}} 223 224 225 To create BT.2020-NCL matrix with top-left chroma this can be used (if the source image is not using bt.2020 primaries the color management must be done first on linear data, also correct transfer must be tagged, either SDR or HDR one, again this requires color management): 213 226 {{{ 214 227 -vf scale=out_color_matrix=bt2020nc:out_h_chr_pos=0:out_v_chr_pos=0 … … 219 232 ffmpeg -i file.mp4 -c copy -bsf:v hevc_metadata=chroma_sample_loc_type=0 file1.mp4 220 233 }}} 234 235 Also, #9693 says that if you want to write jpeg file you need to specify -vf scale=out_color_matrix=smpte170m:out_chroma_loc=center
