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 11th June 2024, 11:27   #381  |  Link
TDS
Formally known as .......
 
TDS's Avatar
 
Join Date: Sep 2021
Location: Down Under.
Posts: 1,086
Quote:
Originally Posted by Kuler087 View Post
there's a lot of variation in 3-1 because of the prores decoding bug in CM with Windows. Sometimes I can do a 2h movie in just 1h-1h30 and some other times, it can take well over 4h. A 4080 will be a lot faster than a 3060 for sure but some movies will still take forever to process regardless of the GPU.
In Resolve it's always fast.

EDIT: workaround would be to use jpeg-2000 mxf but I'm not able to encode a cm_analyze compatible file with ffmpeg. It only works with the mxf file from Resolve.
Just read your edit...

Have you made a tutorial of this process, or is there one somewhere on how to do it ??

I ordered my Gigabyte RTX 4080 Super today , 2nd most expensive single PC part I have ever bought
__________________
Long term RipBot264 user.

RipBot264 modded builds..
*new* x264 & x265 addon packs..
TDS is online now   Reply With Quote
Old 11th June 2024, 11:54   #382  |  Link
Kuler087
Registered User
 
Kuler087's Avatar
 
Join Date: Aug 2021
Location: Canada
Posts: 280
Quote:
Originally Posted by TDS View Post
Just read your edit...

Have you made a tutorial of this process, or is there one somewhere on how to do it ??
Well I tried a bunch of different settings and CM_analyze just isn't able to decode the ffmpeg produced files.

E:\DoVi_Scripts\tools\ffmpeg.exe -i E:\input.mkv -c:v jpeg2000 -an -profile:v 3 -q 1 -compression_level 30 -pix_fmt yuv422p10le -y E:\output.mxf

E:\DoVi_Scripts\tools\cm_analyze.exe -m 20 --source-format "pq bt2020" --analysis-tuning 1 E:\output.mxf E:\DV.xml

EG, this a Resolve mxf file that works


Quote:
I ordered my Gigabyte RTX 4080 Super today , 2nd most expensive single PC part I have ever bought
nice!!
__________________
DoVi_Scripts
Kuler087 is offline   Reply With Quote
Old 11th June 2024, 12:16   #383  |  Link
TDS
Formally known as .......
 
TDS's Avatar
 
Join Date: Sep 2021
Location: Down Under.
Posts: 1,086
Quote:
Originally Posted by Kuler087 View Post
Well I tried a bunch of different settings and CM_analyze just isn't able to decode the ffmpeg produced files.

E:\DoVi_Scripts\tools\ffmpeg.exe -i E:\input.mkv -c:v jpeg2000 -an -profile:v 3 -q 1 -compression_level 30 -pix_fmt yuv422p10le -y E:\output.mxf

E:\DoVi_Scripts\tools\cm_analyze.exe -m 20 --source-format "pq bt2020" --analysis-tuning 1 E:\output.mxf E:\DV.xml

EG, this a Resolve mxf file that works

nice!!
Not really my favourite thing, using command lines, so were these examples of what you've tried, do these work ??

And what do I do with that .mxf file ??
__________________
Long term RipBot264 user.

RipBot264 modded builds..
*new* x264 & x265 addon packs..
TDS is online now   Reply With Quote
Old 11th June 2024, 12:21   #384  |  Link
Kuler087
Registered User
 
Kuler087's Avatar
 
Join Date: Aug 2021
Location: Canada
Posts: 280
nop, anything I tried in ffmpeg failed to be decoded by cm.
Will try again this weekend...
__________________
DoVi_Scripts
Kuler087 is offline   Reply With Quote
Old 11th June 2024, 13:01   #385  |  Link
TDS
Formally known as .......
 
TDS's Avatar
 
Join Date: Sep 2021
Location: Down Under.
Posts: 1,086
Quote:
Originally Posted by Kuler087 View Post
nop, anything I tried in ffmpeg failed to be decoded by cm.
Will try again this weekend...
But what about that .mxf file ??

Can I do anything with it ??
__________________
Long term RipBot264 user.

RipBot264 modded builds..
*new* x264 & x265 addon packs..
TDS is online now   Reply With Quote
Old 11th June 2024, 13:14   #386  |  Link
Kuler087
Registered User
 
