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 13th February 2024, 14:40   #1  |  Link
Kuler087
Registered User
 
Kuler087's Avatar
 
Join Date: Aug 2021
Location: Canada
Posts: 174
[DoVi_Scripts] Multi-Function Scripts for Dolby Vision processing and a lot more...

Drag-and-drop batch scripts designed for effortless management of HDR/Dolby Vision files, ensuring a user-friendly and easy-to-use experience.

https://github.com/R3S3t9999/DoVi_Scripts

Installation tutorial for newbies: https://www.youtube.com/watch?v=6SLtsVDse2w



MUXING BEHAVIOR AND SCRIPT FOLDER:

The script's behavior for muxing (MKV, MP4, or TS) is determined by the filename of the .bat file. If you decide to remove these tags, the default muxing mode will be MKV but muxing can be completely disabled at line 55

I advise against using the script on your OS drive as it may result in certain functions being disabled or not functioning correctly. Furthermore, remuxing large files will slowdown the Windows operating system.

To ensure optimal performance, make sure that your path and script folder (containing both tools and the .bat file) adhere to the following format: It's preferable not to include special characters or spaces in the path.
DO NOT LAUNCH THE BAT FILE WITH ADMIN RIGHTS, DRAG AND DROP WILL NOT WORK!



SCRIPTS MODES

MODE.I (1) =

Can do all the extracting parsing, injecting, and editing of two input sources. (P8 hybrid maker)
One static HDR base layer input and one dynamic HDR file input (MKV/MP4/HEVC/TS/M2TS/RPU/XML/JSON HDR10+).
Can easily resynchronize RPUs, edit parameters like L5/L6, convert the profile to P8. (P8 hybrid maker)
see P8 hybrid maker tutorial: https://www.youtube.com/watch?v=hVWZpat34oc
Add "P5BL" in the filename for raw HEVC P5 to P5 injection otherwise, the output will always be Profile 8, The keywords ''JUSTINJECT'' also keeps the profile intact.
see Resolve DV generation tutorial: https://www.youtube.com/watch?v=FVSh3oGqfXY
Can Resync HDR10plus and DV

MODE.F (2) =


Can get info(fel or mel, profile, l1/l2/l5) from any DV source as well as extract and edit any DV source.
Can use external json files and batch
Can verify the RPU synchronization
see tutorial: https://www.youtube.com/watch?v=lIO_ZfT-LnY
Can fix fps bitstream, color range
Can find frame difference between two sources
Can validate metadata with Official Dolby Metafier
Can convert RPU to XML
Can overwrite/removes L2 trims
can batch remove cmv4.0
can copy any metadata level to another rpu
This mode does not convert the RPU profile

MODE.H (3) =

Can convert any HDR10plus/HDR10/HLG source to shot-by-shot or frame-by-frame DoVi. CMV4.0 metadata, no fake static crap
Official Dolby cm_analyze.exe (best) or hdr10plus to dv or madvr to dv
see batch generate DV tutorial: https://www.youtube.com/watch?v=jBqbG5XM54g
can input external shot list
L1 analysis can be tuned (line 95)
it defaults to removing generated L2 trims, although you have the flexibility to adjust this behavior by modifying lines 83-87.
Support DV-P5 / HDR10 / HLG input
can batch generate with external files for L5/ MD, and shot list
Shot list source is selected in this order:

1- any external file with the same filename as the input (rpu, json, text)

2- internal RPU (in case of original rpu that has no shot, add ''IGNORERPU'' in the input filename.)

3- internal hdr10plus

4- if no dynamic metadata is found, it uses madvr to generate a shot list which means that if your source doesn't have any dynamic metadata, you can use the generated RPU from your previous 6-2 measurement.

MODE.7 (4) =

Can process any Profile 7 source(BD or Rip) to Single-layer Profile 8 or Profile 7 single-track dual-layers.
see tutorial: https://www.youtube.com/watch?v=sBUL2gjhqEE
Can remove cmv4.0 default = NO (line 91)

MODE.B (5) =

Can batch mux any DV source.

MKV/MP4 to TS

MKV/TS to MP4

MODE.P (6) =

