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 27th September 2020, 10:56   #1  |  Link
ghostshadow
Registered User
 
Join Date: Jan 2020
Posts: 20
x265 and Dolby Vision

Hello, is it possible today to encode a UHD Dolby vision in x265?
If so, I would like to know the method.
I tried by extracting the 2 Dolby layers (BL + EL).
The BL being the main layer with the video and the EL mainly containing the specific dolby meta if I understood (afterwards I only had a Dolby UHD available).
I tested by encoding the BL layer and giving the dolby-vision-rpu the EL file.
- it does not work rpu non-compliant.
I tested without dolby-vision-rpu.
-it does not work.
I tested by 'merging' the BL + EL with the 'yusesope' method and encoding this track BL_EL.hevc without dolby-vision-rpu.
-it does not work. Mistake :
x265 [error]: x265_encoder_open () failed for Enc,

aborted at input frame 1, output frame 0 in x265

So we have to do a mkv remux of the UHD dolby vision, then extract the video track (as usual when we do standard hdr versions), and encode this video track by specifying just the –dolby-vision-profile?
thank you in advance
ghostshadow is offline   Reply With Quote
Old 27th September 2020, 15:55   #2  |  Link
SeeMoreDigital
Registered User
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 11,821
I don't know if this is going to help you. But after backing-up the Dolby Vision version of 'The Fifth Element', I noticed the following 'Encode Settings: -

Code:
General
ID                                       : 1 (0x1)
Complete name                            : \\SYNOLOGY_NAS\My HD Movies\UHD Movies\The Fifth Element [1997] 206mins (78.4GB)\AVCHD\BDMV\STREAM\00000.m2ts
Format                                   : BDAV
Format/Info                              : Blu-ray Video
File size                                : 78.4 GiB
Duration                                 : 2 h 6 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 88.9 Mb/s
Maximum Overall bit rate                 : 35.5 Mb/s

Video #1
ID                                       : 4113 (0x1011)
Menu ID                                  : 1 (0x1)
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L5.1@High
HDR format                               : SMPTE ST 2086, HDR10 compatible
Codec ID                                 : 36
Duration                                 : 2 h 6 min
Width                                    : 3 840 pixels
Height                                   : 2 160 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 24.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0 (Type 2)
Bit depth                                : 10 bits
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.0001 cd/m2, max: 1000 cd/m2

Video #2
ID                                       : 4117 (0x1015)
Menu ID                                  : 1 (0x1)
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L5.1@High
HDR format                               : SMPTE ST 2086, HDR10 compatible
Codec ID                                 : 36
Duration                                 : 2 h 6 min
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 24.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0 (Type 2)
Bit depth                                : 10 bits
Writing library                          : x265 3.2+20-a4e060a44839:[Windows][GCC 6.3.0][64 bit] 10bit
Encoding settings                        : cpuid=1111039 / frame-threads=5 / numa-pools=16,16 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 /
 input-res=1920x1080 / interlace=0 / total-frames=3854 / level-idc=51 / high-tier=1 / uhd-bd=1 / ref=3 / no-allow-non-conformance / repeat-headers / annexb / aud / hrd /
 info / hash=0 / no-temporal-layers / no-open-gop / min-keyint=1 / keyint=24 / gop-lookahead=0 / bframes=3 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=24 /
 lookahead-slices=6 / scenecut=40 / hist-scenecut=0 / radl=0 / no-splice / no-intra-refresh / ctu=64 / min-cu-size=8 / no-rect / no-amp / max-tu-size=32 / 
tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=0 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / 
strong-intra-smoothing / max-merge=3 / limit-refs=1 / no-limit-modes / me=1 / subme=2 / merange=57 / temporal-mvp / no-frame-dup / no-hme / weightp / no-weightb / 
no-analyze-src-pics / deblock=0:0 / sao / no-sao-non-deblock / rd=3 / selective-sao=4 / early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / b-intra / 
no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=0.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=cbr / bitrate=500 / qcomp=0.60 / qpstep=4 / 
stats-write=0 / stats-read=0 / vbv-maxrate=500 / vbv-bufsize=550 / vbv-init=0.9 / ipratio=1.40 / pbratio=1.30 / aq-mode=2 / aq-strength=1.00 / cutree / zone-count=0 / 
no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=9 / transfer=16 / colormatrix=9 /
 chromaloc=1 / chromaloc-top=2 / chromaloc-bottom=2 / display-window=0 / master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,1) / cll=0,0 /
 min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps /
 scenecut-bias=0.05 / hist-threshold=0.01 / no-opt-cu-delta-qp / no-aq-motion / hdr / hdr-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=5 / 
scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=1 / refine-ctu-distortion=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-analysis-type=0 / 
copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei / no-hevc-aq / no-svt / no-field / qp-adaptation-range=1.00 / no-scenecut-aware-qp
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.0001 cd/m2, max: 1000 cd/m2

Audio #1
ID                                       : 4352 (0x1100)
Menu ID                                  : 1 (0x1)
Format                                   : AC-3 MLP FBA 16-ch
Format/Info                              : Audio Coding 3 + Meridian Lossless Packing FBA with 16-channel presentation
Commercial name                          : Dolby TrueHD with Dolby Atmos
Muxing mode                              : Stream extension
Codec ID                                 : 131
Duration                                 : 2 h 6 min
Bit rate mode                            : Variable
Bit rate                                 : 640 kb/s
Maximum bit rate                         : 6 342 kb/s
Channel(s)                               : 8 channels
Channel layout                           : L R C LFE Ls Rs Lb Rb
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 578 MiB (1%)
Service kind                             : Complete Main
Number of dynamic objects                : 11
Bed channel count                        : 1 channel
Bed channel configuration                : LFE

Audio #2
ID                                       : 4353 (0x1101)
Menu ID                                  : 1 (0x1)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Codec ID                                 : 129
Duration                                 : 2 h 6 min
Bit rate mode                            : Constant
Bit rate                                 : 640 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls Rs
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 578 MiB (1%)
Service kind                             : Complete Main

Text
ID                                       : 4768 (0x12A0)
Menu ID                                  : 1 (0x1)
Format                                   : PGS
Codec ID                                 : 144

Cheers
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |

Last edited by SeeMoreDigital; 27th September 2020 at 16:01.
SeeMoreDigital is offline   Reply With Quote
Old 28th September 2020, 17:19   #3  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 3,627
Quote:
Originally Posted by ghostshadow View Post
Hello, is it possible today to encode a UHD Dolby vision in x265?
If so, I would like to know the method.
I tried by extracting the 2 Dolby layers (BL + EL).
The BL being the main layer with the video and the EL mainly containing the specific dolby meta if I understood (afterwards I only had a Dolby UHD available).
I tested by encoding the BL layer and giving the dolby-vision-rpu the EL file.
- it does not work rpu non-compliant.
I tested without dolby-vision-rpu.
-it does not work.
I tested by 'merging' the BL + EL with the 'yusesope' method and encoding this track BL_EL.hevc without dolby-vision-rpu.
-it does not work. Mistake :
x265 [error]: x265_encoder_open () failed for Enc,

aborted at input frame 1, output frame 0 in x265

So we have to do a mkv remux of the UHD dolby vision, then extract the video track (as usual when we do standard hdr versions), and encode this video track by specifying just the –dolby-vision-profile?
thank you in advance
Yes, x265 absolutely supports encoding Dolby Vision, but only the single-layer Profiles 5, 8.1, and 8.2. So not the dual layer profiles. Profile 5 encodes the same quality at about 20% lower bitrate than dual layer, so that's what everyone is using today for offline playback unless they NEED the SDR backwards compatibility for some reason. Profile 8.x is targeted for live and not supported by all older Dolby Vision players. Profile 8.1 is an HDR-10 base layer plus metadata, ala HDR10+, so has good backwards compatibility.

These are the relevant command line parameters:

