AkarinVS / L-SMASH-Works

Works based on L-SMASH project; This repo focuses on the common portion and the VapourSynth plugin. AviSynth users please use https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works. ffmpeg 5.0+ please use ffmpeg-4.5 branch.
47 stars 11 forks source link

Add DRC parameter to LSMASH/LWLibavAudioSource() #4

Open kedaitinh12 opened 3 years ago

kedaitinh12 commented 3 years ago

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 commented 3 years ago

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

tebasuna51 commented 3 years ago

Thanks for your interest.

I wait for AkarinVS AviSynth version.

AkarinVS commented 3 years ago

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.

kedaitinh12 commented 3 years ago

Can you replace drc_scale with ff_options???