L-SMASH-Works
L-SMASH-Works copied to clipboard
Add DRC parameter to LSMASH/LWLibavAudioSource()
All players have a option to override the Dynamic Range Compression included in some AC3 files. Also ffmpeg have the parameter -drc_scale 0
But with LSMASH/LWLibavAudioSource() we can't override the compression and the decoded volume don't match the source volume when DRC data is present. This is a big problem to transcode audio.
Attached sample files encoded with DRC: Film Standard and DRC: None https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/files/6747139/Samples.zip
The film file have only a Dynamic Range Compression min/max : -6,59 / 3,52 dB but DRC can go until -24/+24 dB
See also https://forum.doom9.org/showthread.php?p=1945716#post1945716
Report copy from here https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/issues/5
Thanks for your interest.
I wait for AkarinVS AviSynth version.
It seems this issue is fixed by https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/releases/tag/20210728
As that fork basically cherry-picks every commit in this repository, I think AVS users can just use that.
Though, I don't agree with its handling of drc_scale
flag:
My proposed solution is to introduce a ff_options
flag so that the user can set any ffmpeg options, and there is no need to modify the filter for every new knob.
Can you replace drc_scale with ff_options???