--dolby-vision-profile <integer|float>
Generate bitstreams confirming to the specified Dolby Vision profile, note that 0x7C01 makes RPU appear to be an unspecified NAL type in HEVC stream. If BL is backward compatible, Dolby Vision single layer VES will be equivalent to a backward compatible BL VES on legacy device as RPU will be ignored.

The value is specified as a float or as an integer with the profile times 10, for example profile 5 is specified as “5” or “5.0” or “50”.

Currently only profile 5, profile 8.1 and profile 8.2 enabled, Default 0 (disabled)


--dolby-vision-rpu <filename>
File containing Dolby Vision RPU metadata. If given, x265’s Dolby Vision metadata parser will fill the RPU field of input pictures with the metadata read from the file. The library will interleave access units with RPUs in the bitstream. Default NULL (disabled).

CLI ONLY



And for Profile 8.


--dhdr10-info <filename>
Inserts tone mapping information as an SEI message. It takes as input, the path to the JSON file containing the Creative Intent Metadata to be encoded as Dynamic Tone Mapping into the bitstream.

Click here for the syntax of the metadata file. A sample JSON file is available in the downloads page


--dhdr10-opt, --no-dhdr10-opt
Limits the frames for which tone mapping information is inserted as SEI message. Inserts SEI only for IDR frames and for frames where tone mapping information has changed.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 28th September 2020, 18:28   #4  |  Link
SeeMoreDigital
Registered User
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 11,821
Quote:
Originally Posted by benwaggoner View Post
Yes, x265 absolutely supports encoding Dolby Vision, but only the single-layer Profiles 5, 8.1, and 8.2. So not the dual layer profiles. Profile 5 encodes the same quality at about 20% lower bitrate than dual layer, so that's what everyone is using today for offline playback unless they NEED the SDR backwards compatibility for some reason. Profile 8.x is targeted for live and not supported by all older Dolby Vision players. Profile 8.1 is an HDR-10 base layer plus metadata, ala HDR10+, so has good backwards compatibility.
I'm confused...

According to the MediaInfo report I posted above, the 'dual-layer' element of the Dolby Vision file was encoded using x265 3.2+20-a4e060a44839:[Windows][GCC 6.3.0][64 bit] 10bit.


Cheers
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 29th September 2020, 08:22   #5  |  Link
ghostshadow
Registered User
 
Join Date: Jan 2020
Posts: 20
Quote:
Originally Posted by benwaggoner View Post
Yes, x265 absolutely supports encoding Dolby Vision, but only the single-layer Profiles 5, 8.1, and 8.2. So not the dual layer profiles. Profile 5 encodes the same quality at about 20% lower bitrate than dual layer, so that's what everyone is using today for offline playback unless they NEED the SDR backwards compatibility for some reason. Profile 8.x is targeted for live and not supported by all older Dolby Vision players. Profile 8.1 is an HDR-10 base layer plus metadata, ala HDR10+, so has good backwards compatibility.
Ok thank,so if I understand correctly you should preferably use profile 5.
So to do things right from a UHD Blu-ray: you have to make a backup with MakeMKV by combining the two original video tracks into one track.
Then we encode this video track in x265 (BL + EL + RPU). ?
Quote:
Originally Posted by benwaggoner View Post
--dolby-vision-rpu <filename>
File containing Dolby Vision RPU metadata. If given, x265’s Dolby Vision metadata parser will fill the RPU field of input pictures with the metadata read from the file. The library will interleave access units with RPUs in the bitstream. Default NULL (disabled).
I thought we couldn't extract the rpu metadata into a binary file
Personally I tested Davinci Resolve, I was able to create a Trim Dolby vision meta file but it is in xml and given what is in it I doubt that it is the dynamic dolby vision data, there may be too much. .

Last edited by ghostshadow; 29th September 2020 at 10:59.
ghostshadow is offline   Reply With Quote
Old 29th September 2020, 17:48   #6  |  Link
SeeMoreDigital
Registered User
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 11,821
Another dual-layer Dolby Vision example with both layers encoded using x265: -

