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. |
3rd February 2022, 21:08 | #1 | Link |
Registered User
Join Date: Sep 2004
Posts: 147
|
Opening HEVC 4K HDR 10bit problem
I'm working with Avisynth+, trying do decode HEVC 4K 10 bit video
And want to try to reecode it to usual AVC h264 8bit But somehow I receive orange grass, green sky. After opening. Strange. What am I doing wrong? Maybe this is file for 3d glasses? (green, red) something like that... My avisynth script is simple: LoadPlugin("c:\Program Files (x86)\AviSynth+\plugins+\LSMASHSource.dll") a1="dolby-vision_HEVC_4K_EAC3.mp4" LWLibavVideoSource(a2, format = "YUV420P10") ConvertBits(bits=8, dither=1) converttoYV12() File: https://disk.yandex.ru/d/njJQBo6mTMEaxg Screenshot: https://disk.yandex.ru/i/VqX9ETvRPckgXQ |
4th February 2022, 00:36 | #2 | Link |
Registered User
Join Date: Jan 2019
Location: Canada
Posts: 570
|
Your file is Dolby Vision profile 5, it uses a special colorspace.
Not sure there's a solution for converting it in AVS, but FFmpeg 5.0 with vf_libplacebo should be able to convert it.
__________________
LG C2 OLED | GitHub Projects Last edited by quietvoid; 4th February 2022 at 01:46. |
4th February 2022, 08:48 | #3 | Link |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
|
Working on it...
Well, I know that the sky is supposed to be blue, but what about the rest? XD Do you have any official specs about which color scheme is using? Anyway, this is the first beta attempt Original: LinearTransformation(): expect a new beta soon... (after breakfast) |
4th February 2022, 10:06 | #4 | Link |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
|
Ok, I've updated the master, try with:
Code:
LinearTransformation(Input="dvhe0509", Output="Linear_BT709") We're still far far off from a real implementation, but I can't find any official document on the web... Reverse engineering everything is hard, especially 'cause I don't have a color palette anywhere in the video... Anyway, so far it produces this on your particular sample: High res pics here: https://i.imgur.com/mI0qbKs.png - https://i.imgur.com/y20y40f.png - https://i.imgur.com/5ZFcmvU.png EDIT: Work in progress here too https://code.videolan.org/videolan/l...ests/207/diffs Last edited by FranceBB; 4th February 2022 at 10:26. |
4th February 2022, 14:36 | #5 | Link | |
Registered User
Join Date: Jan 2019
Location: Canada
Posts: 570
|
Quote:
Apparently Dolby only has code. Basically you have some form of ICtCp with ST2084 transfer function, with luma being reshaped into pseudo-SDR. So it requires the metadata/RPU to decode/reshape properly. Both FFmpeg 5.0 (decoding) and libplacebo/mpv (rendering) support this now. It could be added to ffms2 for AVS (it's already there for the VapourSynth plugin). See https://github.com/FFMS/ffms2/commit...f9c021653d50f5 Though that only propagates the metadata. The original info comes from ETSI GS CCM 001 V1.1.1, which describes the process in pseudocode.
__________________
LG C2 OLED | GitHub Projects Last edited by quietvoid; 4th February 2022 at 14:52. |
|
5th February 2022, 18:06 | #7 | Link | |
Registered User
Join Date: Sep 2004
Posts: 147
|
Quote:
|
|
6th February 2022, 10:50 | #9 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,259
|
may be those over at https://www.murideo.com/test-pattern-library.html help,... (not sure they have the right version)
|
25th February 2022, 21:29 | #13 | Link |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
|
Just FYI in case anyone is interested, we now have a proper version: https://forum.doom9.org/showthread.p...42#post1964642
|
Tags |
10bits, avisynth, hdr, hevc. h.265 |
Thread Tools | Search this Thread |
Display Modes | |
|
|