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 30th May 2024, 17:30   #341  |  Link
Kuler087
Registered User
 
Kuler087's Avatar
 
Join Date: Aug 2021
Location: Canada
Posts: 280
You have to input the demuxed .hevc DV layer track(1080p) in workflow 2-5 ? is that what you did?
Dont input the 2160p HEVC file, it doesn't have metadata.
__________________
DoVi_Scripts
Kuler087 is offline   Reply With Quote
Old 30th May 2024, 18:34   #342  |  Link
smaiderman
Registered User
 
Join Date: Oct 2021
Posts: 18
Quote:
Originally Posted by Kuler087 View Post
You have to input the demuxed .hevc DV layer track(1080p) in workflow 2-5 ? is that what you did?
Dont input the 2160p HEVC file, it doesn't have metadata.
That is the problem. Sorry to be so ignorant, and thank you for your extensive help
smaiderman is offline   Reply With Quote
Old 30th May 2024, 19:00   #343  |  Link
Kuler087
Registered User
 
Kuler087's Avatar
 
Join Date: Aug 2021
Location: Canada
Posts: 280
BTW, I had a look at this movie and if you remux it with mkvtoolnix straight from the bluray disc, the output is incorrect.
If you remux the disc with MakeMKV, the output is correct.
__________________
DoVi_Scripts
Kuler087 is offline   Reply With Quote
Old 30th May 2024, 22:45   #344  |  Link
smaiderman
Registered User
 
Join Date: Oct 2021
Posts: 18
Quote:
Originally Posted by Kuler087 View Post
BTW, I had a look at this movie and if you remux it with mkvtoolnix straight from the bluray disc, the output is incorrect.
If you remux the disc with MakeMKV, the output is correct.
Thnaks for the advice. My only experience was with toolnix, but I'm going to swap.

I have an oftopic question:

I managed to set Davinci with the xml and the correct color spaces, but my question now is how do I export from the color graded prores to the original hvec as loseless as possible? Is there a way to do this render loslessly? Or will there always be some kind of compression?

Last edited by smaiderman; 30th May 2024 at 22:53.
smaiderman is offline   Reply With Quote
Old 30th May 2024, 23:41   #345  |  Link
Kuler087
Registered User
 
Kuler087's Avatar
 
Join Date: Aug 2021
Location: Canada
Posts: 280
You have to deliver to a lossless codec from Resolve and then encode with high-quality settings in x265 or x264.
So depending on your x265/x264 final encode, there should not be any visible loss.

Example, this is my Aquaman 2 SDR 16mb/s x264 encode VS the 1080p bluray remux: https://slow.pics/c/hZDFm8Na
__________________
DoVi_Scripts
Kuler087 is offline   Reply With Quote
Old 31st May 2024, 00:07   #346  |  Link
smaiderman
Registered User
 
Join Date: Oct 2021
Posts: 18
Quote:
Originally Posted by Kuler087 View Post
You have to deliver to a lossless codec from Resolve and then encode with high-quality settings in x265 or x264.
So depending on your x265/x264 final encode, there should not be any visible loss.

Example, this is my Aquaman 2 SDR 16mb/s x264 encode VS the 1080p bluray remux: https://slow.pics/c/hZDFm8Na
That would be, for example, export in proress again with resolve, and then encode that file with another software?
If exported with resolve to high quality h264 or h265, there is still a big loss?
smaiderman is offline   Reply With Quote
Old 31st May 2024, 00:16   #347  |  Link
Kuler087
Registered User
 
Kuler087's Avatar
 
Join Date: Aug 2021
Location: Canada
Posts: 280
Quote:
Originally Posted by smaiderman View Post
That would be, for example, export in proress again with resolve, and then encode that file with another software?
yes. I use staxrip/x264 1080p 8bit 2-pass 16mb/s very slow with some custom cmd but this is for the small PLEX I share with friends and family. If you want transparent quality to the UHD bluray source, you should encode to x265 2160p 10bit CRF 14-15 slower preset.