Code:
General
ID                                       : 0 (0x0)
Complete name                            : E:\Dolby Vision Tests [Temp]\StudioCanal Dolby Vision Test\00004.m2ts
Format                                   : BDAV
Format/Info                              : Blu-ray Video
File size                                : 209 MiB
Duration                                 : 20 s 725 ms
Overall bit rate mode                    : Variable
Overall bit rate                         : 84.7 Mb/s
Maximum Overall bit rate                 : 109 Mb/s

Video #1
ID                                       : 4113 (0x1011)
Menu ID                                  : 1 (0x1)
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L5.1@High
HDR format                               : SMPTE ST 2086, HDR10 compatible
Codec ID                                 : 36
Duration                                 : 20 s 41 ms
Width                                    : 3 840 pixels
Height                                   : 2 160 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 24.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0 (Type 2)
Bit depth                                : 10 bits
Writing library                          : x265 3.2+20-a4e060a44839:[Windows][GCC 6.3.0][64 bit] 10bit
Encoding settings                        : cpuid=1111039 / frame-threads=6 / numa-pools=16,16 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / 
input-res=3840x2160 / interlace=0 / total-frames=481 / level-idc=51 / high-tier=1 / uhd-bd=1 / ref=5 / no-allow-non-conformance / repeat-headers / annexb / aud / hrd / 
info / hash=0 / no-temporal-layers / no-open-gop / min-keyint=1 / keyint=24 / gop-lookahead=0 / bframes=3 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=24 / 
lookahead-slices=0 / scenecut=10 / hist-scenecut=0 / radl=0 / splice / no-intra-refresh / ctu=64 / min-cu-size=8 / rect / amp / max-tu-size=32 / tu-inter-depth=3 / 
tu-intra-depth=3 / limit-tu=0 / rdoq-level=2 / dynamic-rd=0.00 / no-ssim-rd / signhide / tskip / nr-intra=0 / nr-inter=0 / constrained-intra / no-strong-intra-smoothing / 
max-merge=5 / limit-refs=0 / no-limit-modes / me=3 / subme=4 / merange=57 / temporal-mvp / no-frame-dup / no-hme / weightp / weightb / no-analyze-src-pics / deblock=-2:-2 / 
no-sao / no-sao-non-deblock / rd=6 / selective-sao=0 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / cu-lossless / b-intra / no-splitrd-skip / rdpenalty=0 / 
psy-rd=5.00 / psy-rdoq=50.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=abr / bitrate=78000 / qcomp=0.60 / qpstep=4 / stats-write=1 / stats-read=0 / 
slow-firstpass / vbv-maxrate=82000 / vbv-bufsize=99000 / vbv-init=0.9 / ipratio=1.40 / pbratio=1.30 / aq-mode=3 / aq-strength=1.00 / no-cutree / zone-count=0 / no-strict-cbr / 
qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=9 / transfer=16 / colormatrix=9 / chromaloc=1 / 
chromaloc-top=2 / chromaloc-bottom=2 / display-window=0 / master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,1) / cll=0,0 / min-luma=0 / 
max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / 
hist-threshold=0.01 / no-opt-cu-delta-qp / no-aq-motion / hdr / hdr-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=5 / scale-factor=0 / refine-intra=0 / 
refine-inter=0 / refine-mv=1 / refine-ctu-distortion=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-analysis-type=0 / copy-pic=1 / max-ausize-factor=1.0 / 
no-dynamic-refine / no-single-sei / no-hevc-aq / no-svt / no-field / qp-adaptation-range=1.00 / no-scenecut-aware-qp
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.0001 cd/m2, max: 1000 cd/m2