Can batch plot DoVi Level 1,2,3,5,6,8 and hdr10, hdr10plus, video bitrate
EXAMPLES
see tutorial: https://www.youtube.com/watch?v=KHXvjtHNdB8

MODE.S (7) =

can export 16bits RGB screenshots (FEL P5 HDR10 HLG SDR) fully automated frame accurate or manual modes
see tutorial: https://www.youtube.com/watch?v=ElJ1KvQMgzE
can play FEL + BL or Profile 5 DV in HDR10 or SDR with madVR+MPC (if your pc can handle it)
can export HDR heatmap and gamut visualization (FEL P5 HDR10 HLG SDR)
can tonemap to SDR or PQ (line 129, default = PQ)
EXAMPLES

frame-accurate screenshot maker tutorial: https://www.youtube.com/watch?v=SA-i1tZssIo
MODE.M (8) =

Can remove hdr10plus or DV
can convert audio (DDP 7.1 / Add silent or encoded core to TrueHD)
see tutorial (convert to ddp): https://www.youtube.com/watch?v=m5_Bt2yGPhE
see tutorial (add core): https://www.youtube.com/watch?v=X8CImPBh_DI
can find bd playlist
can make 5 min samples. timestamp configurable at line: 109
can encode bake fel to HDR10/P8 with dovibaker+x265 or NVenc
see tutorial: https://www.youtube.com/watch?v=8BvXqw_cGJE
can encode any HDR10/HLG/FELP7/P5 source to HDR or SDR (x265 or NVenc or prores)
can encode DV to SDR using official Level-2 100nits trim pass (Official Dolby cm_offline.exe)
can quickly find a video framecount (useful when creating a shotlist in 3-1)
Can tonemap pgs subtitles to different brightness

DIRECT MODE
-drag and drop a file on the bat file and it will use workflow 2-2 (quick or full input info)
-the bat file can be associated with any video/rpu file.


L5 active area and cropping:


if the base layer is 16:9 (no black bars, fullscreen): set L5 to 0

if the base layer is 16:9 but has black bars: measure the BL letterbox and adjust L5 accordingly.

if the base layer is cropped set L5 to 0

Example 1:

input= 3840x2160p with active area of 2.40 (16:9 with black bars)

L5 offsets= Left:0 Right:0 Top:280 Bottom:280

Example 2:

input= 3840x2160p with active area of 1.78 (16:9 no black bars)

L5 offsets= Left:0 Right:0 Top:0 Bottom:0

Example 3:

input= 3840x1600p (cropped)

L5 offsets= Left:0 Right:0 Top:0 Bottom:0

Downscaling and upscaling:

divide or double the L5 values.

Example:
input 3840x2160 with L5 0,0,280,280
output 1920x1080 with L5 0,0,140,140

Input filename keywords that override the script's main settings:

P5BL : force p5 to p5 injection in 1-1 when input is raw hevc
DONTUPSCALE : Keep original resolution in 7-2
KEEPAUDIO : Keep all the audio
DONTMUX : Disable muxing
IGNORERPU : Ignore internal rpu for shot list in 3-1
REMOVECMV4 : Force CMV4.0 removal in 1-1
KEEPPRORES : Keep prores file
FORCESDR : Force SDR tonemapping in 7-1 7-2
KEEPTRIMS : keep trims in XML injection for 1-1 and 3-1
KEEP1000 : keep 1000nits trims in XML injection for 1-1 and 3-1
KEEP600 : keep 600nits trims in XML injection for 1-1 and 3-1
JUSTINJECT : Inject without changing the DV profile in 1-1
__________________
DoVi_Scripts

Last edited by Kuler087; 10th April 2024 at 00:03.
Kuler087 is offline   Reply With Quote
Old 13th February 2024, 17:21   #2  |  Link
TDS
Formally known as .......
 
TDS's Avatar
 
Join Date: Sep 2021
Location: Down Under.
Posts: 993
Are you affiliated with RESET ??

'Cause this is straight off his Github page ??

Great set of tools, this !!!!
__________________
Long term RipBot264 user.

RipBot264 modded builds..

Last edited by TDS; 13th February 2024 at 17:25.
TDS is offline   Reply With Quote
Old 13th February 2024, 17:53   #3  |  Link
Kuler087
Registered User
 
