News:

--

Main Menu

Rec.601 and Avisynth script in Avidemux vsWin64

Started by blob2500, October 01, 2023, 08:19:18 AM

Previous topic - Next topic

blob2500

Hi,
If I open an .avs file, the color matrix is always BT.709, even if I set BT.601 at the script output; is there a way to make avidemux use the BT.601?
Thanks.



eumagga0x2a

No, this is currently impossible via Avisynth. However, some encoders and some muxers (well, only Matroska and its variety, WebM) allow to specify color properties.

blob2500

Sorry, I'm not sure I fully understand.
Where does Avidemux read the "bt.709" properties in the .avs file? Are they real values? The name of the window is "properties" (of the input video). Are these the default color settings that Avidemux actually uses for YV12 decoding? If so, I cannot then set bt.601 at the MKV container level, but I can only set bt.709, otherwise it would not correspond to the one used for encoding with Avidemux, unless I add a bt709->bt601 filter in input to compressor (x264 in my case).

I'm wrong?

Thank you

eumagga0x2a

Quote from: blob2500 on October 05, 2023, 07:56:31 AMWhere does Avidemux read the "bt.709" properties in the .avs file?

It doesn't read anything in the AviSynth script, it passes the script to the frame server and gets uncompressed YV12 frames in return. BT.709 is the default colorspace. When a usual video file is loaded in Avidemux, demuxers and video decoders can set color properties to non-default values.

Quote from: blob2500 on October 05, 2023, 07:56:31 AMI cannot then set bt.601 at the MKV container level, but I can only set bt.709, otherwise it would not correspond to the one used for encoding with Avidemux, unless I add a bt709->bt601 filter in input to compressor (x264 in my case).

All color properties are just hints to the video player how the colors should be interpreted, but a video encoder like x264 can include these hints into the video stream (into codec extradata). Some encoders allow to override whatever is passed down the filter chain in Avidemux with custom values.

Thus the only thing which you cannot work around is how the video is shown in Avidemux video preview window.

blob2500

I understand now. Many thanks for the your explanation :)