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 22nd May 2018, 20:20   #61  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 2,837
Quote:
Originally Posted by sneaker_ger View Post
Some specs may even require it. E.g. UltraHD Blu-Ray demands type 2 for all BT.2020 content.
The scary thing is, I don't know that either encoders or playback are actually doing the proper RGB <-> 4:2:0 w/ chromaloc 2 correct placement.


It may be that all the UHD HDR stuff actually is using the chromaloc 0 positioning, which works because both encoders and decoders ignore it.


Any error at 2160p isn't likely to be visible; worse case it would be 25% the impact CUE was at 1080p.

But I get nervous about what might happen if some encoders and/or players do it correctly and some don't, for content at lower resolutions. And no one seems to have a good test pattern for this.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 18th November 2018, 16:45   #62  |  Link
no-one
Registered User
 
Join Date: Dec 2011
Posts: 33
Quote:
Originally Posted by Qarmaa View Post
Problem solved using last build (not stable). Now video encoded with --uhd-bd mux in seamless correctly.
I found this error too. can you tell me how to fix this?

Thank you.
no-one is offline   Reply With Quote
Old 19th February 2019, 02:04   #63  |  Link
redbtn
Registered User
 
redbtn's Avatar
 
Join Date: Jan 2019
Posts: 10
chromaloc

Quote:
Originally Posted by benwaggoner View Post
The whole --chromaloc 2 thing is a little suspect for me in general. It's required by UHD-BD, but I don't know that sources are ever converted to that, nor if decoders/displays correct for that in their YUV-RGB conversion. So you might removing ut_h_chr_pos etcetera from ffmpeg and remove chromaloc 2 from x265.
I read this topic and another one (https://forum.doom9.org/showthread.p...41#post1766641) and dont understand do i need --chromaloc 2 or --chromaloc 0 for encode 4k HDR or 4k->1080p HDR.
VapourSynth ClipInfo() show Chroma Location: Left

VapourSynth Docs:
Quote:
Possible chroma locations (ITU-T H.265 Figure E.1): left, center, top_left, top, bottom_left, bottom
So Left mean 0 i think.

I'm confused. What the right way?
PS: Im encode through vspipe.exe --y4m video.vpy -

Last edited by redbtn; 19th February 2019 at 02:06.
redbtn is offline   Reply With Quote
Old 19th February 2019, 10:00   #64  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,368
--chromaloc is only a flag. You need to set it so fits your content. If your source is chromaloc 2 input and you want chromaloc 0 output you need to filter the content inside VapourSynth accordingly.
sneaker_ger is offline   Reply With Quote
Old 19th February 2019, 10:25   #65  |  Link
redbtn
Registered User
 
redbtn's Avatar
 
Join Date: Jan 2019
Posts: 10
Quote:
Originally Posted by sneaker_ger View Post
--chromaloc is only a flag. You need to set it so fits your content. If your source is chromaloc 2 input and you want chromaloc 0 output you need to filter the content inside VapourSynth accordingly.
Thank you! But I do not understand unfortunately what chromaloc in my source. text.ClipInfo() show Unknown if i just open source via LWLibavSource, if i resize 2160p to 1080p, then Left. How to correctly determine chromaloc?

My VS script
Quote:
clip = core.lsmas.LWLibavSource(source="source.mkv", format="YUV420P10")
clip = core.std.AssumeFPS(clip, fpsnum=24000, fpsden=1001)
clip = core.std.CropRel(clip=clip, left=0, right=0, top=264, bottom=264)
clip = core.fmtc.resample(clip=clip, kernel="spline64", w=1920, h=816, interlaced=False, interlacedd=False)
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10).text.ClipInfo()
clip.set_output()
Source Mediainfo
Quote:
Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Commercial name : HDR10
Format profile : Main 10@L5.1@High
Codec ID : V_MPEGH/ISO/HEVC
Duration : 1 h 58 min
Bit rate : 51.9 Mb/s
Width : 3 840 pixels
Height : 2 160 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 (Type 2)
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.261
Stream size : 42.9 GiB (100%)
Language : English
Default : Yes
Forced : No
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : Display P3
Mastering display luminance : min: 0.0000 cd/m2, max: 1000 cd/m2
Maximum Content Light Level : 1000 cd/m2
Maximum Frame-Average Light Level : 73 cd/m2

Attached Images
  
redbtn is offline   Reply With Quote
Old 12th March 2019, 16:26   #66  |  Link
blublub
Registered User
 
Join Date: Jan 2015
Posts: 62
Hi

Do I need special switches for HDR besides the ones I already use?

I currently use:
--profile main10
--output-depth 10
--colorprim bt2020

My encoded movies work as HDR on my TV look realy good.

So my primary question is do I need "--hdr-opt" as it is often referred to in this forum but mostly on older threads.
blublub is online now   Reply With Quote
Old 12th March 2019, 17:51   #67  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,486
You should use this, yes. It applies offsets to chroma QPs to improve quality for HDR encoding.

You should really signal --transfer smpte2084 (to signal the PQ curve) and --colormatrix bt2020nc. You should also signal HDR10 static metadata e.g. --master-display and --max-cll if available. This will give your display as much info as possible to present the best possible HDR image.

https://x265.readthedocs.io/en/default/cli.html
Blue_MiSfit is offline   Reply With Quote
Old 13th March 2019, 09:01   #68  |  Link
blublub
Registered User
 
Join Date: Jan 2015
Posts: 62
Quote:
Originally Posted by Blue_MiSfit View Post
You should use this, yes. It applies offsets to chroma QPs to improve quality for HDR encoding.

You should really signal --transfer smpte2084 (to signal the PQ curve) and --colormatrix bt2020nc. You should also signal HDR10 static metadata e.g. --master-display and --max-cll if available. This will give your display as much info as possible to present the best possible HDR image.

https://x265.readthedocs.io/en/default/cli.html
uuuuh ok

I can easily set:
--transfer smpte2084
--colormatrix bt2020nc
--hdr-opt

But how do I set " --master-display" and "--max-cll" that looks really complicated.
blublub is online now   Reply With Quote
Old 13th March 2019, 09:27   #69  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,368
Most people look up the source parameters using MediaInfo and then use those values. For master-display these have to be re-calculated but most sources seem to use the very same parameters for the color coordinates anyway where MediaInfo will say "Mastering display color primaries : Display P3" and it's the exact values you find as an example in the x265 docs.
https://x265.readthedocs.io/en/defau...master-display

Also if MediaInfo says "Chroma subsampling : 4:2:0 (Type 2)" set --chromaloc 2.
sneaker_ger is offline   Reply With Quote
Old 13th March 2019, 11:09   #70  |  Link
blublub
Registered User
 
Join Date: Jan 2015
Posts: 62
Quote:
Originally Posted by sneaker_ger View Post
Most people look up the source parameters using MediaInfo and then use those values. For master-display these have to be re-calculated but most sources seem to use the very same parameters for the color coordinates anyway where MediaInfo will say "Mastering display color primaries : Display P3" and it's the exact values you find as an example in the x265 docs.
https://x265.readthedocs.io/en/defau...master-display

Also if MediaInfo says "Chroma subsampling : 4:2:0 (Type 2)" set --chromaloc 2.
OK, thx.

I checked some encoded HDR files and the max-cll values are set correctly. Also the master-display information is included but I can't see those values in the ripped original files with media info - kinda strange.

Last edited by blublub; 13th March 2019 at 11:24.
blublub is online now   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 22:26.


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