Kuler087's Avatar
 
Join Date: Aug 2021
Location: Canada
Posts: 174
Yes, I'm RESET_9999
__________________
DoVi_Scripts
Kuler087 is offline   Reply With Quote
Old 13th February 2024, 21:10   #4  |  Link
speedy
Registered User
 
Join Date: Nov 2019
Posts: 31
@RESET, do you have access to a S922X-J chipset device (Ugoos AM6B+) and/or have any intention of testing one?
speedy is offline   Reply With Quote
Old 13th February 2024, 21:25   #5  |  Link
Kuler087
Registered User
 
Kuler087's Avatar
 
Join Date: Aug 2021
Location: Canada
Posts: 174
No, I use the Sony x800m2 for FEL playback.
The new CoreElec build for the Ugoos looks interesting though. I will let other people test FEL playback a bit more but if it's really 100% stable, I might get one.
__________________
DoVi_Scripts
Kuler087 is offline   Reply With Quote
Old 14th February 2024, 03:53   #6  |  Link
TDS
Formally known as .......
 
TDS's Avatar
 
Join Date: Sep 2021
Location: Down Under.
Posts: 993
OK, Reset,

Here's that error I mentioned in the email.

I'm using 8-2-1, and it gets thru most of the process then this:-

Code:
libavutil      58. 36.100 / 58. 36.100
  libavcodec     60. 36.100 / 60. 36.100
  libavformat    60. 20.100 / 60. 20.100
  libavdevice    60.  4.100 / 60.  4.100
  libavfilter     9. 16.100 /  9. 16.100
  libswscale      7.  6.100 /  7.  6.100
  libswresample   4. 13.100 /  4. 13.100
  libpostproc    57.  4.100 / 57.  4.100
Unrecognized option 'vbsf'.
Error splitting the argument list: Option not found
Error: No frames parsed!
Error: No RPU found

D:\Dovi_Encodes_MP4>"D:\DoVi_Scripts\tools\NVEncC\NVEncC64.exe" --vbr 50000 --codec h265 --multipass 2pass-full --preset P7 --output-depth 10 --profile main10 --max-bitrate 160000 --vbv-bufsize 160000 --colormatrix bt2020nc
 --colorprim bt2020 --transfer smpte2084 --colorrange limited --chromaloc 2 --aud --repeat-headers --master-display "G(8500,39850)B(6550,2300)R(35400,14600)WP(15635,16450)L(10000000,1)" --max-cll "0,0" --dolby-vision-profile 8.1
 --dolby-vision-rpu "D:\Dovi_Temp_MP4\temp.folder49\P8.RPU.bin" -i "D:\Dovi_Temp_MP4\temp.folder49\script.avs" -o "D:\Dovi_Encodes_MP4\removed file name.S01.E01.2010.2160p.HDR.UHD.BluRay.DD5.1.x265-10bit-HDS-001_DV_encoded.hevc"
-------------------------------------------------------------------------------------------------------------------
D:\Dovi_Encodes_MP4\removed file name.S01.E01.2010.2160p.HDR.UHD.BluRay.DD5.1.x265-10bit-HDS-001_DV_encoded.hevc
-------------------------------------------------------------------------------------------------------------------
Failed to open dovi rpu "D:\Dovi_Temp_MP4\temp.folder49\P8.RPU.bin".
Failed to open input file.

D:\Dovi_Encodes_MP4>echo off   & goto :end

The script has been completed. Do you want to quit or go back to main menu (q or m default=q)?
This is a 10 minute chunk that I just converted to DV, and I thought I'd try 8-2-1.

Is it simply something I have missed installing, etc, or ??

I'm running an RTX 3050 GPU, BTW.
__________________
Long term RipBot264 user.

RipBot264 modded builds..
TDS is offline   Reply With Quote
Old 14th February 2024, 04:26   #7  |  Link
Kuler087
Registered User
 
Kuler087's Avatar
 
Join Date: Aug 2021
Location: Canada
Posts: 174
it looks like ffmpeg didnt like the ''vbsf'' parameter. Are you using the version included in the pack or your own version?
__________________
DoVi_Scripts

