VideoHelp Forum


Try NordVPN to access Netflix or other streaming services from any country and also surf safe!
+ Reply to Thread
Results 1 to 12 of 12
Thread
  1. 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
    Quote Quote  
  2. Your conversion to 10 bit YUV treated the source as full range YUV and converted it to limited range YUV (but it was already limited range). Hence, the lost of contrast. What was your ffmpeg command line? Try using "-pix_fmt p010le".
    Quote Quote  
  3. i only added crf and 10bit command line

    Code:
    -c:v libx265 format=yuv420p10le -crf 23 -c:a copy
    i tried "-pix_fmt p010le" still same. by the way i check my monitor settings. maximum is 8bit, may be thats the reason?
    Quote Quote  
  4. 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.
    Quote Quote  
  5. 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.
    Quote Quote  
  6. 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
    Quote Quote  
  7. 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
    i added following parameters for x265
    Code:
    fullrange=off:colorprim=bt709:transfer=bt709:colormatrix=bt709
    i can see mediainfo:
    Code:
    Default                                  : Yes
    Forced                                   : No
    Color range                              : Limited
    Color primaries                          : BT.709
    i would like to use second method if it's work for all video. because it's hard to tell which one has wrong colour info. could you please confirm me if i can use "B" method command for all kind of video even if video colour range info is not wrong?

    thanks again both @jagabo @poisondeathray
    Last edited by firekid; 12th May 2021 at 10:47.
    Quote Quote  
  8. 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
    Quote Quote  
  9. Actually it's range=limited for -x265-params
    Quote Quote  
  10. 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.
    Quote Quote  
  11. Actually, B should work for normal range video, flagged normal too

    It won't work for true full range video
    Quote Quote  
  12. 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
    Quote Quote  



Similar Threads