View Single Post
Old 8th February 2020, 22:53   #58  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,904
Quote:
Originally Posted by hello_hello View Post
Did you do all that because I asked a silly question??
Well, mostly because I realized that there are some scenarios in which it could actually be useful.

Quote:
Originally Posted by manolito View Post
MediaInfo reports:
ChromaSubsampling/String : 4:2:0
work correctly. Other sources where:
ChromaSubsampling/String : 4:2:0 (Type 2)
is reported do not work when using the source file directly as the input for FFmpeg. This applies ony for "hable" and "reinhard" as the tonemap algorithm.

I have no idea what "Type 2" means for chroma subsampling, and I have not found any quick way to get rid of it in a HDR file.

This is how I go from normal 4:2:0 to 4:2:0 type 2 and encode with x265:

Code:
ffmpeg.exe -i "avs_script.avs" -vf scale=out_color_matrix=bt2020nc:out_h_chr_pos=0:out_v_chr_pos=0 -pix_fmt yuv420p16le -strict -1 -an -f yuv4mpegpipe - | x265.exe --y4m -
You can use -vf scale in ffmpeg to do the opposite and go from type2 to normal 4:2:0 (MPEG2 position); try this for BT709 with MPEG2 standard 4:2:0 chroma position:

Code:
-vf 'scale=out_color_matrix=bt709:out_h_chr_pos=0:out_v_chr_pos=128'
FranceBB is offline   Reply With Quote