Last edited by Kuler087; 14th February 2024 at 04:28.
Kuler087 is offline   Reply With Quote
Old 14th February 2024, 04:31   #8  |  Link
TDS
Formally known as .......
 
TDS's Avatar
 
Join Date: Sep 2021
Location: Down Under.
Posts: 993
Quote:
Originally Posted by Kuler087 View Post
It looks like the script thinks your input has DV but it doesn't?
input mediainfo or a sample please
converted file info (input):-

Code:
Format profile                           : Main 10@L6.1@High
HDR format                               : Dolby Vision, Version 1.0, Profile 8.0, dvhe.08.06, BL+RPU / SMPTE ST 2086, Version HDR10, HDR10 compatible
Codec ID                                 : dvhe
Codec ID/Info                            : High Efficiency Video Coding with Dolby Vision
original file info:-

Code:
Format profile                           : Main 10@L6.1@High
HDR format                               : SMPTE ST 2086, HDR10 compatible
Like I said, I had just converted it to DV with 3-1.
__________________
Long term RipBot264 user.

RipBot264 modded builds..
TDS is offline   Reply With Quote
Old 14th February 2024, 04:34   #9  |  Link
Kuler087
Registered User
 
Kuler087's Avatar
 
Join Date: Aug 2021
Location: Canada
Posts: 174
sorry i edited my original response after realizing that the problem was a parameter in ffmpeg.

it looks like -vbsf is now deprecated and replaced by -bsf:v

either use the version in the tools pack or wait for the script's next version.
__________________
DoVi_Scripts
Kuler087 is offline   Reply With Quote
Old 14th February 2024, 05:07   #10  |  Link
TDS
Formally known as .......
 
TDS's Avatar
 
Join Date: Sep 2021
Location: Down Under.
Posts: 993
Quote:
Originally Posted by Kuler087 View Post
sorry i edited my original response after realizing that the problem was a parameter in ffmpeg.

it looks like -vbsf is now deprecated and replaced by -bsf:v

either use the version in the tools pack or wait for the script's next version.
Interesting you mention that, 'cause that is what Google found

Cheers.

Update:- I changed it back to the version in the tools pack, and it looked like a different process, and NO errors...I think it was using NVencC, but MediaInfo doesn't show anything about it.

Update #2:-So I took a chance and changed all the -vbsf entries to -bsf:v, and using the latest FFmpeg, I didn't get any errors, so hopefully the process & encodes will be good to go.

Thanks
__________________
Long term RipBot264 user.

RipBot264 modded builds..

Last edited by TDS; 15th February 2024 at 04:34.
TDS is offline   Reply With Quote
Old 14th February 2024, 11:52   #11  |  Link
Atlantis
Registered User
 
Join Date: Feb 2002
Posts: 758
Please could someone explain for us casual users the difference between this and DDVT Tool? Do they do the same thing?
Atlantis is offline   Reply With Quote
Old 14th February 2024, 12:04   #12  |  Link
TDS
Formally known as .......
 
TDS's Avatar
 
Join Date: Sep 2021
Location: Down Under.
Posts: 993
Quote:
Originally Posted by Atlantis View Post
Please could someone explain for us casual users the difference between this and DDVT Tool? Do they do the same thing?
In my humble opinion, DDVT does do the same thing, sort of.

I think it is a little harder to use the scripts, needing a cmd prompt, and copying the paths of the script & the file you want to process.

DoVi_Scripts is just a multi option menu, and you just choose the functions menu number, then simply drag the file you want to process, then there may or may not be a few more option you need to choose, then basically it does the rest itself.

But it also does a LOT of other conversions, etc, etc.

Makes a lot of other apps look pretty basic and lacking, in comparison.

It's a little involved to initially set it up, but then you're set.
__________________
Long term RipBot264 user.

RipBot264 modded builds..
TDS is offline   Reply With Quote
Old 18th February 2024, 12:55   #13  |  Link
DaMacFunkin
Registered User
 
Join Date: Mar 2002
Posts: 140
avs libplacebo error

Hi, Updated to your latest pack, I am trying HDR to HDR DoviBake and I get this error (see screenshot), yet the file is present, can you advise please?
Attached Images
 
