Log in

View Full Version : MPEG-1 Colorimetry Flags


jay123210599
21st January 2025, 06:27
How do I add colorimetry flags to MPEG-1 videos?

Format : MPEG Video
Format version : Version 1
Format settings : CustomMatrix / BVOP
Format settings, BVOP : Yes
Format settings, Matrix : Custom
Format settings, GOP : M=3, N=13
Codec ID : V_MPEG1
Codec ID/Info : MPEG 1 or 2 Video
Duration : 2 s 377 ms
Bit rate mode : Variable
Bit rate : 23.1 Mb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.464
Time code of first frame : 00:01:07:02
Time code source : Group of pictures header
GOP, Open/Closed : Closed
Stream size : 6.54 MiB (96%)
Default : Yes
Forced : No

Selur
22nd January 2025, 05:44
You could wrap the video stream into an mkv container and add the flags to the mkv container.
Alternatively, read up on the standard and check whether the standard supports those flags in the video stream itself. I'm pretty sure it does not.
Last I checked, MPEG-1 should always have 4:2:0 chroma sampling, TV luma range and use a bt.601 color matrix.
A quick internet search should have shown this.

jay123210599
22nd January 2025, 17:28
You could wrap the video stream into an mkv container and add the flags to the mkv container.
Alternatively, read up on the standard and check whether the standard supports those flags in the video stream itself. I'm pretty sure it does not.
Last I checked, MPEG-1 should always have 4:2:0 chroma sampling, TV luma range and use a bt.601 color matrix.
A quick internet search should have shown this.

It is in a mkv container. How do I add them using ffmpeg?

FranceBB
25th January 2025, 01:40
oh... MPEG-1 with BT709 in FULL HD? Ouch. That's... weird... to say the least...
I'm not sure this is gonna work, but you could try with a simple:


ffmpeg.exe -i "input.mkv" -c:v copy -c:a copy -aspect 16:9 -color_range 1 -color_primaries 1 -color_trc 1 -colorspace 1 -y "remuxed.mkv"


and see what comes out at the other end.

Selur
25th January 2025, 12:54
Alternatively use mkvmerge (https://mkvtoolnix.download/doc/mkvmerge.html#d4e2979).