ffmpeg vf scale shifts colors to washed out Im trying to scale video down. No matter what I do the colors are always washed up as a result.
original:

After scaling:

Code I run for it
ffmpeg -i input.mkv -vf scale=1028:-1 output.mkv

log: log
Original file codec info

New file codec info

ideally I would want to convert the video to h264 and scale down.
I tried googling for x hours, tried a lot of random attemps, and in the end I tracked it down to scale filter. I have no idea how or why the filter messes up the colors.
I also tried some overkill commands(below) I found on the internet, and it is able to convert to h264 perfectly, but once I try to add scaling to that command it will also produce washed up colors like example above.
Overkill example:
ffmpeg -i &quot;input&quot; -c:v libx265 -preset fast -crf 21 -x265-params keyint=60:bframes=3:vbv-bufsize=75000:vbv-maxrate=75000:hdr-opt=1:repeat-headers=1:colorprim=bt2020:transfer=smpte-st-2084:colormatrix=bt2020nc:master-display=&quot;G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,500)&quot; -c:a aac -vf colorspace=bt2020,transfer=smpte2084,scale=1280:-1 &quot;small_output&quot;
The video's color transfer characteristics (trc) and color primaries flags are not being set on the output video, which is causing the video player to use incorrect values for playback, resulting in washed out colors. When encoding, use the following FFmpeg flags to resolve this:
-color_trc smpte2084 -color_primaries bt2020

Note that these flags do not actually convert the the source material. These FFmpeg flags merely add flags to the output file that indicate to media players which values to use for these parameters. In this case, the question asker's media player chose incorrect values for these parameters since they were not set on the output video and displayed the video incorrectly.
For actually converting the video's content using specific transfer characteristics or primaries, see this wiki page on FFmpeg's colorspace filter.