Kuler087's Avatar
 
Join Date: Aug 2021
Location: Canada
Posts: 280
No, it's just a reference.
__________________
DoVi_Scripts
Kuler087 is offline   Reply With Quote
Old 11th June 2024, 16:49   #387  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,771
I tried to have a quick peek to see if this workflow I'm thinking of is there, but not sure so I'll ask. Sorry for being a DoVi n00b, I'm just about to get a proper TV that supports TV Led DoVi so I'm going to create some samples to try it out.

I have a profile 7 STDL MKV file. I was thinking of extracting the BL, FEL and RPU, downscaling and re-encoding the BL video and recombining these three back to MKV. Is the extracting and recombining possible to do with the script? And is it possible to downscale the BL or does the frame size need to match the FEL?
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 11th June 2024, 17:26   #388  |  Link
Kuler087
Registered User
 
Kuler087's Avatar
 
Join Date: Aug 2021
Location: Canada
Posts: 280
It's possible but I wouldn't do that without DEE.exe. Re-encoding the BL and muxing back the original EL can be destructive and cause issues.
Instead, you should bake FEL into the BL and convert the RPU to Profile 8 which will be the same quality as the original FEL P7 playback.
__________________
DoVi_Scripts
Kuler087 is offline   Reply With Quote
Old 11th June 2024, 18:34   #389  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,771
Quote:
Originally Posted by Kuler087 View Post
It's possible but I wouldn't do that without DEE.exe. Re-encoding the BL and muxing back the original EL can be destructive and cause issues.
Instead, you should bake FEL into the BL and convert the RPU to Profile 8 which will be the same quality as the original FEL P7 playback.
Bake and then re-encode like any normal 4K? (Of course, with proper DoVi related settings.)

I tried to find a way to extract the two layers with the script but didn't see the workflow there? Did I just miss it or is it not there?
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 11th June 2024, 18:50   #390  |  Link
Kuler087
Registered User
 
Kuler087's Avatar
 
Join Date: Aug 2021
Location: Canada
Posts: 280
Yes, you bake/encode with x265.exe at the same time, it's a one-step process. In dovi_scripts you can create the avs script in 8-2-1 or 7-1

Set echo to ''on'' (line 2) to expose the cmd lines I use and then run 8-2-1. Cancel the encode and go into the temp folder, you will have the demuxed layers + RPU and the AVS script needed to bake/encode.
you can downscale to 1080p at line 120.
Quote:
::choose if you want 8-2 to downscale to 1080p (default = NO)
set downscale=NO
Then you have workflow 7-1 in manual mode. This will produce an AVS script ready to be encoded (remove the subtitles osd though)


In both ways, my scripts require an nvidia gpu.
__________________
DoVi_Scripts
Kuler087 is offline   Reply With Quote
Old 11th June 2024, 19:42   #391  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,771
Thank you for the comprehensive answer, I'll take a deeper look at the process using those workflows
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 11th June 2024, 20:08   #392  |  Link
Gatorman3385
Registered User
 
Gatorman3385's Avatar
 
Join Date: Feb 2024
Posts: 12
I'm getting this error when attempting to use the works.mxf. Am I doing something wrong?

Code:
I:\Working\Movies\2160>I:\Working\Dolby-Vision-Tools\tools\cm_analyze.exe -m 20 --source-format "pq bt2020" --analysis-tuning 1 I:\Working\Movies\2160\output.mxf I:\Working\Movies\2160\DV.xml
Copyright (c) 2013-2024 Dolby Laboratories, Inc. All Rights Reserved
06/11/2024/15:06:53.060000000 CPU: AMD Ryzen 7 2700X Eight-Core Processor          (AuthenticAMD) [ mmx mmxext sse sse2 sse3 ssse3 sse41 sse42 sse4a avx avx2 fma ]
06/11/2024/15:06:53.062000000 cm_analyze: ERROR Unable to open MXF 'I:\Working\Movies\2160\output.mxf' for read: File open failure.

Last edited by Gatorman3385; 11th June 2024 at 20:25.
Gatorman3385 is offline   Reply With Quote
Old 11th June 2024, 20:27   #393  |  Link
Kuler087
Registered User
 
Kuler087's Avatar
 
Join Date: Aug 2021
Location: Canada
Posts: 280
well you have to change the command to:

