[FFmpeg-user] HOW TO APPLY LOUDNESS R128 PROFILE

Marco Mircoli nuvolablux at gmail.com
Wed Sep 23 16:30:25 EEST 2020


Thanks Motitz,
   this is a one pass norm.
Is there a way to implement 2 pass?
Thanks.
S.


Il giorno mer 23 set 2020 alle ore 14:42 Moritz Barsnick <barsnick at gmx.net>
ha scritto:

> On Wed, Sep 23, 2020 at 14:16:31 +0200, Marco Mircoli wrote:
> > Just bought a php script that use ffmpeg.
>
> I hope it's worth it. ;)
>
> > this is the line
> > $shell     = shell_exec("$ffmpeg_b -i $audio_file_full_path -map 0:a:0
> -b:a
> > 96k $audio_output_mp3 2>&1");
> >
> > I'm wondering if it is possible to include in the conversion the audio
> > level normalization to R128 loudness profile.
> > I think it is possible, but I don't know how to do it :-(
>
> Sure. You just need to insert a filter to the command line. The R128
> filter is even described here:
>
> https://trac.ffmpeg.org/wiki/AudioVolume#LoudnessNormalization
>
> > $shell     = shell_exec("$ffmpeg_b -i $audio_file_full_path -map 0:a:0
> -b:a 96k $audio_output_mp3 2>&1");
>
> Just add the loudnorm filter:
>
> $shell     = shell_exec("$ffmpeg_b -i $audio_file_full_path -map 0:a:0 -af
> loudnorm -b:a 96k $audio_output_mp3 2>&1");
>
> To fine tune the filter's behavior, check ffmpeg's filters
> documentation, or
>
> $ ffmpeg -h filter=loudnorm
>
> Good luck,
> Moritz
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list