This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[BUG] x264 colormatrix option changes when "Overwrite input type scan" is enabled
They are all related.
If the scan order is wrong at the input it will keep wrong,...
It also would help if you would tell me if you did use the last version I send you (2020.09.25-162327) or not, because without that info looking at the debug output simply makes no sense,...
-> if you did not use the latest link I send you please try with that version
I just checked some code and fir DVDs BT709 is hardcoded,... I wonder why I did that and fi this is right.
Okay that is because of:
Quote: Rec.709 should be used when your source is DVD or HDTV:

ConvertToRGB(clip, matrix="Rec709")

and with the latest version I send you I get:
#  color sampling YV12@8, matrix: bt709, scantyp: top field first, luminance scale: limited
# current resolution: 720x576
# deinterlacing
QTGMC(Preset="Fast", ediThreads=2)
# filtering
# color modifications
ConvertToRGB(interlaced=false, matrix="Rec709")
# adjust color to YV12
return last
-> Rec.709 is used consistently

Since you stated:
Quote: it incorrectly uses a Rec709 ConvertToRGB matrix:
-> where do you get that Rec.709 is wrong?
Looking at the debug output,...
Your are not using DVD input, you are opening mpg files,...
You wrote you were opening a DVD,.. wtf!?

=> Okay, let's start anew.

Please use the latest(2020.09.25-162327) dev version I send you a link to, describe properly what you are doing, what you think is going wrong and share a debug output that matches your description.
-> I'll make a new dev version and send you a link.
send you a link, took me a while to see the main problem: MediaInfo seems to sometimes use different strings to indicate the color matrix. ;(
Sorry, I had to leave for an hour.

Sorry if I confused you. I said,

Quote:I open a mpg muxed DVD (no re-encoding),

DVD was ripped, VOB's were muxed to mpg file using ffmpeg, with video only and no re-encoding:

ffmpeg -fflags +genpts -i "concat:VTS_01_1.VOB|VTS_01_2.VOB|VTS_01_3.VOB|VTS_01_4.VOB" -vcodec copy -an video.mpg

Ffmpeg copies tags from the VOB's into the mpg.

It was my understanding that DVD's were supposed to be 601, HD is 709. I guess I have that wrong? I have quite a few DVD's that show 601 with MediaInfo. The particular one I made the log files with doesn't have anything regarding color matrix. (I thought that meant it should be assumed to be 601.) I have no idea where I got that info now.. it's just something I thought I had correct which I apparently do not. I'm very sorry for my lack of understanding this.

Regardless, here is how the current dev version behaves. (I am now using the latest dev version you sent: 2020.09.25-162327.)

When I load the muxed DVD mpg file, it shows on the x264 tab as bt709 for -colormatrix from the start. It also has the issue when turning on RGBAdjust, the input conversion matrix to RGB is set as Rec709, and the output conversion matrix to YV12 is set as Rec601.

When I reload the same mpg file, now the x264 tab has bt470bg for -colormatrix, and RGBAdjust has the input conversion matrix to RGB as Rec601, and the output conversion matrix to YV12 as Rec601.

Here's the log for all of the above, including the initial file load, then the reload.

.zip (Size: 39,63 KB / Downloads: 5)

I can see you now *just* sent another dev version, so I'll try that one now! Blush
okay, try the last one and I'll look at the output of that test. Smile
I guess it was this Wikipedia article that lead me to believe 601 is for DVD or Standard definition:

While it doesn't specifically say anything about DVD's, it says it is the standard for ISO/IEC MPEG (which is what DVD uses), and the bottom of the article for "See Also" says Rec709 is for HDTV and Rec2020 is for UHDTV.

So I guess my question is, if a DVD doesn't have any color space tags, should it be assumed to be 601 (470), or 709?


The dev version you sent (2020.09.25-195552) shows Rec601 on RGBAdjust for both input and output now on first load and on reload.

On the x264 tab, it shows bt709 for -colormatrix on first load, then changes to bt470bg on reload.

Comment in AviSynth script says on both first load and reload:

#  color sampling YV12@8, matrix: bt470, scantyp: top field first, luminance scale: limited

Still not sure if DVD should be 709 or 601! Undecided

.zip (Size: 37,7 KB / Downloads: 5)
Quote:is the standard for ISO/IEC MPEG (which is what DVD uses)
not so sure about that,..
DVD often has special rules that differ from normal MPEG containers, which is why repacking into mpeg often isn't the brightest idea. Wink
see also:

Quote:So I guess my question is, if a DVD doesn't have any color space tags, should it be assumed to be 601, or 709?
Nope, DVDs have no color space tags at least none MediaInfo/MPlayer/FFmpeg know of and report.

-> looking into checking out what changes on the reload,..
Okay, think I found it.
-> will send you a new link for testing in ~ 1/2 hr

Cu Selur

Forum Jump:

Users browsing this thread: 1 Guest(s)