-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Encoding with CQ besides CRF #1301
Comments
I'm not that familiar with Handbrake since I've mostly been using FFmpeg directly from command line, but if I'm not mistaken when it comes to H.264 and H.265, CQ in Handbrake seems to just be CRF? |
You have to choose an Option with (Nvenc) after H264 or H265. I think 12-Bit doesn't have (Nvenc). |
I think Handbrake is based on ffmpeg |
Maybe it is possible to use this as ffmpeg command? |
I don't have nvenc since I'm using it in a Windows VM. My workstation is Arch. Could you please do me a favor and screenshot the exact setting that you're referring to so I don't have to guess? |
Ok, I'll send a Screenshot later |
Maybe you could built-in this in ffmpeg for 10-Bit and 12-Bit: |
Ok, thank you very much. I will try this. But I don't know if this works with 10-Bit then. |
Or could I set the value for pix_fmt = yuv420p10le for 10 Bit and then the other values? Maybe that works. I will try this, too. |
I think for hardware H.265 the pixel format might be |
Ok, thanks. I will try this. |
p010le results in a failed process immediately. yuv420p10le works. |
Ok, seems to work at the moment. I try and test the difference between a H264 Video with 14 GB to the small output I get now. I see that CRF seems to work better, so I test crf = 20 and preset medium with yuv420p10le as pix fmt. When I get the same quality like with Handbrake I can save one step and still have all subtitles and audios, so that I don't have to separate the subtitles from the file. |
Great. With that said, I don't think I need to implement any new features in v2x? What you want to achieve can all be achieved through settings it seems. |
Yes, I see now if that gives the same result. I say later if that works. I have to look especially at the difference in the dark, if there are some spots. With 10-Bit the spots should be very small, almost unrecognizable. |
Gotcha. Please let me know your test results. If it proves to work as expected, you can also close the issue. |
Ok, I tested it with the parameter 23 for crf, yuv420p10le as pix fmt and preset set as medium, I get around 420 MB for a 4K file without those spots, so that seems that 10-Bit really works. With making the 4K file with libx264 and crf 10, preset medium I get a 13,5 GB file. When I convert this again with Handbrake, I am at 408 MB for this file. So the difference is only 12 MB, what means that the one-in-all-conversion with Video2X is almost the same size and the look is almost without losing quality. You can only recognize some spikes in the Netflix Logo for example. But that is the same with Handbrake. The only thing where Handbrake is better is with BluRay-Content, because there is a difference of 500-600 MB, but I think the post can be closed and I close it. |
Oh and CQ is not necessary. That was the main idea of this issue. |
FYI if you process the file with Real-ESRGAN/Real-CUGAN or RIFE, they get converted into RGB24 because that's what the models accept and spits out. For those cases, I'm not sure if there's still a point storing the output with 10-bit. |
Is your feature request related to a problem? Please describe.
The encoding is only possible by using CRF.
Describe the solution you'd like
When you could do an encoding with CQ you could maybe encode it to H265 with 10Bit in lossless quality and smaller filesize immediately without the step to use Handbrake. Anime looks much better in the quark with this encoding.
Describe alternatives you've considered
When this don't work, then maybe it is possible to do something against the color stripes in the dark or you could use some code from Handbrake. I think that is Open-Source, too.
Additional context
You could see the results by using Handbrake with a 4K file from Video2X. You can choose Video Encoder to "H.265 10-bit (NVEnc)" use the CQ "30" and then setup to slowest and start.
The text was updated successfully, but these errors were encountered: