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 > MPEG-4 Encoder GUIs

Reply
 
Thread Tools Search this Thread Display Modes
Old 12th December 2024, 02:23   #541  |  Link
Lathe
Registered User
 
Lathe's Avatar
 
Join Date: Aug 2005
Posts: 1,267
And again... I DON'T know if the contrast and the other setting are ALREADY doing something!
Lathe is offline   Reply With Quote
Old 12th December 2024, 02:28   #542  |  Link
gonca
Registered User
 
Join Date: Jul 2012
Posts: 1,252
try one setting at a time, use small samples and see the results
Or wait until someone can give you a precise answer
gonca is offline   Reply With Quote
Old 12th December 2024, 02:30   #543  |  Link
Lathe
Registered User
 
Lathe's Avatar
 
Join Date: Aug 2005
Posts: 1,267
Yeah, that's basically what I'm going to hafta do (unless our Mr. ProWo will tell me what those settings mean... )

So, I set everything except Gamma to '0', I THINK it's supposed to be at '1' but I'm not sure, and I bumped up the brightness by 10%.
Lathe is offline   Reply With Quote
Old 12th December 2024, 02:31   #544  |  Link
Lathe
Registered User
 
Lathe's Avatar
 
Join Date: Aug 2005
Posts: 1,267
Heh, I just got a completely white screen...

Oh well, keep trying, I'll nail it eventually (just like you do with the moose(s)...)
Lathe is offline   Reply With Quote
Old 12th December 2024, 04:35   #545  |  Link
Lathe
Registered User
 
Lathe's Avatar
 
Join Date: Aug 2005
Posts: 1,267
Man, this is getting really wacky... I mean seriously... Okay, so as I said, just setting the HDR-SDR and mobius and desaturation at 2 the film comes out rather dark as shown in my picture way above. So, I tweaked the contrast and brightness and I had it looking really good, more detailed and vibrant than the Handbrake encode, but it was just a tad bright. So, I go back and BARELY lower the brightness, and now the screen is almost totally black...

Makes NO bloody sense. Any help there Mr. ProWo...?

***EDIT


Okay, I think I'm getting shell shocked here... I think I went the wrong way with the brightness. Still trying...

Last edited by Lathe; 12th December 2024 at 04:41.
Lathe is offline   Reply With Quote
Old 12th December 2024, 06:15   #546  |  Link
Lathe
Registered User
 
Lathe's Avatar
 