DaMacFunkin is offline   Reply With Quote
Old 18th February 2024, 14:01   #14  |  Link
Kuler087
Registered User
 
Kuler087's Avatar
 
Join Date: Aug 2021
Location: Canada
Posts: 174
Does the FEL script work when you play it avspmod? Do you have an Nvidia GPU ?
__________________
DoVi_Scripts
Kuler087 is offline   Reply With Quote
Old 18th February 2024, 17:17   #15  |  Link
DaMacFunkin
Registered User
 
Join Date: Mar 2002
Posts: 140
Hi, yes I have a Nvidia GPU that’s why I edited the config to use this.
Not sure what you mean by avspmod, please explain,

I encode HDR with Nvenc and Staxrip all the time so I’m not sure what is wrong?
DaMacFunkin is offline   Reply With Quote
Old 18th February 2024, 17:34   #16  |  Link
DaMacFunkin
Registered User
 
Join Date: Mar 2002
Posts: 140
Quote:
Originally Posted by DaMacFunkin View Post
Hi, yes I have a Nvidia GPU that’s why I edited the config to use this.
Not sure what you mean by avspmod, please explain,

I encode HDR with Nvenc and Staxrip all the time so I’m not sure what is wrong?
Just tried to play the AB’s file with avspmod and it says invalid argument, the avs does play with media player classic, how do I fix this please?
DaMacFunkin is offline   Reply With Quote
Old 18th February 2024, 17:40   #17  |  Link
Kuler087
Registered User
 
Kuler087's Avatar
 
Join Date: Aug 2021
Location: Canada
Posts: 174
I mean have you checked if the dovi_baker script works in avspmod?
Go into the temp folder and try to open the Avisynth script or create a new script with workflow 7-1 (manual mode)

Also, any error in the dovi_scripts window?

__________________
DoVi_Scripts
Kuler087 is offline   Reply With Quote
Old 18th February 2024, 17:41   #18  |  Link
Kuler087
Registered User
 
Kuler087's Avatar
 
Join Date: Aug 2021
Location: Canada
Posts: 174
Quote:
Originally Posted by DaMacFunkin View Post
Just tried to play the AB’s file with avspmod and it says invalid argument, the avs does play with media player classic, how do I fix this please?
Did you install avisynthplus?? if yes maybe try to reinstall it:
https://github.com/AviSynth/AviSynth...3_20230715.exe
__________________
DoVi_Scripts
Kuler087 is offline   Reply With Quote
Old 19th February 2024, 00:29   #19  |  Link
DaMacFunkin
Registered User
 
Join Date: Mar 2002
Posts: 140
Quote:
Originally Posted by Kuler087 View Post
Did you install avisynthplus?? if yes maybe try to reinstall it:
https://github.com/AviSynth/AviSynth...3_20230715.exe
Hi, I uninstalled my old version of Avisynth and installed this one, I feel like I've spent all day on it, but now all of a sudden it is encoding, not very fast @ 9fps on --quality --vbr --2pass-full.
Has anybody been able to use --lookahead32 and --vbr-quality 19 with Dovibaker and Nvenc instead of 2 pass??

Thank you.
DaMacFunkin is offline   Reply With Quote
Old 19th February 2024, 05:00   #20  |  Link
TDS
Formally known as .......
 
TDS's Avatar
 
Join Date: Sep 2021
Location: Down Under.
Posts: 993
Quote:
Originally Posted by DaMacFunkin View Post
Hi, I uninstalled my old version of Avisynth and installed this one, I feel like I've spent all day on it, but now all of a sudden it is encoding, not very fast @ 9fps on --quality --vbr --2pass-full.
Has anybody been able to use --lookahead32 and --vbr-quality 19 with Dovibaker and Nvenc instead of 2 pass??

Thank you.
AFAIK, you should be able to edit the NVenc_HDR_settings.bat (found in the Tools folder) to your hearts content.

I made a couple of changes to my liking the other day.

This may also be handy, to some:-

https://github.com/rigaya/NVEnc/blob...c-option-list-

https://github.com/rigaya/NVEnc/blob...c-option-list-
__________________
Long term RipBot264 user.

RipBot264 modded builds..

Last edited by TDS; 19th February 2024 at 05:05.
TDS 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 22:05.


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