Video #2
ID                                       : 4117 (0x1015)
Menu ID                                  : 1 (0x1)
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L5.1@High
HDR format                               : SMPTE ST 2086, HDR10 compatible
Codec ID                                 : 36
Duration                                 : 20 s 41 ms
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 24.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0 (Type 2)
Bit depth                                : 10 bits
Writing library                          : x265 3.2+20-a4e060a44839:[Windows][GCC 6.3.0][64 bit] 10bit
Encoding settings                        : cpuid=1111039 / frame-threads=5 / numa-pools=16,16 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 /
input-res=1920x1080 / interlace=0 / total-frames=481 / level-idc=51 / high-tier=1 / uhd-bd=1 / ref=4 / no-allow-non-conformance / repeat-headers / annexb / aud / hrd / 
info / hash=0 / no-temporal-layers / no-open-gop / min-keyint=1 / keyint=24 / gop-lookahead=0 / bframes=3 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=24 / 
lookahead-slices=4 / scenecut=40 / hist-scenecut=0 / radl=0 / splice / no-intra-refresh / ctu=64 / min-cu-size=8 / rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / 
tu-intra-depth=1 / limit-tu=0 / rdoq-level=2 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / 
max-merge=3 / limit-refs=3 / limit-modes / me=3 / subme=3 / merange=57 / temporal-mvp / no-frame-dup / no-hme / weightp / no-weightb / no-analyze-src-pics / deblock=0:0 / 
sao / no-sao-non-deblock / rd=4 / selective-sao=4 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / 
psy-rd=2.00 / psy-rdoq=1.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=cbr / bitrate=500 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / 
vbv-maxrate=500 / vbv-bufsize=550 / vbv-init=0.9 / ipratio=1.40 / pbratio=1.30 / aq-mode=2 / aq-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / 
no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=9 / transfer=16 / colormatrix=9 / chromaloc=1 / 
chromaloc-top=2 / chromaloc-bottom=2 / display-window=0 / master-display=G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(10000000,1) / cll=0,0 / min-luma=0 / 
max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / 
hist-threshold=0.01 / no-opt-cu-delta-qp / no-aq-motion / hdr / hdr-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=5 / scale-factor=0 / refine-intra=0 / 
refine-inter=0 / refine-mv=1 / refine-ctu-distortion=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-analysis-type=0 / copy-pic=1 / max-ausize-factor=1.0 / 
no-dynamic-refine / no-single-sei / no-hevc-aq / no-svt / no-field / qp-adaptation-range=1.00 / no-scenecut-aware-qp
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.0001 cd/m2, max: 1000 cd/m2

Audio
ID                                       : 4352 (0x1100)
Menu ID                                  : 1 (0x1)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Muxing mode                              : Stream extension
Codec ID                                 : 131
Duration                                 : 20 s 42 ms
Bit rate mode                            : Variable
Bit rate                                 : 640 kb/s
Maximum bit rate                         : 4 341 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls Rs
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 1.53 MiB (1%)
Service kind                             : Complete Main

Text
ID                                       : 4768 (0x12A0)
Menu ID                                  : 1 (0x1)
Format                                   : PGS
Codec ID                                 : 144
Delay relative to video                  : 83 ms
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |

Last edited by SeeMoreDigital; 3rd October 2020 at 11:19.
SeeMoreDigital is offline   Reply With Quote
Old 29th September 2020, 20:03   #7  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 3,627
Quote:
Originally Posted by SeeMoreDigital View Post
I'm confused...

According to the MediaInfo report I posted above, the 'dual-layer' element of the Dolby Vision file was encoded using x265 3.2+20-a4e060a44839:[Windows][GCC 6.3.0][64 bit] 10bit.
It is certainly possible to use x265 to encode the two layers, like you can encode anything. x265 just doesn't have built in support, so other operations in other software needs to be performed before and after.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 29th September 2020, 20:05   #8  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 3,627
Quote:
Originally Posted by ghostshadow View Post
Ok thank,so if I understand correctly you should preferably use profile 5.
So to do things right from a UHD Blu-ray: you have to make a backup with MakeMKV by combining the two original video tracks into one track.
Then we encode this video track in x265 (BL + EL + RPU). ?
That wouldn't be Profile 5, which doesn't have a video enhancement layer, just a metadata one. You'd need tools from Dolby or that have licensed a Dolby SDK to convert from dual layer to Profile 5.

