FFMPEG 10bit settings output video colour giving a lot difference. however if i encode without 10bit, video colour comes natural. it looks like 10bit adding some extra brightness and reduce sharpness/contrast.
here is the screenshot compare
i have included both main and output files. it's 15sec video sample. i know it's a lot to ask but i hope somone could download the file and make some test . please check around 7~9 sec timestamp. you will notice the differencehere is the links:
+ Reply to Thread
Results 1 to 12 of 12
i only added crf and 10bit command line
-c:v libx265 format=yuv420p10le -crf 23 -c:a copy
Ah, I see why this is happening. The source is flagged as full range YUV but it's really limited range.
This should work but may not be optimal: try adding "-vf scale=in_range=limited:out_range=full". I also recommend adding "-colorspace bt709 -color_range tv" to flag the output video.
I say it may not be optimal because you're converting the limited range to full range before ffmpeg converts the full range to limited range. It would be best if you could just get it to pass the original limited range through to the encoder. Someone else might know how to do that.
Last edited by jagabo; 12th May 2021 at 09:06.
thank you for the help, i tried your suggested command line, but did not work. however i tried 8bit encode without adding your suggested command line, output video colour looks fine.
Last edited by firekid; 12th May 2021 at 09:49.
you can either:
A) strip the full range, because it's incorrect in the first place. You can batch if you have many to do. I would do this if you're keeping the originals. Then use those as input to convert
Use bit stream filter -bsf:v h264_metadata=video_full_range_flag=0
ffmpeg -i Main.mkv -bsf:v h264_metadata=video_full_range_flag=0 -c copy stripped.mkv
B) encode as full range, but flag as limited using x264opts fullrange=off
ffmpeg -i Main.mkv -vf scale=in_range=full:out_range=full,format=yuv420p10le -x264opts fullrange=off:colorprim=bt709:transfer=bt709:colormatrix=bt709 -c:v libx264 -crf 20 -c:a copy limitedrange.mkv
thank you poisondeathray.
A) after i use this command line. 30MB video output gave 10mb. is it normal? after i strip the colour range, encoded video output gave correct colour.
B) my output video is x265. will those parameter work with x265?
only added this command also worked.
Default : Yes Forced : No Color range : Limited Color primaries : BT.709
thanks again both @jagabo @poisondeathray
Last edited by firekid; 12th May 2021 at 10:47.
For (A) it should be the very close to the same size as input, because -c copy
In your sample , Before 32,097,787 bytes . After 32,097,661 bytes
For (B) using libx265, you would use -c:v libx265 instead of -c:v libx264 , and -x265-params instead of -x264opts
Actually it's range=limited for -x265-params
i don't know but A size become small. however it's bit time consume if i have to check video one by one if colour range is incorrect...so option B is appropriate for me
for B i using libx265 and x265-params. just one question can i use your suggested B parameters for all kind of video. if video colour is correct will it make any issue?
Actually, B should work for normal range video, flagged normal too
It won't work for true full range video
thank you so much. just to confirmation, this is what i using:
-map 0 -c:v libx265 -refs 3 -crf 18 -vf scale=in_range=full:out_range=full,format=yuv420p10le -preset medium -x265-params "range=limited:colorprim=bt709:transfer=bt70ref=6:limit-refs=1:limit-tu=1:tu-inter-depth=4:tu-intra-depth=3:no-sao=1" -c:a copy -c:s copy