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
https://screenshotcomparison.com/comparison/13924
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:
https://www70.zippyshare.com/v/zQ7AGboG/file.html
+ Reply to Thread
Results 1 to 12 of 12
-
-
i only added crf and 10bit command line
Code:-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 iKron; 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
Code:ffmpeg -i Main.mkv -bsf:v h264_metadata=video_full_range_flag=0 -c copy stripped.mkv
or
B) encode as full range, but flag as limited using x264opts fullrange=off
Code: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?
edit:
only added this command also worked.
Code:-vf scale=in_range=full:out_range=full,format=yuv420p10le
Code:fullrange=off:colorprim=bt709:transfer=bt709:colormatrix=bt709
Code:Default : Yes Forced : No Color range : Limited Color primaries : BT.709
thanks again both @jagabo @poisondeathrayLast edited by iKron; 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 -
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?
thanks again. -
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:
Code:-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
Similar Threads
-
Corrupted output video from FFMPEG at high quality
By 31feesh in forum Newbie / General discussionsReplies: 6Last Post: 30th Jan 2021, 23:23 -
NEWBIE Raspberry Pi Zero W | ffmpeg video output issue. | via ssh
By EvasiveSnail in forum Newbie / General discussionsReplies: 3Last Post: 4th Nov 2020, 10:53 -
10bit DPX to DNXHR_444 with FFmpeg causing colour shift
By jnortheast in forum Video ConversionReplies: 3Last Post: 5th Sep 2019, 10:43 -
How to play 10bit videos and be sure to get true 10bit color on the screen?
By flashandpan007 in forum Software PlayingReplies: 6Last Post: 7th Apr 2017, 18:02 -
FFMPEG x265 10bit and virtualdub x265 10bit settings
By lilycarolyn in forum Video ConversionReplies: 11Last Post: 6th Jun 2016, 13:44