VideoHelp Forum
+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. HumanViewer
    Join Date
    May 2022
    Location
    Finnish
    Search Comp PM
    RT, I want to change the pix_fmt and colorspace of a video, from yuv420p, bt709 -> yuv420p10le, bt2020;
    But it looks like a little weird, orange -> red.
    I'm not a new ffmpeger, here is my command:
    Code:
    ffmpeg -hide_banner -y -i INPUT -map 0:v -c:v copy -pix_fmt yuv420p10le -colorspace bt2020nc -color_trc smpte2084 -color_primaries bt2020 OUTPUT
    Can somebody tell me why?
    thank you so much!

    orange.mp4
    Code:
    test video 0
    Format/String                    : MPEG-4
    Format_Profile                   : Base Media
    CodecID/String                   : isom (isom/av01/iso2/mp41)
    FileSize/String                  : 3.73 KiB
    Duration/String                  : 5s 0ms
    OverallBitRate/String            : 6107 bps
    Encoded_Application/String       : Lavf59.17.100
    
    Video
    ID/String                        : 1
    Format/String                    : AV1
    Format/Info                      : AOMedia Video 1
    Format_Profile                   : Main@L3.1
    CodecID                          : av01
    Duration/String                  : 5s 0ms
    BitRate/String                   : 3928 bps
    Width/String                     : 1280 pixel
    Height/String                    : 720 pixel
    DisplayAspectRatio/String        : 16:9
    FrameRate_Mode/String            : CFR
    FrameRate/String                 : 25.000 fps
    ColorSpace                       : YUV
    ChromaSubsampling/String         : 4:2:0
    BitDepth/String                  : 8 bit
    ScanType/String                  : Progressive
    Bits-(Pixel*Frame)               : 0.000
    StreamSize/String                : 2.40 KiB (64%)
    colour_range                     : Limited
    colour_primaries                 : BT.709
    transfer_characteristics         : BT.709
    matrix_coefficients              : BT.709
    CodecConfigurationBox            : av1C
    https://files.videohelp.com/u/302682/orange.mp4

    red.mp4
    Code:
    General
    CompleteName                     : E:\local_workspace\go_test_slice\video\test_sapce\ts_3\red.mp4
    Format/String                    : MPEG-4
    Format_Profile                   : Base Media
    CodecID/String                   : isom (isom/av01/iso2/mp41)
    FileSize/String                  : 3.73 KiB
    Duration/String                  : 5s 0ms
    OverallBitRate/String            : 6106 bps
    Encoded_Application/String       : Lavf59.17.100
    
    Video
    ID/String                        : 1
    Format/String                    : AV1
    Format/Info                      : AOMedia Video 1
    Format_Profile                   : Main@L3.1
    CodecID                          : av01
    Duration/String                  : 5s 0ms
    BitRate/String                   : 3926 bps
    Width/String                     : 1280 pixel
    Height/String                    : 720 pixel
    DisplayAspectRatio/String        : 16:9
    FrameRate_Mode/String            : CFR
    FrameRate/String                 : 25.000 fps
    ColorSpace                       : YUV
    ChromaSubsampling/String         : 4:2:0
    BitDepth/String                  : 10 bit
    ScanType/String                  : Progressive
    Bits-(Pixel*Frame)               : 0.000
    StreamSize/String                : 2.40 KiB (64%)
    colour_range                     : Limited
    colour_primaries                 : BT.2020
    transfer_characteristics         : PQ
    matrix_coefficients              : BT.2020 non-constant
    CodecConfigurationBox            : av1C
    https://files.videohelp.com/u/302682/red.mp4
    Quote Quote  
  2. Can somebody tell me why?
    You are just changing the flags on the video you are not doing any conversion there.
    You would need to reencode and use additionally something like colormatrix https://www.ffmpeg.org/ffmpeg-all.html#colormatrix to convert something.

    Side note: What reall buffels me is that the bit depth changed, '-c:v copy' should have prevented that,..
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  3. [QUOTE=Selur;2658207]
    Side note: What reall buffels me is that the bit depth changed, '-c:v copy' should have prevented that,..
    -pix_fmt yuv420p10le
    Quote Quote  
  4. @ProWo: I know, but unless it only changed some flag it should not change the color space,...
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  5. Or use zscale, to change matrix, transfer and primaries; with -c:v something other than copy

    Code:
    -vf zscale=min=709:m=2020_ncl:tin=709:t=smpte2084:pin=709:p=2020,format=yuv420p10le -c:v something
    Quote Quote  
  6. HumanViewer
    Join Date
    May 2022
    Location
    Finnish
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Or use zscale, to change matrix, transfer and primaries; with -c:v something other than copy

    Code:
    -vf zscale=min=709:m=2020_ncl:tin=709:t=smpte2084:pin=709:p=2020,format=yuv420p10le -c:v something
    thanks for reply, this make me notice the color matrix transform.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!