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.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

Go Back   Doom9's Forum > Announcements and Chat > General Discussion

Reply
 
Thread Tools Search this Thread Display Modes
Old 15th May 2025, 03:52   #1  |  Link
jay123210599
Registered User
 
Join Date: Apr 2024
Posts: 501
About HDR to SDR Quality, part 2

I want to use this script in this page for my 4K HDR video to convert to 4K SDR, but I need to make some adjustments in order for it to work. What should I change in this script?

https://forum.doom9.org/showthread.p...87#post2013487
jay123210599 is offline   Reply With Quote
Old 15th May 2025, 06:21   #2  |  Link
microchip8
ffx264/ffhevc author
 
microchip8's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 2,034
The [...] part?
microchip8 is offline   Reply With Quote
Old 15th May 2025, 10:09   #3  |  Link
GeoffreyA
Donor
 
Join Date: Jun 2024
Location: South Africa
Posts: 671
Quote:
Originally Posted by jay123210599 View Post
I want to use this script in this page for my 4K HDR video to convert to 4K SDR, but I need to make some adjustments in order for it to work. What should I change in this script?

https://forum.doom9.org/showthread.p...87#post2013487
In place of the [...], you could use:

Code:
-preset slower -crf 18
Depending on whether it's live action or anime, you could tune it further with -x265-params. Or even change the encoder to x264 with -c:v libx264. Note that -map 0:v:0 means that only the first video stream will be processed. If you want to process all streams, including audio, change that to -map 0 and add, for example, -c:a copy later in the command, or whatever the desired result may be. One may wish to downmix multichannel audio to stereo with -ac 2. Achieving better results with audio is beyond the scope of this question, but I use two passes of the loudnorm filter coupled with downmixing, piping the result to qaac. If the source has subtitles, you may wish to copy them over with -c:s copy. MKV should be the destination.
GeoffreyA is offline   Reply With Quote
Old 16th May 2025, 03:19   #4  |  Link
jay123210599
Registered User
 
Join Date: Apr 2024
Posts: 501
Quote:
Originally Posted by GeoffreyA View Post
In place of the [...], you could use:

Code:
-preset slower -crf 18
Depending on whether it's live action or anime, you could tune it further with -x265-params. Or even change the encoder to x264 with -c:v libx264. Note that -map 0:v:0 means that only the first video stream will be processed. If you want to process all streams, including audio, change that to -map 0 and add, for example, -c:a copy later in the command, or whatever the desired result may be. One may wish to downmix multichannel audio to stereo with -ac 2. Achieving better results with audio is beyond the scope of this question, but I use two passes of the loudnorm filter coupled with downmixing, piping the result to qaac. If the source has subtitles, you may wish to copy them over with -c:s copy. MKV should be the destination.
I made the adjustments but then I got this error:

Code:
[in#0 @ 0000015629f978c0] Error opening input: No such file or directory
Error opening input file INPUT.
Error opening input files: No such file or directory
jay123210599 is offline   Reply With Quote
Old 16th May 2025, 07:06   #5  |  Link
GeoffreyA
Donor
 
Join Date: Jun 2024
Location: South Africa
Posts: 671
Change INPUT to the source file with extension. Or use "%1" and drag and drop the file onto the BAT. Make sure to set OUTPUT as well.
GeoffreyA is offline   Reply With Quote
Old 16th May 2025, 11:23   #6  |  Link
jay123210599
Registered User
 
Join Date: Apr 2024
Posts: 501
Quote:
Originally Posted by GeoffreyA View Post
Change INPUT to the source file with extension. Or use "%1" and drag and drop the file onto the BAT. Make sure to set OUTPUT as well.
I did it, now I got this error:

Code:
[AVFormatContext @ 000002665c9eec00] Unable to choose an output format for 'crop=1920:804:0:138:exact=true,sidedata=delete'; use a standard extension for the filename or specify the format manually.
[out#0 @ 000002665c9eb840] Error initializing the muxer for crop=1920:804:0:138:exact=true,sidedata=delete: Invalid argument
Error opening output file crop=1920:804:0:138:exact=true,sidedata=delete.
Error opening output files: Invalid argument
jay123210599 is offline   Reply With Quote
Old 16th May 2025, 11:53   #7  |  Link
GeoffreyA
Donor
 
Join Date: Jun 2024
Location: South Africa
Posts: 671
The entire command should be on one line; I separated it, in that previous post, for clarity. Then, make sure that each comma is touching the previous filter: no spaces. To use spaces, enclose the -vf in double quotes:

Code:
-vf "filter1, filter2, filter3"

Last edited by GeoffreyA; 16th May 2025 at 11:58.
GeoffreyA is offline   Reply With Quote
Old 16th May 2025, 12:15   #8  |  Link
microchip8
ffx264/ffhevc author
 
microchip8's Avatar
 
Join Date: May 2007
Location: /dev/video0
Posts: 2,034
Did you add -vf before the filter chain?
microchip8 is offline   Reply With Quote
Reply

Tags
hdr to sdr

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


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