Selur's Little Message Board
[INFO] Change input color - Printable Version

+- Selur's Little Message Board (https://forum.selur.net)
+-- Forum: Talk, Talk, Talk (https://forum.selur.net/forum-5.html)
+--- Forum: Small Talk (https://forum.selur.net/forum-7.html)
+--- Thread: [INFO] Change input color (/thread-4068.html)



Change input color - Doom83 - 10.04.2025

Sometime I work with video files who have that color setting

Color primaries: bt470m
Transfer: bt470m
Color matrix: bt470bg

Whats meaning? I change some value and see change also the color  Huh 
Think the original setting arent correct..what I need to change?

bt470bg are bt601 PAL and bt470m are NTSC?


RE: Change input color - Selur - 10.04.2025

Color Primaries and Transfer can be changed in the Encoder settings, if the encoder supports the signaling.
If the input is wrongly flagged or wrong detected/guessed "Filtering->Misc->Overwrite input->Overwrite input color matrix" allows to change the input value.
(but they these two are not really different, so I doubt the difference is noticeable)

Cu Selur


RE: Change input color - Doom83 - 25.02.2026

Dont know why i have file bt601 in primaries, transfer and matrix but hybrid dont recognize and put bt470bg and unknow  Huh


RE: Change input color - Selur - 25.02.2026

You can read the debug output and see where Hybrid comes up with the value,...
I suspect, x264 doesn't support the values of your source and Hybrid tries to use something similar,..
this is what x264 supports:
--colorprim <string>    Specify color primaries ["undef"]
                                  - undef, bt709, bt470m, bt470bg, smpte170m,
                                    smpte240m, film, bt2020, smpte428,
                                    smpte431, smpte432
      --transfer <string>     Specify transfer characteristics ["undef"]
                                  - undef, bt709, bt470m, bt470bg, smpte170m,
                                    smpte240m, linear, log100, log316,
                                    iec61966-2-4, bt1361e, iec61966-2-1,
                                    bt2020-10, bt2020-12, smpte2084, smpte428,
                                    arib-std-b67
      --colormatrix <string>  Specify color matrix setting ["???"]
                                  - undef, bt709, fcc, bt470bg, smpte170m,
                                    smpte240m, GBR, YCgCo, bt2020nc, bt2020c,
                                    smpte2085, chroma-derived-nc,
                                    chroma-derived-c, ICtCp
see: x264 --fullhelp

Cu Selur

Ps.: alternatively share a sample with these characteristics and I can look at it over the weekend.


RE: Change input color - Doom83 - 25.02.2026

I use that code in ffmpeg for create che file
ffmpeg -i 01.asf -vf "scale=640:480:flags=lanczos,setsar=1" -map_metadata -1 -c:v libx264 -crf 18 -preset slow -color_primaries smpte170m -color_trc smpte170m -colorspace smpte170m -color_range tv -c:a aac -b:a 128k output.mkv

become matrix bt601, when i put in hybrid and save, matrix change in bt470bg  Confused

Intervallo colore                      : Limited
Coefficienti matrici                    : BT.470 System B/G
matrix_coefficients_Original            : BT.601


RE: Change input color - Selur - 26.02.2026

I will need a sample to reptoduce and look into it