Closed whppr closed 2 years ago
@whppr Thanks and congrats on that awesome CPU!
OK, I will consider VBR support for FDK. Stay tuned.
The problem I'm having with exploring this is just testing FDK. It's basically impossible to use FDK without building a custom verson of ffmpeg
due to licensing issues. So, this will go on a back burner until I figure that out.
@whppr Can you share your script? I am also interested to use fdk_aac for my workflow.
@donmelton Can you give me a hint how to use fdkaac in your script with my self compiled ffmpeg version?
libfdk_aac -cutoff 20000 -afterburner 1 -vbr 5
@CaptSonic The only way to use FDK with other-transcode
at the moment is to modify the command line it emits to ffmpeg
. You can get that command line using the --dry-run
option. You can then copy, edit and paste that command back into your terminal.
@donmelton Is that right? I thought other-transcode
had a find_encoders
method, and it would use either aac_at
or libfdk_aac
if it could find it.
EDIT: I'm pretty sure it'll use fdk if ffmpeg has it, but the only way to add those extra options (-cutoff
, -afterburner
, and -vbr
is to modify the ffmpeg command as Don described
@samhutchins Ack! I somehow missed your comment. Apologies!
And you are correct, I dynamically choose libfdk_aac
if it's available. My bad.
@CaptSonic Sorry for my late reply. I was not active on my PC on which I had the modified script stored.
I've changed this line (line 2104 in v0.9):
*(bitrate.nil? ? [] : ["-b:a:#{index}", "#{bitrate}k"]),
Into:
*(encoder == 'libfdk_aac' ? ["-vbr", '5'] : []),
Then I convert with the --aac-only
parameter. As you can see I use -vbr 5
, because this is the only setting without low pass filter and is fully transparent.
Thank you. I'll try it. But first I had to tell my PC to use my own ffmpeg version as standard
@whppr OK, I've got a --fdk-vbr
option implemented. It seems to work but I need to do more testing. It's likely I'll check this in tomorrow if it still works then. Stay tuned.
@whppr @CaptSonic @samhutchins OK, I have checked in the feature implementation. Here's how I'll describe it in the README:
- Add a
--fdk-vbr
option toother-transcode
to set the numeric variable bitrate (VBR) mode for the Fraunhoferlibfdk_aac
audio encoder, disabling constant bitrate (CBR) ratecontrol. VBR mode1
selects the lowest quality and5
the highest. Please note that thelibfdk_aac
encoder is not normally included withffmpeg
due to licensing restrictions and the--fdk-vbr
option has no effect if that encoder is not available.
Please download it and try it out. Thanks!
Thank you! I will try it.
Could you add the -afterburner 1
feature as well, since Frauenhofer also recommends it?
https://wiki.hydrogenaud.io/index.php?title=Fraunhofer_FDK_AAC#Afterburner
@CaptSonic So, should Afterburner be enabled by default? And how much does it affect performance?
No need to enable afterburner. It is enabled by default.
@whppr Thanks! I just found that out looking at the code, too. :)
Encode is running. Looks good.
OK, I'll close this now since the code is in and seems to be working. I'll likely make an official release with it in a week or two. Thanks, all!
First; thanks so much for this script and all the progression made in the last year (I read all the change logs and also the issues and wiki to get a grip on all the design choices). I finally upgraded to a PC with a proper RTX 3060 graphics adapter, so video encoding using this script is a real pleasure again. I've been testing a lot in the last weeks and I've settled for 6000k (which is indeed marginally better than the default setting) and using fdk-aac for all tracks with VBR encoding.
To use VBR encoding I had to adapt the script myself (thanks for making this so easy to do), but it would be great if this would be a future parameter. I did settle for VBR 5 (no lowpass filter) encoding, because it ensures maximum quality for comparable or lower bitrates than (E)AC3 and provides great compatibility across all my devices.