Log in

View Full Version : Getting AVISynth+ to pass HDR through to tv


Qaenos
29th December 2020, 14:52
How do I get AVISynth+ to pass the HDR data through to the display?

I have an HEVC sample file with HDR - "HDRSample.mp4".

If I play the sample using MPC-HC and MadVR set to passthrough the HDR to the display, my tv switches to HDR mode automatically and everything looks great.

However, if I open the file using AVISynth+, the HDR data doesn't seem to go through to the display, even though MadVR is running and is set to do that.

To open the file, I have tried ffms2, L-SMASH and DirectShowSource without any parameters, e.g.:

ffms2("HDRSample.mp4")

What do I need to do to open a HDR video with AVISynth+ and pass that video with its HDR data through to my display?

Here's the info on the sample file I am using:

General
Complete name : C:\Test\HDRSample.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom)
File size : 724 MiB
Duration : 1 min 23 s
Overall bit rate mode : Variable
Overall bit rate : 73.1 Mb/s
Encoded date : UTC 2016-10-24 05:40:14
Tagged date : UTC 2016-10-24 05:40:14

Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5.1@High
HDR format : SMPTE ST 2086, HDR10 compatible
Codec ID : hvc1
Codec ID/Info : High Efficiency Video Coding
Duration : 1 min 23 s
Bit rate : 72.9 Mb/s
Maximum bit rate : 94.2 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 59.940 (60000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0 (Type 2)
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.147
Stream size : 722 MiB (100%)
Encoded date : UTC 2016-10-24 06:37:11
Tagged date : UTC 2016-10-24 05:40:23
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primar : R: x=1.000000 y=1.000000, G: x=1.000000 y=1.000000, B: x=1.000000 y=1.000000, White point: x=1.000000 y=1.000000
Mastering display luminance : min: 0.1000 cd/m2, max: 1 cd/m2
Codec configuration box : hvcC

Audio
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 1 min 23 s
Source duration : 1 min 23 s
Bit rate mode : Variable
Bit rate : 192 kb/s
Maximum bit rate : 197 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 1.90 MiB (0%)
Source stream size : 1.90 MiB (0%)
Language : English
Encoded date : UTC 2016-10-24 06:37:11
Tagged date : UTC 2016-10-24 05:40:23

poisondeathray
29th December 2020, 16:36
Currently not possible;

avisynth frameserves uncompressed video, audio. HDR metadata is not passed

Qaenos
29th December 2020, 17:37
Currently not possible;

avisynth frameserves uncompressed video, audio. HDR metadata is not passed

Thank you. Obviously I am new to this, thank you for helping.

So do I need to do a HDR to SDR conversion if I want to use AVISYnth? How do I get AVISynth to play a HDR video with as good video quality (or perceptually as good) on my 4K HDR TV as I can if I just opened it by MPC-HC/MadVR and passed the HDR metadata direct to the tv?