Join Date: Aug 2005
Posts: 1,267
Alrighty... I KNOW you guys are ready to hang yourselves just about now... But, I think I've whittled it down to about the way I want it to look. I STILL don't understand why Clever FFMpeg looked so damn dark like the picture above with the proper default settings for HDR-SDR, but anyway, I basically kept dialing back the contrast to about -.35 where the bright areas were not as pixelated looking, and brought up the brightness to about +.8 and left everything else the same. So, the result was a slightly sharper picture with definitely more saturation and about equal brightness as the Handbrake encode. So, basically it looks more exciting now than the Handbrake encode (of course, ANY scene with Sandra is F'n exciting! )

So, after about 50 different tries I think I finally got it!
Lathe is offline   Reply With Quote
Old 12th December 2024, 07:46   #547  |  Link
GeoffreyA
Registered User
 
Join Date: Jun 2024
Location: South Africa
Posts: 254
The Handbrake encode looks washed out because they use, I think, Hable. Does Clever FFmpeg allow you to adjust the command-line? The problem here is likely the "npl" value for zscale: too big. However, the previous page shows 200, which should be close to spot on for most films.

Last edited by GeoffreyA; 12th December 2024 at 07:49.
GeoffreyA is offline   Reply With Quote
Old 12th December 2024, 07:54   #548  |  Link
Lathe
Registered User
 
Lathe's Avatar
 
Join Date: Aug 2005
Posts: 1,267
Quote:
Originally Posted by GeoffreyA View Post
The Handbrake encode looks washed out because they use, I think, Hable. Does Clever FFmpeg allow you to adjust the command-line? The problem here is likely the "npl" value for zscale: too big. However, the previous page shows 200, which should be close to spot on for most films.
No, at least I haven't quite figured that out yet. I THINK ProWo said that you can edit the BE_text file AFTER aborting an encode and somehow maybe it reads it when you load the file in the next time? I'm honestly not sure about that.

But, it does allow you to choose which method to use including Hable, Mobius, and another 1 or 2. In looking at the result now (after like 50 tries!) everything looks great EXCEPT the faces are to saturated... Oh well... the Handbrake one really doesn't look that bad at all, just a tad less saturated than I could quite hit with all my tries with Clever FFMpeg. But, it looks pretty good.

STILL don't know why this program didn't render it better than the picture I show above though... Most of the time it has done just great.
Lathe is offline   Reply With Quote
Old 12th December 2024, 08:29   #549  |  Link
Lathe
Registered User
 
Lathe's Avatar
 
Join Date: Aug 2005
Posts: 1,267
@ProWo... Bro, I'm sorry to keep pestering you, but I just started another enode from an UHD full 4k Blu-ray source and with the exact same settings that I ALWAYS use, yep, it is turning out all weird and dark again!

You might want to check to see if maybe you changed something, because this is 2 in a row that are not turning out right. Now the ONLY thing that I can see that is superficially different, is that when you choose 'Various' and you select HDR-SDR, the saturation used to default to '2', now it shows '0' when the window opens, so you actually have to set it to '2' which was what the default was before. Other than that, I don't see any other obvious changes, but these movies are not coming out right and you should know so you can see what is going on. Here is the BE_text:

Video ---> x264 (avc) - Stream ID 0 from?G:\___TL\HEVC.mkv?6672167?-hide_banner -loglevel error -stats -y -fflags +genpts -i "G:\___TL\HEVC.mkv" -vf fps=24000/1000,scale=1920:1080,zscale=t=linear:npl=200,tonemap=mobius:desat=2,sidedata=delete,colorspace=all=bt709:iall=bt2020,format=yuv420p -map 0:0 -c:v libx264 -profile:v high -preset medium -tune film -crf 18 -aspect 1.78 -an -sn -dn -metadata:g encoding_tool="clever FFmpeg-GUI" ?D:\__HEVC.mkv

Here is how the movie is turning out with Clever FFMpeg:



Here is a snapshot of how this 2nd movie is turning out with Handbrake:



These are with the exact same settings with BOTH programs that I have always used for UHD to SD and HDR-SDR.

Last edited by Lathe; 12th December 2024 at 08:47.
Lathe is offline   Reply With Quote
Old 12th December 2024, 08:46   #550  |  Link
GeoffreyA
Registered User
 
Join Date: Jun 2024
Location: South Africa
Posts: 254
If possible, try the following script to use FFmpeg directly and let's see what happens.

Code:
setlocal

set src=Test.mkv
set start=1:00:00
set length=10
set npl=203

ffmpeg -ss %start% -i "%src%" -map 0:v:0 -vf zscale=m=gbr:t=linear:dither=none:npl=%npl%,format=gbrpf32le,tonemap=mobius:desat=0,zscale=1920:-1:f=spline36,zscale=m=709:t=709:p=709:r=limited:dither=error_diffusion,format=yuv420p,sidedata=delete -c:v libx264 -crf 18 -t %length% "test.mp4"

endlocal
pause
Change the variables src, start, and length: the last two so that you don't have to encode the whole file. Place the code in a BAT file, along with an ffmpeg executable in the same folder, and run.
GeoffreyA is offline   Reply With Quote
Old 12th December 2024, 08:51   #551  |  Link
Lathe
Registered User
 
Lathe's Avatar
 
Join Date: Aug 2005
Posts: 1,267
Quote:
Originally Posted by GeoffreyA View Post
If possible, try the following script to use FFmpeg directly and let's see what happens.

Code:
setlocal

set src=Test.mkv
set start=1:00:00
set length=10
set npl=203

ffmpeg -ss %start% -i "%src%" -map 0:v:0 -vf zscale=m=gbr:t=linear:dither=none:npl=%npl%,format=gbrpf32le,tonemap=mobius:desat=0,zscale=1920:-1:f=spline36,zscale=m=709:t=709:p=709:r=limited:dither=error_diffusion,format=yuv420p,sidedata=delete -c:v libx264 -crf 18 -t %length% "test.mp4"

endlocal
pause
Change the variables src, start, and length: the last two so that you don't have to encode the whole file. Place the code in a BAT file, along with an ffmpeg executable in the same folder, and run.
Thanks! I just now also updated comparisons between how this program and Handbrake's encodes look above this post. There is definitely something that changed with Clever FFMpeg since I've used it before.

I am NOT conversant in using this kind of code, but I can save the text you gave me as a .bat file and I guess place it in the FFMpeg folder where the .exe is and try it. I have NO idea what it is doing though...

***EDIT

Oh, I see (I think...) it is executing the same text that is in the BE_text file.
Lathe is offline   Reply With Quote
Old 12th December 2024, 09:09   #552  |  Link
GeoffreyA
Registered User
 
Join Date: Jun 2024
Location: South Africa
Posts: 254
It takes "Test.mkv" and converts it from HDR to BT.709 SDR, scaling down to 1080p as well, and encodes with x264. The problem with FFmpeg's conversion, and I expect programs that are using FFmpeg behind the scenes, is that the result is over-saturated. I think it's a bug somewhere. (This is of interest to me because, as it turns out, this week I've been cleaning up my HDR scripts, getting them down to a final version, so that I can convert 4K LOTR Theatrical to 1080p SDR. So far, I've settled on using VapourSynth.)
GeoffreyA is offline   Reply With Quote
Old 12th December 2024, 09:19   #553  |  Link
ProWo
Registered User
 
Join Date: Mar 2020
Posts: 400
Quote:
Originally Posted by Lathe View Post
@ProWo... Bro, I'm sorry to keep pestering you, but I just started another enode from an UHD full 4k Blu-ray source and with the exact same settings that I ALWAYS use, yep, it is turning out all weird and dark again!

You might want to check to see if maybe you changed something, because this is 2 in a row that are not turning out right. Now the ONLY thing that I can see that is superficially different, is that when you choose 'Various' and you select HDR-SDR, the saturation used to default to '2', now it shows '0' when the window opens, so you actually have to set it to '2' which was what the default was before. Other than that, I don't see any other obvious changes, but these movies are not coming out right and you should know so you can see what is going on. Here is the BE_text:

Video ---> x264 (avc) - Stream ID 0 from?G:\___TL\HEVC.mkv?6672167?-hide_banner -loglevel error -stats -y -fflags +genpts -i "G:\___TL\HEVC.mkv" -vf fps=24000/1000,scale=1920:1080,zscale=t=linear:npl=200,tonemap=mobius:desat=2,sidedata=delete,colorspace=all=bt709:iall=bt2020,format=yuv420p -map 0:0 -c:v libx264 -profile:v high -preset medium -tune film -crf 18 -aspect 1.78 -an -sn -dn -metadata:g encoding_tool="clever FFmpeg-GUI" ?D:\__HEVC.mkv

These are with the exact same settings with BOTH programs that I have always used for UHD to SD and HDR-SDR.
Hi Lathe,
you're right, I have changed the npl value from 100 to 200, after many tests. You can edit the BT_open.txt, change the npl=200 to npl=100, save the file and fire up clever FFmpeg-GUI and click execute.
You will get the exact same result as before.

#EDIT:
There are other changes to investigate on. I'll come back to you soon with the results.

In the next beta I'll add a possibility to change this value (lower is brighter).

Last edited by ProWo; 12th December 2024 at 13:29.
ProWo is offline   Reply With Quote
Old 13th December 2024, 03:36   #554  |  Link
Lathe
Registered User
 
Lathe's Avatar
 
Join Date: Aug 2005
Posts: 1,267
Quote:
Originally Posted by GeoffreyA View Post
It takes "Test.mkv" and converts it from HDR to BT.709 SDR, scaling down to 1080p as well, and encodes with x264. The problem with FFmpeg's conversion, and I expect programs that are using FFmpeg behind the scenes, is that the result is over-saturated. I think it's a bug somewhere. (This is of interest to me because, as it turns out, this week I've been cleaning up my HDR scripts, getting them down to a final version, so that I can convert 4K LOTR Theatrical to 1080p SDR. So far, I've settled on using VapourSynth.)
Ah, good to know, thanks!

ProWo just sent me an .exe to try and so far it is doing a great job! I like the encode a little better than the Handbrake, it is a tad clearer and sharper.
Lathe is offline   Reply With Quote
Old 13th December 2024, 03:38   #555  |  Link
Lathe
Registered User
 
Lathe's Avatar
 
Join Date: Aug 2005
Posts: 1,267
Quote:
Originally Posted by ProWo View Post
Hi Lathe,
you're right, I have changed the npl value from 100 to 200, after many tests. You can edit the BT_open.txt, change the npl=200 to npl=100, save the file and fire up clever FFmpeg-GUI and click execute.
You will get the exact same result as before.

#EDIT:
There are other changes to investigate on. I'll come back to you soon with the results.

In the next beta I'll add a possibility to change this value (lower is brighter).
Thanks Bro! Yep, the .exe you just sent me seems to be doing a great job! Really appreciate it man!
Lathe is offline   Reply With Quote
Old 13th December 2024, 07:37   #556  |  Link
GeoffreyA
Registered User
 
Join Date: Jun 2024
Location: South Africa
Posts: 254
Quote:
Originally Posted by Lathe View Post
Ah, good to know, thanks!

ProWo just sent me an .exe to try and so far it is doing a great job! I like the encode a little better than the Handbrake, it is a tad clearer and sharper.
That's good news!

Yesterday, I was experimenting with libplacebo and it blew the other methods out of the water. Its "Spline" tone-mapping operator beats Mobius, Reinhard, and Hable, and its colour-gamut conversion mechanism as well. Even a challenging scene, Galadriel coming down the stairs in front of the candles, comes out excellent without overblown highlights.
GeoffreyA is offline   Reply With Quote
Old 13th December 2024, 07:43   #557  |  Link
GeoffreyA
Registered User
 
Join Date: Jun 2024
Location: South Africa
Posts: 254
Quote:
Originally Posted by ProWo View Post
Hi Lathe,
you're right, I have changed the npl value from 100 to 200, after many tests. You can edit the BT_open.txt, change the npl=200 to npl=100, save the file and fire up clever FFmpeg-GUI and click execute.
You will get the exact same result as before.

#EDIT:
There are other changes to investigate on. I'll come back to you soon with the results.

In the next beta I'll add a possibility to change this value (lower is brighter).
ProWo, you may be able to improve the conversion further by downscaling in linear light, using Spline36, and using zscale instead of colorspace for the conversation to BT.709 and YUV420 at the end. Also, scaling after tone mapping can eliminate some rare artefacts related to text.
GeoffreyA is offline   Reply With Quote
Old 13th December 2024, 09:24   #558  |  Link
Lathe
Registered User
 
Lathe's Avatar
 
Join Date: Aug 2005
Posts: 1,267
Quote:
Originally Posted by GeoffreyA View Post
That's good news!

Yesterday, I was experimenting with libplacebo and it blew the other methods out of the water. Its "Spline" tone-mapping operator beats Mobius, Reinhard, and Hable, and its colour-gamut conversion mechanism as well. Even a challenging scene, Galadriel coming down the stairs in front of the candles, comes out excellent without overblown highlights.
Hmmm... I'll hafta try that 'Spline' operator, I THINK it is a choice on the Clever program.
Lathe is offline   Reply With Quote
Old 13th December 2024, 09:27   #559  |  Link
Lathe
Registered User
 
Lathe's Avatar
 
Join Date: Aug 2005
Posts: 1,267
Quote:
Originally Posted by ProWo View Post
Hi Lathe,
you're right, I have changed the npl value from 100 to 200, after many tests. You can edit the BT_open.txt, change the npl=200 to npl=100, save the file and fire up clever FFmpeg-GUI and click execute.
You will get the exact same result as before.

#EDIT:
There are other changes to investigate on. I'll come back to you soon with the results.

In the next beta I'll add a possibility to change this value (lower is brighter).
Yes, as the PM I sent you shows, I did change that value on the Various tab when converting HDR-SDR from 200 to 100, and the movie I was doing, the UHD of 'THE FACULTY' then looked really good. I think I sent you comparative screen shots.
Lathe is offline   Reply With Quote
Old 13th December 2024, 09:36   #560  |  Link
ProWo
Registered User
 
Join Date: Mar 2020
Posts: 400
Newest beta (v3.3.4.01), online now.

Added:
Set npl value for HDR to SDR tonemapping.
aac_mf audio encoder,
h264_mf video encoder (thx to Findu for the latter two hint).
Error check during task processing.

Fixed:
Bug in HDR to SDR tonemapping (thx to Lathe for the hint).
ProWo is offline   Reply With Quote
Reply

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 04:48.


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