L-SMASH-Works icon indicating copy to clipboard operation
L-SMASH-Works copied to clipboard

Add DRC parameter to LSMASH/LWLibavAudioSource()

Open kedaitinh12 opened this issue 3 years ago • 4 comments

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

kedaitinh12 avatar Jul 14 '21 07:07 kedaitinh12

Report copy from here https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/issues/5

kedaitinh12 avatar Jul 14 '21 07:07 kedaitinh12

Thanks for your interest.

I wait for AkarinVS AviSynth version.

tebasuna51 avatar Jul 14 '21 09:07 tebasuna51

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.

AkarinVS avatar Jul 29 '21 06:07 AkarinVS

Can you replace drc_scale with ff_options???

kedaitinh12 avatar Jul 29 '21 11:07 kedaitinh12