Quote:
If exported with resolve to high quality h264 or h265, there is still a big loss?
No, don't do that. Resolve h265/h264 encoding is bad. You always want to deliver a lossless codec from Resolve
__________________
DoVi_Scripts
Kuler087 is offline   Reply With Quote
Old 31st May 2024, 14:50   #348  |  Link
Fuso
Registered User
 
Join Date: Dec 2010
Posts: 21
Quote:
Originally Posted by Kuler087 View Post
I've added a workaround in the DEE (8-1-3) workflow and it should now produce the same quality as 8-1-1 but at 7.1 channels + 1536kbps bitrate.

It turns out, my AVR (and many others) can't disable the Dialogue Normalization of DDP tracks.
Am I doing something wrong?
I've tried with MKV containing 7.1 TrueHD (no ac3 core) and this is the result:
Code:
1) Workflow.1= Lossless Audio to DD+ EC3 (can batch)
2) Workflow.2= Add an AC3 Core to TrueHD (thdmerge or eac3to)(can batch)
3) Workflow.3= DEE workflows(payware) (not recomended)

Choice? [1,2,3]?3
--------------------------------------------------------------------------------------
-- You must have edited the path to DEE for this workflow to work.
-- Can encode to DD+ 1536kbps 7.1(ac3 core) or TrueHD 7.1
-- Input must have 7.1 channels audio. For 5.1/2.0 audio, use workflow 8-1-1
--------------------------------------------------------------------------------------
  Drag and drop a file and press enter...
"D:\Torrents\Movies\Gojira -1.0.2023.BDRemux.2160p.NNMClub\Gojira -1.0.2023.BDRemux.2160p.NNMClub (1)-001.mkv"
File 'D:\Torrents\Movies\Gojira -1.0.2023.BDRemux.2160p.NNMClub\Gojira -1.0.2023.BDRemux.2160p.NNMClub (1)-001.mkv': container: Matroska
Track ID 0: video (HEVC/H.265/MPEG-H)
Track ID 1: audio (TrueHD Atmos)
Attachment ID 1: type 'image/jpeg', size 39406 bytes, file name 'cover.jpg'
What is the audio track id (default=1) and press enter...
1
DD+  or TrueHD? choice are b or t (default=b)
b
ffmpeg version 2024-02-22-git-76b2bb96b4-full_build-www.gyan.dev Copyright (c) 2000-2024 the FFmpeg developers
  built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --pkg-config=pkgconf --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-dxva2 --enable-d3d11va --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      58. 39.100 / 58. 39.100
  libavcodec     60. 40.100 / 60. 40.100
  libavformat    60. 21.101 / 60. 21.101
  libavdevice    60.  4.100 / 60.  4.100
  libavfilter     9. 17.100 /  9. 17.100
  libswscale      7.  6.100 /  7.  6.100
  libswresample   4. 13.100 /  4. 13.100
  libpostproc    57.  4.100 / 57.  4.100
[matroska,webm @ 0000018070ba9f00] Invalid Block Addition value 0x0 for unknown Block Addition Mapping type 68766345, name "Dolby Vision enhancement-layer HEVC configuration"
Input #0, matroska,webm, from 'D:\Torrents\Movies\Gojira -1.0.2023.BDRemux.2160p.NNMClub\Gojira -1.0.2023.BDRemux.2160p.NNMClub (1)-001.mkv':
  Metadata:
    encoder         : libebml v1.4.5 + libmatroska v1.7.1
    creation_time   : 2024-05-30T19:17:26.000000Z
  Duration: 00:01:00.23, start: 0.000000, bitrate: 67367 kb/s
  Stream #0:0(jpn): Video: hevc (Main 10), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn (default)
      Metadata:
        BPS             : 64217023
        DURATION        : 00:00:59.393000000
        NUMBER_OF_FRAMES: 1424
        NUMBER_OF_BYTES : 476755212
        SOURCE_ID       : 001011
        _STATISTICS_WRITING_APP: mkvmerge v84.0 ('Sleeper') 64-bit
        _STATISTICS_WRITING_DATE_UTC: 2024-05-30 19:17:26
        _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
      Side data:
        DOVI configuration record: version: 1.0, profile: 7, level: 6, rpu flag: 1, el flag: 1, bl flag: 1, compatibility id: 6
  Stream #0:1(jpn): Audio: truehd (Dolby TrueHD + Dolby Atmos), 48000 Hz, 7.1, s32 (24 bit)
      Metadata:
        title           : Original
        BPS             : 3964436
        DURATION        : 00:01:00.227000000
        NUMBER_OF_FRAMES: 72272
        NUMBER_OF_BYTES : 29845768
        _STATISTICS_WRITING_APP: mkvmerge v84.0 ('Sleeper') 64-bit
        _STATISTICS_WRITING_DATE_UTC: 2024-05-30 19:17:26
        _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:2: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 640x360 [SAR 72:72 DAR 16:9], 90k tbr, 90k tbn (attached pic)
      Metadata:
        filename        : cover.jpg
        mimetype        : image/jpeg
