Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 30th October 2024, 21:58   #1  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 7,155
Apply ColorMatrix in SD/HD upscale?

I'm playing a bit with different methods to upscale SD sources from DVD Video to HD. Due to an unrelated discussion elsewhere I remembered that SD video material often uses Rec.601 colorimetry, whereas HD prefers Rec.709, but the behaviour of players may not be reliable when the encoder does not flag it explicitly.

In my current case, the DVD video in MPEG2 uses explicit flags:
Code:
Color primaries                 : BT.601 PAL
Transfer characteristics        : BT.470 System B/G
Matrix coefficients             : BT.470 System B/G
Upscaling to a HD resolution, which options would you recommend?

a) use an explicit colorimetry flag for x264 with Rec.601 colorimetry
b) use ColorMatrix("Rec.601->Rec.709") but no encoder flag
c) use ColorMatrix("Rec.601->Rec.709") and an explicit colorimetry flag for x264 with Rec.709 colorimetry
d) something different
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 30th October 2024, 22:45   #2  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 3,102
I'd say "c", so convert to BT709 and flag it as such within x264 --colormatrix bt709 --transfer bt709 --colorprim bt709.
Unfortunately players are totally unreliable and although most often than not they default to BT709 anyway whenever they find anything HD / FULL HD, it's always better to explicitly flag a stream.
FranceBB is offline   Reply With Quote
Old 30th October 2024, 23:19   #3  |  Link
takla
Registered User
 
Join Date: May 2018
Posts: 213
Yeah solution "c)" would be my pick, too.
takla is offline   Reply With Quote
Old 31st October 2024, 05:08   #4  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,495
I agree, most reliable is c.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 31st October 2024, 06:20   #5  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 7,155


I'll apply that as you all recommend. "20,000 Leagues" (1954) are now public domain, BTW.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 4th November 2024, 17:36   #6  |  Link
SaurusX
Registered User
 
Join Date: Feb 2017
Posts: 146
Another "c)" vote here.
SaurusX is offline   Reply With Quote
Old 4th November 2024, 18:34   #7  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,821
Quote:
Originally Posted by LigH View Post
I'll apply that as you all recommend. "20,000 Leagues" (1954) are now public domain, BTW.
Where?
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 5th November 2024, 09:20   #8  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 7,155
In countries where media copyrights are limited to at most 70 years.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 5th November 2024, 20:00   #9  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,934
If the transfer function really is 470bg you might be better off with option D. Plus that way you can do it in 16 bit with less chance of color banding.

ConvertBits(16)
z_ConvertFormat(colorspace_op="470bg:470bg:470bg:limited=>709:709:709:limited")
ConvertBits(8, Dither=1)



Compared to not converting the transfer function as I assume ColorMatrix wouldn't change it and I don't know if players wouldn't just assume 601 or 709.

ConvertBits(16)
z_ConvertFormat(colorspace_op="470bg:709:470bg:limited=>709:709:709:limited")
ConvertBits(8, Dither=1)


Last edited by hello_hello; 5th November 2024 at 20:05.
hello_hello is offline   Reply With Quote
Old 5th November 2024, 20:50   #10  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 7,155
"Advanced method", alright. Might test it in a next project.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 8th November 2024, 12:00   #11  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,854
Quote:
Originally Posted by LigH View Post
: BT.470 System B/G[/code]

Upscaling to a HD resolution, which options would you recommend?

a) use an explicit colorimetry flag for x264 with Rec.601 colorimetry
b) use ColorMatrix("Rec.601->Rec.709") but no encoder flag
c) use ColorMatrix("Rec.601->Rec.709") and an explicit colorimetry flag for x264 with Rec.709 colorimetry
d) something different

Option "c" is the correct approach.
What will happen in the wild is another story. Most players, TVs probably have hard coded rules based mainly on resolution and will assume "own" matrix anyway, but this doesn't matter. You should do correct conversion and flagging and this is option "c" (HD normally should be Rec.709).
kolak is offline   Reply With Quote
Old 8th November 2024, 17:32   #12  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,018
On YT (full movie),
https://www.youtube.com/watch?v=pxG90oMpCuM

Apparently also available to buy or rent on YT.

On a quick glance at linked offering and quick look at the buy option sample, the free ver$ is quite a bit better.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 17:50.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.