View Full Version : Convert Colorspace
jay123210599
10th August 2024, 23:22
How do I convert the colorspace of videos using Avisynth? Like, adding the correct parameters for BT.709 for HD videos?
Selur
11th August 2024, 06:33
If you just want to change the color matrix, you can use ColorMatrix (http://avisynth.nl/index.php/ColorMatrix).
hello_hello
13th August 2024, 08:55
Most players would either use BT.709 by default, or display the video using a matrix based on the video resolution. 709 for HD and 601 for SD etc, assuming the absence of any color information in the video stream.
If the video uses incorrect colors and you wish to convert them, then you could use a plugin such as ColorMatrix as Selur suggested. If you want to include the colorimetry info in the video stream, then for the x264 and x265 encoders you'd add the following to the command line:
--colorprim bt709 --transfer bt709 --colormatrix bt709
The color information in the command line is simply there as information and there's no guarantee a player will pay attention to it, although hopefully most players do. It doesn't change the way the video is encoded.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.