[in#0/matroska,webm @ 0000018070b8ac80] Codec AVOption drc_scale (percentage of dynamic range compression to apply) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some decoder which was not actually used for any stream.
Stream mapping:
  Stream #0:1 -> #0:0 (truehd (native) -> pcm_s24le (native))
Press [q] to stop, [?] for help
[Parsed_pan_0 @ 0000018071138140] Pure channel mapping detected: 0 1 2 3 6 7 4 5
Output #0, wav, to 'D:\Torrents\Movies\MP4_DV_P5\DoVi_Scripts\temp_folder19\1.wav':
  Metadata:
    ISFT            : Lavf60.21.101
  Stream #0:0(jpn): Audio: pcm_s24le ([1][0][0][0] / 0x0001), 48000 Hz, 7.1, s32, 9216 kb/s
      Metadata:
        title           : Original
        BPS             : 3964436
        DURATION        : 00:01:00.227000000
        NUMBER_OF_FRAMES: 72272
        NUMBER_OF_BYTES : 29845768
        _STATISTICS_WRITING_APP: mkvmerge v84.0 ('Sleeper') 64-bit
        _STATISTICS_WRITING_DATE_UTC: 2024-05-30 19:17:26
        _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
        encoder         : Lavc60.40.100 pcm_s24le
[out#0/wav @ 000001807113a200] video:0KiB audio:67755KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 0.000199%
size=   67755KiB time=00:01:00.22 bitrate=9216.0kbits/s speed=21.8x
The system cannot find the path specified.

The script has been completed. Do you want to quit or go back to main menu (q or m default=q)?
Fuso is offline   Reply With Quote
Old 31st May 2024, 14:56   #349  |  Link
Kuler087
Registered User
 
Kuler087's Avatar
 
Join Date: Aug 2021
Location: Canada
Posts: 280
It looks like you didn't set your path to DEE.exe. This is a paidware and it's not included in the tools pack I share.

__________________
DoVi_Scripts
Kuler087 is offline   Reply With Quote
Old 31st May 2024, 15:01   #350  |  Link
Fuso
Registered User
 
Join Date: Dec 2010
Posts: 21
Quote:
Originally Posted by Kuler087 View Post
It looks like you didn't set your path to DEE.exe. This is a paidware and it's not included in the tools pack I share.

Oh, I see. I've tried to see what's missing, but I missed that. Thank you!
Fuso is offline   Reply With Quote
Old 31st May 2024, 22:57   #351  |  Link
subnrg
Registered User
 
Join Date: Oct 2020
Posts: 5
Hello @Kuler087.
I want to sincerely thank you for what must have been an immense amount of experience and work to put this together. Although I'm technically not a noob since I've been dabbling with encoding for over a decade, but I've never had the need to get too into the weeds on this stuff. I've been using staxrip forever, but never was able to figure out how to get their DV support to work. I think I've got most everything down now... thanks to you. I've read through this entire DS forum and watched a chunk of your very helpful videos, but I just have a few questions:

1. My goal is to take a remux file (normally P7.6) and make 2 files for each of these. One that is a 1080p 6M VBR DV8.1 EAC3 .mp4 file (that is roku compatible), and one that is 4k 18M VBR DV8.1 original lossless audio in .mkv (mainly used on Shield) for my Plex servers.
So far, I've been able to translate my staxrip encode settings into your .bat files, and created one for HD and one for 4K .mkv. The workflow that seems to work best and most consistently for me is:
- 8.2.1 & 8.1.1
- Mux .hevc .ec3 and subs from original file through mkvtoolnix
- Mux in staxrip to .mp4 (for some reason I haven't had luck w your batch muxer)
Do you think this is the best approach for this, and/or might there be a way to automate some of this?

2. For my HD encodes, I'm always downconverting to 5.1. Does the DDP encoding always convert from the original lossless, or does this default to the core for THD or DTS? Does it employ any dynamic compression or normalization?

3. For subs, one of the best features that I like in handbrake, is to burn in forced subs. Any advice how to make that work with this without tons of extra work?
subnrg is offline   Reply With Quote
Old 1st June 2024, 00:01   #352  |  Link
Kuler087
Registered User
 
Kuler087's Avatar
 
Join Date: Aug 2021
Location: Canada
Posts: 280
Quote:
- Mux in staxrip to .mp4 (for some reason I haven't had luck w your batch muxer)
with the mp4 version, if you rename your .hevc .ec3 .srt files the same(and same path), you can input just the .hevc file and the script workflow 5 will pick the audio and sub. Otherwise, you can just mux every track you want into an MKV and then run it in Workflow 5 which would get you proper track names and forced flags
For the mp4 version, you'll have to test which muxer version works for you (at the line 60 set mp4_version=NEW or OLD)

Quote:
Do you think this is the best approach for this, and/or might there be a way to automate some of this?
Yes, one day, I should add muxing and audio encoding in the video encoder workflows eventually ... For now, they just output raw hevc files.


Quote:
Does the DDP encoding always convert from the original lossless, or does this default to the core for THD or DTS?
it always encodes from the original lossless audio and you can set the script to downmix to 5.1 at line 76. The bitrate is controlled at line 78
7.1 ec3 requires the EAE folder (not included in the tools pack) and the MP4 ''NEW'' version has 7.1 encoding disabled.

Quote:
Does it employ any dynamic compression or normalization?
No normalization/compression.

Quote:
For subs, one of the best features that I like in handbrake, is to burn in forced subs. Any advice how to make that work with this without tons of extra work?
Nop can't help you with that, and DS will never do that. I hate burned-in subs.
__________________
DoVi_Scripts

Last edited by Kuler087; 1st June 2024 at 05:40.
Kuler087 is offline   Reply With Quote
Old 1st June 2024, 18:00   #353  |  Link
subnrg
Registered User
 
Join Date: Oct 2020
Posts: 5
Thanks brotha! Appreciate the info. I totally agree with the burned-in subs. The only time I want those is if they are speaking Klingon or something like Handbrake does with "Foreign Audio Scan". Because I'm trying to create Roku/Firestick friendly DV .mp4 files, I can't use the PGS subs in that container and the IDX conversions are a bit wonky. Although I've found with some specific instructions, GPT4o does an okay job of fixing the srt files.

One other question/suggestion... you have an option of "choose if you want to also mux the lossless audio when you convert to DD+." If this option (or separate option) could apply to 8-1-1, it could save me from having to mux the original back into my 4k rips.

Last edited by subnrg; 1st June 2024 at 18:59. Reason: one more thing...
subnrg is offline   Reply With Quote
Old 3rd June 2024, 13:08   #354  |  Link
wyup
Registered User
 
Join Date: Aug 2020
Location: Bilbao, Spain
Posts: 20
different plot measurements

I'm getting significantly different plot results from different workflows: 6-2 (madVR) and 6-6 (json with ProRes conversion and Resolve detecting scene cuts and hdr10+):

MaxCLL 6-2: 1378 6-6: 915
MaxFALL 6-2: 607 6-6: 238
Scenes: 6-2: 2765 6-6: 2000

I guess their algorythms are different, but which is the most accurate?
Attached Images
  

Last edited by wyup; 3rd June 2024 at 13:34.
wyup is offline   Reply With Quote
Old 3rd June 2024, 13:48   #355  |  Link
Kuler087
Registered User
 
Kuler087's Avatar
 
Join Date: Aug 2021
Location: Canada
Posts: 280
Resolve scopes/waveforms are wrong if you dont downscale your timeline with ''custom cubic'' algo.
also, 6-2 madvr includes the black bars if you don't crop so this will directly affect your maxfall.

__________________
DoVi_Scripts
Kuler087 is offline   Reply With Quote
Old 3rd June 2024, 17:23   #356  |  Link
wyup
Registered User
 
Join Date: Aug 2020
Location: Bilbao, Spain
Posts: 20
Okay thanks, and for the Timeline Output in Master Settings, what should I choose, the video native resolution or also 1920x1080 as the output scaling?
The video file I'm evaluating is already cropped at 3840x 2076 pixels.

Last edited by wyup; 3rd June 2024 at 17:29.
wyup is offline   Reply With Quote
Old 3rd June 2024, 17:42   #357  |  Link
Kuler087
Registered User
 
Kuler087's Avatar
 
Join Date: Aug 2021
Location: Canada
Posts: 280
master settings resolution is your input native resolution so 3840x2076
__________________
DoVi_Scripts
Kuler087 is offline   Reply With Quote
Old 4th June 2024, 12:41   #358  |  Link
wyup
Registered User
 
Join Date: Aug 2020
Location: Bilbao, Spain
Posts: 20
I re-generated the HDR10+ json in Resolve from Prores cropped video and obtained by 6-6 the new B plot. It is slightly different than the unscaled one:

6-6 unscaled: MaxCLL: 915 MaxFALL: 238
6-6 downscaled: MaxCLL: 901 MaxFALL: 228

Still far from 6-2: MaxCLL: 1378 MaxFALL: 607

What can I do with the 6-2 .measurement file? I played it alongside the original file with madvr filter and MPC-BE and I got random blanking during playback. Is the .measurement video automatically loaded? I can't find a option within madvr filter to import external .measurement file.

Last edited by wyup; 4th June 2024 at 13:13.
wyup is offline   Reply With Quote
Old 4th June 2024, 13:59   #359  |  Link
Kuler087
Registered User
 
Kuler087's Avatar
 
Join Date: Aug 2021
Location: Canada
Posts: 280
HDR10plus or DV will create metadata intended for playback(restrictions/rules in the way they are calculated) while madvr just measures the pixels as they are so differences are expected. So the 1378nits pixels spike could be ignored by the algo(should be visible in the scopes though) but overall, shot-by-shot maxcll is almost identical and the point is that for some reason, resolve does some resampling if you don't downscale. Anyway, static/single maxcll/maxfall values are pretty much meaningless metadata.

Quote:
I can't find a option within madvr filter to import external .measurement file.
I don't use it and don't know if it works or is useful but the option for external files is there.

__________________
DoVi_Scripts
Kuler087 is offline   Reply With Quote
Old 4th June 2024, 20:25   #360  |  Link
subnrg
Registered User
 
Join Date: Oct 2020
Posts: 5
Hey K.
I had everything working well, then all of a sudden I'm getting errors. I deleted and reinstalled everything and started with a fresh .bat file (only changing the output/temp directory and nvenc), but I'm still getting errors that seem like they may be PTS or nvenc issues? The .mkv i mux via mkvtoolnix seems to play fine, but when I try to mux back to MP4 in staxrip (whether lsmash or ffvideosource) i'm getting:

Script Error
FFVideoSource: The index does not match the source file
(P:\Muxes\Awaken (2018) UHD Disc Sample_temp\Awaken (2018) UHD Disc Sample_source.avs, line 5)

MODE.B shows the script was completed, but no file is rendered. I'm thinking something was updated or I messed with something I shouldn't have. Any ideas?
subnrg is offline   Reply With Quote
Reply

Tags
batch scripts, dolby vision processing, dovi_scripts

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 06:46.


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