Quote:
I thought we couldn't extract the rpu metadata into a binary file
Personally I tested Davinci Resolve, I was able to create a Trim Dolby vision meta file but it is in xml and given what is in it I doubt that it is the dynamic dolby vision data, there may be too much. .
How big was it?
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 29th September 2020, 20:17   #9  |  Link
SeeMoreDigital
Registered User
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 11,821
And just to confuse matters further. There are two different enhancement layers.

MEL = 10-bit minimal enhancement layer (encoded at 2Mbps or below)
FEL = 12-bit full enhancement layer (encoded at 3Mbps or much, much higher)

---------------------------------------------------------------------------------------------

Edit: And for anyone who's not tried it yet...

When you re-mux the secondary (1920x1080) Dolby Vision HEVC video stream/layer into either the .mkv or .m2ts container and play it in either a software player or hardware playback device. A MEL encoded video stream looks like this:



...but a FEL encoded video stream looks like this:




Cheers
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |

Last edited by SeeMoreDigital; 4th October 2020 at 19:32. Reason: Added MEL and FEL images
SeeMoreDigital is offline   Reply With Quote
Old 29th September 2020, 21:41   #10  |  Link
ghostshadow
Registered User
 
Join Date: Jan 2020
Posts: 20
i used yusesope tools to combine the Bl + the El into one. After I made an iso with TsMuxer, then I extracted the x265 to encode it

for the rpu Trim Dolby vision 7 ko for the xml
Attached Files
File Type: txt Midway 1 (Resolve) - Copie.txt (5.8 KB, 114 views)

Last edited by ghostshadow; 29th September 2020 at 21:46.
ghostshadow is offline   Reply With Quote
Old 30th September 2020, 00:22   #11  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 3,627
Quote:
Originally Posted by ghostshadow View Post
i used yusesope tools to combine the Bl + the El into one. After I made an iso with TsMuxer, then I extracted the x265 to encode it

for the rpu Trim Dolby vision 7 ko for the xml
That looks like the data for a single dynamic metadata state, used for one or a few frames. Not for an entire title.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 30th September 2020, 07:09   #12  |  Link
ghostshadow
Registered User
 
Join Date: Jan 2020
Posts: 20
Quote:
Originally Posted by benwaggoner View Post
That looks like the data for a single dynamic metadata state, used for one or a few frames. Not for an entire title.
thanks, that's what seemed to me. I must not use DavinciResolve well
Quote:
Originally Posted by benwaggoner View Post
It is certainly possible to use x265 to encode the two layers, like you can encode anything. x265 just doesn't have built in support, so other operations in other software needs to be performed before and after.
process yusesope :
ffmpeg -i path\to\the\file.m2ts -ss 0 -t 120 -map 0:0 -c copy path\to\BL.hevc
ffmpeg -i path\to\the\file.m2ts -ss 0 -t 120 -map 0:1 -c copy path\to\EL.hevc

Using tool python yusesope, double click on the MUX_AND_CONVERT_TO_MEL.bat file and follow the instructions on the screen.
You will get a BL_EL_RPU.hevc file
Create a TS file using the BL_EL_RPU.hevc file and TsMuxeR
for mp4 using mp4muxer

Last edited by ghostshadow; 30th September 2020 at 07:35.
ghostshadow is offline   Reply With Quote
Old 30th September 2020, 07:26   #13  |  Link
ghostshadow
Registered User
 
Join Date: Jan 2020
Posts: 20
Quote:
Originally Posted by SeeMoreDigital View Post
I don't know if this is going to help you. But after backing-up the Dolby Vision version of 'The Fifth Element', I noticed the following 'Encode Settings: -




Cheers
thanks SeeMoreDigital. What did you back up with? (dvdfab, MakeMKV?)

Quote:
Originally Posted by SeeMoreDigital View Post
Another dual-layer Dolby Vision example with both layers encoded using x265: -
he two video tracks are encoded. I don't quite understand. I thought there was only the base layer to encode.
ghostshadow is offline   Reply With Quote
Old 30th September 2020, 16:19   #14  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 3,627
Quote:
Originally Posted by ghostshadow View Post
he two video tracks are encoded. I don't quite understand. I thought there was only the base layer to encode.
For Profile 5 and Profile 8.1, there is a base layer and a metadata layer without any video bitstream.