I:\Working\Dolby-Vision-Tools\tools\cm_analyze.exe -m 20 --source-format "pq bt2020" --analysis-tuning 1 I:\Working\Movies\2160\works.mxf I:\Working\Movies\2160\DV.xml
__________________
DoVi_Scripts
Kuler087 is offline   Reply With Quote
Old 11th June 2024, 21:07   #394  |  Link
Gatorman3385
Registered User
 
Gatorman3385's Avatar
 
Join Date: Feb 2024
Posts: 12
Yup! That would help.
Gatorman3385 is offline   Reply With Quote
Old 12th June 2024, 06:03   #395  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,771
Quote:
Originally Posted by Kuler087 View Post
Yes, you bake/encode with x265.exe at the same time, it's a one-step process. In dovi_scripts you can create the avs script in 8-2-1 or 7-1

Set echo to ''on'' (line 2) to expose the cmd lines I use and then run 8-2-1. Cancel the encode and go into the temp folder, you will have the demuxed layers + RPU and the AVS script needed to bake/encode.
you can downscale to 1080p at line 120.


Then you have workflow 7-1 in manual mode. This will produce an AVS script ready to be encoded (remove the subtitles osd though)


In both ways, my scripts require an nvidia gpu.
One question regarding the process came up. If DoViBaker already uses the RPU, won't the information be processed again during playback as it is input to x265 as well?
EDIT: or is it that if you go DoVi and not static HDR10, you just bake BL+FEL and then input the RPU while encoding to get a proper stream with dynamic metadata.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...

Last edited by Boulder; 12th June 2024 at 06:53.
Boulder is offline   Reply With Quote
Old 12th June 2024, 12:05   #396  |  Link
Kuler087
Registered User
 
Kuler087's Avatar
 
Join Date: Aug 2021
Location: Canada
Posts: 280
The original P7 RPU is required when you bake/decode EL+BL to a 16bit RGB PQ stream. Then, that 16bit PQ HDR stream is fed to the x265.exe with the P8 RPU.
__________________
DoVi_Scripts
Kuler087 is offline   Reply With Quote
Old 12th June 2024, 12:14   #397  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,771
Quote:
Originally Posted by Kuler087 View Post
The original P7 RPU is required when you bake/decode EL+BL to a 16bit RGB PQ stream. Then, that 16bit PQ HDR stream is fed to the x265.exe with the P8 RPU.
Yeah, I was just a little confused when I consulted the DoViBaker examples in GitHub.. in the script there were all three items incorporated in the DoViBaker call, but in this case I would use only BL and EL there and RPU with x265.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 12th June 2024, 12:20   #398  |  Link
Kuler087
Registered User
 
Kuler087's Avatar
 
Join Date: Aug 2021
Location: Canada
Posts: 280
yeah , ffms2 and lsmash read the P7 rpu directly from the stream. My script uses DGdecode.
__________________
DoVi_Scripts
Kuler087 is offline   Reply With Quote
Old 16th June 2024, 07:05   #399  |  Link
TDS
Formally known as .......
 
TDS's Avatar
 
Join Date: Sep 2021
Location: Down Under.
Posts: 1,086
Is there a way to speed this part of the 3-1 process up ??

I'm using nVme's where I can, but maybe there not "fast" ones, if that is what is governing this speed.

Code:
 Metadata:
        encoder         : Lavc61.5.104 prores_ks
frame= 8856 fps=105 q=-0.0 size= 6854912KiB time=00:06:09.36 bitrate=152030.7kbits/s speed=4.39x
__________________
Long term RipBot264 user.

RipBot264 modded builds..
*new* x264 & x265 addon packs..
TDS is online now   Reply With Quote
Old 16th June 2024, 13:16   #400  |  Link
Kuler087
Registered User
 
Kuler087's Avatar
 
Join Date: Aug 2021
Location: Canada
Posts: 280
You can try to raise qscale at line 164 but 4.39x(105fps) is already a decent speed for prores encoding.

Quote:
:: choose the prores encoding quality/size for 3-1 and 8-2-3 (default = 4) higher values mean faster encoding(depending on your cpu) and smaller filesize.
set qscale=4
__________________
DoVi_Scripts
Kuler087 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 05:23.


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