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. |
29th July 2023, 13:37 | #1 | Link | |
Registered User
Join Date: Dec 2003
Posts: 487
|
4k encode super small
I have a 4k HDR10/DolbyVision IMAX of Top Gun Maverick. Want to put it on my media server. I ran the following against the video:
Quote:
Skipping NAL Unit 63 Which I understand is some layer or something from DolbyVision that ffmpeg can't handle? The final output of the video was 3.8GB from an extracted source of 78GB. Outside of watch it and see as I'm never good with that checking quality does that sound wrong? |
|
29th July 2023, 14:44 | #2 | Link | |
Lost my old account :(
Join Date: Jul 2017
Posts: 338
|
Quote:
And it might be worth to mention that hdr usually get allocated fewer bits than sdr at the same crf, Last edited by excellentswordfight; 29th July 2023 at 15:20. |
|
29th July 2023, 15:48 | #3 | Link | |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,799
|
Quote:
EDIT: see here: https://forum.doom9.org/showthread.p...57#post1977257.
__________________
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; 29th July 2023 at 15:51. |
|
29th July 2023, 18:09 | #4 | Link |
Registered User
Join Date: Dec 2003
Posts: 487
|
Thanks for the replies. I'm starting to think it's related to the NAL unit 63 messages but maybe it's what it is supposed to be. DolbyVision videos that don't output that message over and over are encoding at a more understandable size and those that do output the 63 message seem unusually small. MediaInfo shows I guess the average bitrate of the source at 67MB/s and the one I create at 4.
Running it thru FFMetrics if relevant I get: PSNR: 41.5829 SSIM: 0.9932 VMAF: 93.0939 Is a CRF of 20 to (never sure how to word this) high of a number and should go lower? Reading Code Calamity articles they came down to a CRF value in general for 4k of 20. Seemed like a knowledgeable person in the space but glad to adjust it. used to use CRF 13 for stuff I really liked and CRF 16 for stuff I was just keeping to keep. I also though was limiting maxrate to 17,500 and 15,00 respectively when doing that. Without those limits frequently the final video would be twice the size of the source. Note also used to encode with Slower instead of Slow befor ereading the Code Calamity articles. Last edited by jriker1; 29th July 2023 at 18:20. |
29th July 2023, 19:49 | #5 | Link | |
Lost my old account :(
Join Date: Jul 2017
Posts: 338
|
Quote:
That said, 20 is usually the starting point for good quality encodes, which your numbers also confirms (vmaf above 93 and psnr above 40 which are good indicators). And down towards 15-16 is were you would start to see excellent quality, were transparency is starting to be achieved. Ive done some sanity checks on titles were crf 15-16 resualted in very low bitrate files, and I could not tell it apart from source in a/b testing (even when swopping between stills), i see no reason to go down further. What you used to do with crf 13 and vbv-limits is a pretty strange strategy, what you get is pretty much constant bitrate encoding at that point if you got such huge files without it, you gain pretty much nothing from the low crf value. It should also be noted that crf values cannot be compared between different settings, and is not a fixed quality level, this is extra apperent sense the faster presets usually give you smaller files ar the same crf than the slowest presets. The values mentioned above is for slow/slower at somewhat ordinary settings. Cause for example, changing aq-mode or tweaking psy can have huge impact on bitrate at given crf value, but that doenst mean that it offers better or worse compression. Last edited by excellentswordfight; 29th July 2023 at 20:13. |
|
30th July 2023, 21:48 | #6 | Link |
Registered User
Join Date: Dec 2003
Posts: 487
|
Yeah I think my logic was to give it a lot of bits to work with but cap it from getting out of control.
Note I've never done CRF 20 or for that matter preset of Slow until now. Always done like CRF 13 - 16 and always a preset of Slower. I'm encoding Creed III right now which I wasn't' thinking the original would be stellar quality and also giving the 63 dolby vision skipping messages. I haven't looked at the video quality physically but 40 minutes of show content encoded and file is 1Gb in size right now. So again going to be super small than what I'm used to but maybe my videos have been bigger than they need to for years now who knows. Thing will be smaller than the original audio which I do not usually modify. |
30th July 2023, 23:38 | #7 | Link | |||
Lost my old account :(
Join Date: Jul 2017
Posts: 338
|
Quote:
Quote:
Quote:
And FYI, Im pretty sure that the NAL 63 warning is related to the EL layer of DV files. I think its just reporting that its skipping the EL layer. Last edited by excellentswordfight; 31st July 2023 at 00:06. |
|||
31st July 2023, 06:42 | #8 | Link | |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,866
|
Quote:
|
|
31st July 2023, 16:55 | #9 | Link |
Registered User
Join Date: Dec 2003
Posts: 487
|
Thanks for the replies. Never can get an answer to this fully and know it's variable, however if you have a super clean source or an animated movie say that is 2 hours long, what should I be expecting? Is 3GB for the video output something that immediately says that's a bad looking encode or could be acceptable? Note I'm not super concerned with file size over quality but also don't want to waste space for no reason. Think I've been doing that for a long time now so having a hard time wrapping my arms around if a 3GB encode is acceptable for a 4k HDR10/Dolby Vision video where in the past I would always be lookin at 15GB - 35GB depending on grain.
|
1st August 2023, 15:32 | #10 | Link |
Registered User
Join Date: Dec 2003
Posts: 487
|
So this is confusing. All the same except the CRF and Preset values, getting weird results.
CRF20 Slow returns: PSNR: 44.0456 SSIM: 0.9889 VMAF: 95.6835 File Size: 3.1GB CRF20 Slower returns: PSNR: 43.9303 SSIM: 0.9881 VMAF: 95.7374 File Size: 3.3GB OK that seems about right I guess. I decided to do an encode at CRF 19 and preset slow: PSNR: 32.4574 SSIM: 0.9676 VMAF: 67.3648 File Size: 3.9GB Only part of this that maybe seems right is the file size difference. What am I missing? Didn't see an option to cross out anything so marked my crossout in red. Apparently I ran the check against an MKV source and the HEVC output. Adding it into an MKV container returned better results. New output: PSNR: 44.0941 SSIM: 0.9891 VMAF: 96.0053 File Size: 4.0GB Note with all videos I'm skipping the first minute in the above scan and letting it check 10 minutes of video. Changing my comment slightly, and I ran this multiple times so know it's clean what it's checking at least within the 10 minutes. Why is the slower version come back with a slightly lower SSIM and a lower PSNR than even it's "slow" counterpart. Last edited by jriker1; 1st August 2023 at 16:41. |
2nd August 2023, 19:53 | #11 | Link |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,866
|
That big drop at CRF 19 suggests a metrics analysis problem, like you're comparing frames with a 1 frame offset or something. PSNR is particularly sensitive to that sort of thing.
How do those values compare to the PSNR AND SSIM that x265 logs directly (I like to use --csv-log-level 2 for later analysis). |
Tags |
ffmpeg, x265 |
Thread Tools | Search this Thread |
Display Modes | |
|
|