The older two layer profiles used a base layer and an enhancement layer combining both a video bitstream and metadata.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 30th September 2020, 20:55   #15  |  Link
SeeMoreDigital
Registered User
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 11,821
Quote:
Originally Posted by ghostshadow View Post
thanks SeeMoreDigital. What did you back up with? (dvdfab, MakeMKV?)
MakeMKV using its (full disc) 'Backup' option...
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 1st October 2020, 06:45   #16  |  Link
ghostshadow
Registered User
 
Join Date: Jan 2020
Posts: 20
Quote:
Originally Posted by SeeMoreDigital View Post
MakeMKV using its (full disc) 'Backup' option...

I am using MakeMKV and the 'save' option does not modify the files and ESPECIALLY does not encode .....
The mediainfo you post shows an Hdr10 encoding there is no dolby vision

Last edited by ghostshadow; 1st October 2020 at 07:22.
ghostshadow is offline   Reply With Quote
Old 1st October 2020, 09:28   #17  |  Link
SeeMoreDigital
Registered User
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 11,821
Quote:
Originally Posted by ghostshadow View Post
I am using MakeMKV and the 'save' option does not modify the files and ESPECIALLY does not encode .....
The mediainfo you post shows an Hdr10 encoding there is no dolby vision
This is most likely an issue with MediaInfo.

The .m2ts file in the second report I posted was extracted directly from 'The Fifth Element' (StudioCanal) 4K UHD disc - Which looks beautiful by-the-way
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 1st October 2020, 11:51   #18  |  Link
ghostshadow
Registered User
 
Join Date: Jan 2020
Posts: 20
Quote:
Originally Posted by SeeMoreDigital View Post
This is most likely an issue with MediaInfo.

The .m2ts file in the second report I posted was extracted directly from 'The Fifth Element' (StudioCanal) 4K UHD disc - Which looks beautiful by-the-way
Ok mais pourquoi alors il est encodé en x265 ?
Ok but why then is it encoded in x265?
ghostshadow is offline   Reply With Quote
Old 1st October 2020, 12:07   #19  |  Link
SeeMoreDigital
Registered User
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 11,821
Quote:
Originally Posted by ghostshadow View Post
Ok but why then is it encoded in x265?
x265 = HEVC
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 1st October 2020, 20:04   #20  |  Link
Stacey Spears
Registered User
 
Join Date: Nov 2009
Location: Sammamish, WA
Posts: 65
Quote:
Originally Posted by SeeMoreDigital View Post
And just to confuse matters further. There are two different enhancement layers.

MEL = 10-bit minimal enhancement layer (encoded at 2Mbps or below)
FEL = 12-bit full enhancement layer (encoded at 3Mbps or much, much higher)
In MEL, YCbCr are all set to 0 in the EL file. It is used to insert the RPU. Bad design, they could have just inserted the RPU into the base layer for MEL instead of this dummy file. 500 kb is the peak recommended for MEL.

In FEL, it stores the delta from the decoded base layer and the original 16-bit TIFFs. (12-bit is derived from the 16-bit TIFF) Dolby recommends 8 Mbps avg and 15 Mbps peak for FEL.

You can encode the base and EL with x265, I have. And then you use either Dolby Encoding Engine (DEE) or their SDK to do the rest. It is a multi step process.

The XML from Resolve is used in conjunction with the 16-bit TIFFs to generate an RPU binary file. The XML contains image statistics, trim pass and aspect ratio information. Additional metadata is pulled from the TIFFs.
__________________
Stacey Spears
Co-Creator, Spears & Munsil Ultra HD Benchmark

Last edited by Stacey Spears; 1st October 2020 at 20:10.
Stacey Spears is offline   Reply With Quote
Reply

Tags
dolby vision, x265

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 15:14.


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