This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

First steps with Hybrid
It's still on my todo list for the week. Didn't have time to test it over the Christmas holidays.

Cu Selur
Reply
There is no rush Mr. Selur grateful for your help and your professionalism  Big Grin Big Grin
Reply
Okay, I have been thinking about the rpu extraction and how or whether I could include it into Hybrid.

dovi_tool:
1. allows to extract the rpu data
ffmpeg -i "path to HDR-DV file" -c:v copy -vbsf hevc_mp4toannexb -f hevc - | dovi_tool extract-rpu - --rpu-out "path to output RPU file"
2. allows to demuxes single track dual layer Dolby Vision into base and enhancement layer files
... | dovi_tool demux - --bl-out "path to base hevc file" --el-out "path to enhanced hevc file"

So far so good.
Now the main questions are:
1. What does that allow to be done?
2. How could that be integrated into Hybrid?

Problem is I have:
a. no real clue about Dolby Vision (aside from that it's dynamic HDR and no free software player supports it atm.)
b. I have no means to properly playback a Dolby Vision file to verify the output.

Since x265 is the only encoder which supports adding Dolby Vision rpu data atm. I could add an option that would tell Hybrid to:
a. extract the rpu data from the input
b. use that data during the reencoding
Afaik this would only work if:
a. the length of the clip doesn't change
b. the resolution of the clip doesn't change
c. not too much filtering is used
d. output format stays hevc 10bit with hdr-dv data
Checking the input&output length and resolution would be an easy check. (Hybrid would not check the filtering)

Atm. the only thing integrating dovi_tool would bring is it that one could reencode a hdr-dv file. (without having to extract the rpu file manually before the reencoding)

So I'm wondering: Is it worth integrating support for it atm?

-> Since you mentioned it I would be happy to hear your thoughts (and others if they read this) about it. Smile

Cu Selur

Ps.: good news is that dovi_tool is available for Windows, Linux and Mac. Smile
Reply
Well in principle I don't have a DV player either, Mr. Selur.
If you want, you can pass me a piece of the file and a member of the group could reproduce it.
Regarding what you tell me
First, I could insert it in the Hybrid program for encodes that had crop and resize with a HEVC Dolby Vision layer, dvhe.08.03 BL + RPU, Main 10 @ L5.1 @ High because when encoding the EL layer would disappear but it would remain with the dynamic metadata and something would improve the encode and then when it is not encoded and the source is left as is but compressed without crop or resize and it would stay like this Dolby Vision, Version 1.0, dvhe.07.06, BL + EL + RPU, Blu- ray compatible / SMPTE ST 2086, HDR10 compatible

I do not know if I have explained myself well, I am still learning about the subject and I do not know any English and I am using a translator, anyway I have told a colleague of the group who knows more than me to stop by and comment.

Thank you Mr. Selur
Reply
To me it looks atm. that:
a. when passing through the video stream splitting in base and enhanced layer is not needed/useful
b. when reencoding splitting the video stream in base and enhanced layer is not needed since all decoders I saw so far just decode the base layer and the dynamic data should be re-added during the reencoding through the rpu data. (at least that is what I gather so far)
Main problem is that cropping, resizing (and any more aggressive filtering of the source) would require to adjusting the rpu data and I have no clue how that should be done.
-> Don't know much about Dolby Vision myself so it would be helpful to get some details.

Cu Selur
Reply
Hello Mr. Selur, I am doing tests with a colleague, the moment we know something I tell him.

Thank you  Wink
Reply
Hello Mr. Selur, we have carried out the tests by taking the rpu data with the dovi_tool program, we have created an encode with crop and resize and we have loaded it into the Hybrid the rpu data and effectively when playing the video with the Nvidia Shield TV 4K if it said it was Dolby Vision, but green screens were coming out.
Then I reloaded the source and I did not crop or resize and I only compressed the film and the same thing happens as before, it loads the film as Dolby Vision, but it gives green screens.
Well, the only thing I have left is for you to pass me a file with the rpu data you have made and pass it on to the partner and play it with the Nvidia Shield TV 4K in case I have encoded it wrong.

Thank you very much for your help and sorry for any spelling mistakes   Wink Wink
Reply
Used "LG Amaze Dolby Vision UHD 4K Demo.ts" a file with Dolby Vision, but no HDR-10 data.

  1. extracted dv data with:
    ffmpeg -i "E:\HDR_DV_Test\LG Amaze Dolby Vision UHD 4K Demo.ts" -c:v copy -an -vbsf hevc_mp4toannexb -f hevc - | dovi_tool extract-rpu - --rpu-out "E:\HDR_DV_Test\RPU_data.bin"
    which gave the following output:
    ffmpeg version N-100400-g5f7dc836ce-gd76469378d+4 Copyright (c) 2000-2020 the FFmpeg developers
      built with gcc 10.2.0 (Rev5, Built by MSYS2 project)
      configuration:  --pkg-config=pkgconf --cc='ccache gcc' --cxx='ccache g++' --disable-autodetect --enable-amf --enable-bzlib --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-iconv --enable-lzma --enable-nvenc --enable-zlib --enable-sdl2 --enable-ffnvcodec --enable-nvdec --enable-cuda-llvm --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libdav1d --disable-debug --enable-fontconfig --enable-libass --enable-libbluray --enable-libfreetype --enable-libmfx --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libwebp --enable-libxml2 --enable-libzimg --enable-libshine --enable-gpl --enable-avisynth --enable-libxvid --enable-libaom --enable-libopenmpt --enable-version3 --enable-libsvthevc --enable-libsvtav1 --enable-libkvazaar --enable-libzmq --enable-libvmaf --enable-vapoursynth --disable-libdavs2 --enable-librav1e --enable-mbedtls --extra-cflags=-DLIBTWOLAME_STATIC --extra-libs=-lstdc++ --extra-cflags=-DZMQ_STATIC --extra-cflags=-DLIBXML_STATIC --extra-libs=-liconv --disable-w32threads --extra-cflags=-DKVZ_STATIC_LIB
      libavutil      56. 62.100 / 56. 62.100
      libavcodec     58.115.102 / 58.115.102
      libavformat    58. 65.100 / 58. 65.100
      libavdevice    58. 11.103 / 58. 11.103
      libavfilter     7. 93.100 /  7. 93.100
      libswscale      5.  8.100 /  5.  8.100
      libswresample   3.  8.100 /  3.  8.100
      libpostproc    55.  8.100 / 55.  8.100
    [hevc @ 000001d41fd4a1c0] Skipping NAL unit 62
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'E:\HDR_DV_Test\LG Amaze Dolby Vision UHD 4K Demo.ts':
      Metadata:
        major_brand     : mp42
        minor_version   : 1
        compatible_brands: mp42dby1isom
        creation_time   : 2017-04-13T20:09:18.000000Z
      Duration: 00:00:56.20, start: 0.000000, bitrate: 28362 kb/s
        Stream #0:0(und): Video: hevc (Main 10) (dvhe / 0x65687664), yuv420p10le(tv), 3840x2160 [SAR 1:1 DAR 16:9], 27713 kb/s, 60 fps, 60 tbr, 60k tbn, 60 tbc (default)
        Metadata:
          creation_time   : 2017-04-13T20:09:18.000000Z
          handler_name    : video handler
          vendor_id       : [0][0][0][0]
          encoder         : DOVI Coding
        Side data:
          DOVI configuration record: version: 1.0, profile: 5, level: 9, rpu flag: 1, el flag: 0, bl flag: 1, compatibility id: 0
        Stream #0:1(und): Audio: eac3 (ec-3 / 0x332D6365), 48000 Hz, 5.1(side), fltp, 640 kb/s (default)
        Metadata:
          creation_time   : 2017-04-13T20:09:18.000000Z
          handler_name    : sound handler
          vendor_id       : [0][0][0][0]
        Side data:
          audio service type: main
    [hevc_mp4toannexb @ 000001d421503e80] No parameter sets in the extradata
    Output #0, hevc, to 'pipe:':
      Metadata:
        major_brand     : mp42
        minor_version   : 1
        compatible_brands: mp42dby1isom
        encoder         : Lavf58.65.100
        Stream #0:0(und): Video: hevc (Main 10) (dvhe / 0x65687664), yuv420p10le(tv), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 27713 kb/s, 60 fps, 60 tbr, 60 tbn, 60 tbc (default)
        Metadata:
          creation_time   : 2017-04-13T20:09:18.000000Z
          handler_name    : video handler
          vendor_id       : [0][0][0][0]
          encoder         : DOVI Coding
        Side data:
          DOVI configuration record: version: 1.0, profile: 5, level: 9, rpu flag: 1, el flag: 0, bl flag: 1, compatibility id: 0
    Stream mapping:
      Stream #0:0 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    frame= 3372 fps=1398 q=-1.0 Lsize=  190127kB time=00:00:56.15 bitrate=27738.6kbits/s speed=23.3x
    video:190127kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
    and created "E:\HDR_DV_Test\RPU_data.bin"
  2. converted the video using Hybrid
    • Started Hybrid
    • Loaded the source
    • Set "Base->Processing->Video" to "x265
    • Set "x265->Base->Compatibility Restriction->Lavel/Profile/Tier" to "5.1/Main10/High"
    • Set "x265->Signaling->Dolby Vision->Dolby Vision Profile" to "5" (since dovi tool reported 'DOVI configuration record: version: 1.0, profile: 5, level: 9, rpu flag: 1, el flag: 0, bl flag: 1, compatibility id: 0')
    • Set "x265->Signaling->Dolby Vision->RPU" to "E:\HDR_DV_Test\RPU_data.bin"
    • Set "Base->Output File" to "E:\HDR_DV_Test\reencode.ts"
    • Added the jobs to the job queue 'Base->Add to queue'
    • Started the job processing 'Jobs->Queue->Start'
uploaded all the files to my Google drive

No clue whether this process worked as it should, but that is what I suspect to how it should be done.
-> So it's up to you to test whether:
a. the "LG Amaze Dolby Vision UHD 4K Demo.ts" plays fine for you
b. the "reencode.ts" file plays fine


Cu Selur
Reply
Hello Mr. Selur I have followed your steps to create the file with DV from the source "LG Amaze Dolby Vision UHD 4K Demo.ts" the only thing that I have changed is the video output instead of .ts I have changed it to.mkv. After the reencode.mkv file that came out, I have passed it through the makemkv program and when viewing it with the NVIDIA Shield TV, Dolby Vision has skipped and it looks perfectly.

Source:

General
Nombre completo                          : C:\Users\cebol\Desktop\Selur\LG Amaze Dolby Vision UHD 4K Demo.ts
Formato                                  : MPEG-4
Formato del perfil                       : Base Media / Version 2
ID códec                                 : mp42 (mp42/dby1/isom)
Tamaño de archivo                        : 190 MiB
Duración                                 : 56 s 200 ms
Tasa de bits general                     : 28,4 Mb/s
Fecha de codificación                    : UTC 2017-04-13 20:09:18
Fecha de etiquetado                      : UTC 2017-04-13 20:09:18
FileExtension_Invalid                    : braw mov mp4 m4v m4a m4b m4p m4r 3ga 3gpa 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma ismt f4a f4b f4v

Vídeo
ID                                       : 1
Formato                                  : HEVC
Formato/Info                             : High Efficiency Video Coding
Formato del perfil                       : Main 10@L5.1@Main
HDR format                               : Dolby Vision, Version 1.0, dvhe.05.09, BL+RPU
ID códec                                 : dvhe
ID códec/Info                            : High Efficiency Video Coding with Dolby Vision
Duración                                 : 56 s 200 ms
Tasa de bits                             : 27,7 Mb/s
Ancho                                    : 3 840 píxeles
Alto                                     : 2 160 píxeles
Relación de aspecto                      : 16:9
Modo velocidad fotogramas                : Constante
Velocidad de fotogramas                  : 60,000 FPS
Espacio de color                         : YUV
Submuestreo croma                        : 4:2:0
Profundidad bits                         : 10 bits
Bits/(píxel*fotograma)                   : 0.056
Tamaño de pista                          : 186 MiB (98%)
Fecha de codificación                    : UTC 2017-04-13 20:09:18
Fecha de etiquetado                      : UTC 2017-04-13 20:09:18
Codec configuration box                  : hvcC+dvcC

Audio
ID                                       : 2
Formato                                  : E-AC-3 JOC
Formato/Info                             : Enhanced AC-3 with Joint Object Coding
Nombre comercial                         : Dolby Digital Plus with Dolby Atmos
ID códec                                 : ec-3
Duración                                 : 56 s 192 ms
Tipo de tasa de bits                     : Constante
Tasa de bits                             : 640 kb/s
Canal(es)                                : 6 canales
Channel layout                           : L R C LFE Ls Rs
Velocidad de muestreo                    : 48,0 kHz
Velocidad de fotogramas                  : 31,250 FPS (1536 SPF)
Modo de compresión                       : Con pérdida
Tamaño de pista                          : 4,29 MiB (2%)
Service kind                             : Complete Main
Fecha de codificación                    : UTC 2017-04-13 20:09:18
Fecha de etiquetado                      : UTC 2017-04-13 20:09:18
Complexity index                         : 14
Number of dynamic objects                : 13
Bed channel count                        : 1 canal
Bed channel configuration                : LFE

reencode:

General
ID única                                 : 293767178479289867723555293480310197591 (0xDD0180256E299A0E0D1FD65C8046CD57)
Nombre completo                          : C:\Users\cebol\Desktop\Selur\LG encode_t00.mkv
Formato                                  : Matroska
Formato de la versión                    : Version 2
Tamaño de archivo                        : 398 MiB
Duración                                 : 56 s 200 ms
Tasa de bits general                     : 59,5 Mb/s
Película                                 : LG encode
Fecha de codificación                    : UTC 2021-01-04 23:19:59
Aplicación de codifición                 : MakeMKV v1.15.4 win(x64-release)
Librería de codificación                 : libmakemkv v1.15.4 (1.3.10/1.5.2) win(x64-release)

Vídeo
ID                                       : 1
Formato                                  : HEVC
Formato/Info                             : High Efficiency Video Coding
Formato del perfil                       : Main 10@L5.1@High
HDR format                               : Dolby Vision, Version 1.0, dvhe.05.09, BL+RPU
ID códec                                 : V_MPEGH/ISO/HEVC
Duración                                 : 56 s 200 ms
Tasa de bits                             : 59,5 Mb/s
Ancho                                    : 3 840 píxeles
Alto                                     : 2 160 píxeles
Relación de aspecto                      : 16:9
Modo velocidad fotogramas                : Constante
Velocidad de fotogramas                  : 60,000 FPS
Espacio de color                         : YUV
Submuestreo croma                        : 4:2:0
Profundidad bits                         : 10 bits
Bits/(píxel*fotograma)                   : 0.119
Tamaño de pista                          : 398 MiB (100%)
Título                                   : UTC 2017-04-13 20:09:18
Librería de codificación                 : x265 3.4+27-g5163c32d7:[Windows][GCC 10.2.0][64 bit] 10bit
Opciones de codificación                 : cpuid=1111039 / frame-threads=4 / numa-pools=24 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=3840x2160 / interlace=0 / total-frames=0 / level-idc=51 / high-tier=1 / uhd-bd=0 / ref=3 / no-allow-non-conformance / no-repeat-headers / annexb / aud / hrd / info / hash=0 / no-temporal-layers / no-open-gop / min-keyint=25 / keyint=250 / gop-lookahead=0 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=20 / lookahead-slices=0 / 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=2 / dynamic-rd=0.00 / ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=3 / limit-refs=0 / limit-modes / me=1 / subme=2 / merange=57 / temporal-mvp / no-frame-dup / no-hme / weightp / no-weightb / no-analyze-src-pics / deblock=-1:-1 / sao / no-sao-non-deblock / rd=3 / selective-sao=4 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.50 / psy-rdoq=10.00 / no-rd-refine / no-lossless / cbqpoffs=-2 / crqpoffs=3 / rc=crf / crf=18.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / vbv-maxrate=160000 / vbv-bufsize=160000 / vbv-init=0.9 / min-vbv-fullness=50.0 / max-vbv-fullness=80.0 / crf-max=0.0 / crf-min=0.0 / ipratio=1.40 / pbratio=1.30 / aq-mode=1 / aq-strength=0.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=1 / colorprim=2 / transfer=2 / colormatrix=2 / chromaloc=0 / display-window=0 / cll=0,0 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / opt-qp-pps / opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / hist-threshold=0.03 / no-opt-cu-delta-qp / no-aq-motion / no-hdr10 / no-hdr10-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=0 / analysis-save-reuse-level=0 / analysis-load-reuse-level=0 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=1 / refine-ctu-distortion=0 / 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-qpconformance-window-offsets / right=0 / bottom=0 / decoder-max-rate=0 / no-vbv-live-multi-pass
Idioma                                   : Inglés
Default                                  : No
Forced                                   : No
Rango de color                           : Full
Everything has been viewed correctly Smile

Thanks for your great help. Big Grin Big Grin
Reply
Good Mr. Selur, just confirm that for encodes with crop and resize the Dolby Vision does not work.
It only works when compressing the film and only the rpu data can be entered, which is really as if you were entering the data from an HDR + 10.
Well for now we will leave it parked until Dolby Vision is more advanced and encodes can be made.

Thank you very much for your help.. Wink Wink
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)