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 > Video Encoding > High Efficiency Video Coding (HEVC)

Reply
 
Thread Tools Search this Thread Display Modes
Old 23rd January 2019, 02:11   #1  |  Link
Forteen88
Herr
 
Join Date: Apr 2009
Location: North Europe
Posts: 319
Setting the correct colormatrix in x265?

Hi, I read this old thread about wheather to set or not set colormatrix-information in x264,
Quote:
The x264 colormatrix flags don't do anything to the actual video, it's just metadata VUI information that some players might read (the majority don't). It tells the software or hardware player what matrix to use when converting to RGB for display

It's not mandatory, but it doesn't hurt to flag it, so you should always use it (there is no downside to flagging it): usually bt709 for HD, bt601 for SD.
https://forum.videohelp.com/threads/...matrix-in-x264

Nowadays, with more advanced TV:s and standard 10-bit setting on H.265-encoders (with GPU-decode support for that), is it more important now to set colormatrix?

And bt2020nc should be set for 10-bit UHD-reencodes, right?! I'd assume that it's most important to set colormatrix for UHD HDR-reencodes.

EDIT: Thanks excellentswordfight!

Last edited by Forteen88; 23rd January 2019 at 20:34. Reason: thanking
Forteen88 is offline   Reply With Quote
Old 23rd January 2019, 16:13   #2  |  Link
excellentswordfight
Lost my old account :(
 
Join Date: Jul 2017
Posts: 54
Quote:
Originally Posted by Forteen88 View Post
Hi, I read this old thread about wheather to set or not set colormatrix-information in x264,

https://forum.videohelp.com/threads/...matrix-in-x264

Nowadays, with more advanced TV:s and standard 10-bit setting on H.265-encoders (with GPU-decode support for that), is it more important now to set colormatrix?

And bt2020nc should be set for 10-bit UHD-reencodes, right?! I'd assume that it's most important to set colormatrix for UHD HDR-reencodes.
Well that depends, there is nothing that says that UHD-video cant be sdr 709. so no, dont blindly set it. And yes, it is more important to pay attention to those flags now. And if the source is HDR you need to set all the relevent flags for it, not just the colormatrix. The safest way is to always set them based on the input you are using.

Last edited by excellentswordfight; 23rd January 2019 at 16:16.
excellentswordfight is offline   Reply With Quote
Old 23rd January 2019, 21:28   #3  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 2,758
Quote:
Originally Posted by excellentswordfight View Post
Well that depends, there is nothing that says that UHD-video cant be sdr 709. so no, dont blindly set it. And yes, it is more important to pay attention to those flags now. And if the source is HDR you need to set all the relevent flags for it, not just the colormatrix. The safest way is to always set them based on the input you are using.
There is a lot of UHD Rec.709 content out there. And lots of non-HDR UHD devices to play that content on.

In the modern era, I strongly encourage everyone to set those metadata flags for all content, and set them correctly. The hoops devices run through to try to guess can beggar the mind... 709<>601, so I recommend setting it for SDR content too.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Instant Video

My Compression Book

Amazon Instant Video is hiring! PM me if you're interested.
benwaggoner is offline   Reply With Quote
Old 25th January 2019, 16:40   #4  |  Link
Forteen88
Herr
 
Join Date: Apr 2009
Location: North Europe
Posts: 319
So is there a way to find out the source-video's colormatrix except looking if there's VUI-info about that (viewable in a program like MediaInfo)?
For the Disney short "Presto" Blu-ray, MediaInfo says:
Quote:
Color range: Limited
Color primaries: BT.709
Transfer characteristics: BT.709
Matrix coefficients: BT.709
On some video-sources MediaInfo got no such info.

EDIT: Thanks nevcairiel. And yeah, to be clear, the 'Presto' Blu-ray I tested was 1080p HD video-source.

Last edited by Forteen88; 25th January 2019 at 17:36. Reason: thanking
Forteen88 is offline   Reply With Quote
Old 25th January 2019, 16:55   #5  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 9,534
If there is no info in the video bitstream, all you can do is guess. An educated guess in most cases accounting for source, resolution, etc, but a guess nonetheless.

Most HD video is in 99.9% of all cases BT.709 all the way through just like your example. UHD can be either.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel 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 03:48.


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