[FFmpeg-devel] [RFC] Audio normalization
Clément Bœsch
ubitux at gmail.com
Fri Feb 22 17:09:26 CET 2013
On Fri, Feb 22, 2013 at 04:45:56PM +0100, Jan Ehrhardt wrote:
> Clément Bsch in gmane.comp.video.ffmpeg.devel (Fri, 22 Feb 2013
> 00:22:38 +0100):
> >How to test it:
> >
> > ./ffplay -f lavfi -i
> > 'amovie=in.mp3,ebur128=video=1:metadata=1[r128-before][a];
> > [a]volume=metadata=lavfi.r128.I,ebur128=video=1[r128-after][out1];
> > [r128-before] pad=iw*2 [padded]; [padded][r128-after] overlay=w'
>
> This one exits immediately in my cross-compiled ffplay.exe, bit that may
> be a problem with the cross-compiling.
>
The "exits immediately" is what I observe with the other tools under
certain conditions; it's the issue which seems related to the audio
framing I was mentioning. Though, I don't observe it with this
command/filtergraph.
> >Also, there is bug: it seems ffmpeg and ffprobe don't appreciate very much the
> >segmentation through {min,max}_samples in lavfi, and exit very quickly without
> >giving much info (AFAICT it seems the fifo is empty after a first request
> >frame). How to reproduce: after the patchset,
> > ffmpeg -f lavfi -i 'amovie=in.mp3,ebur128=metadata=1' -f null -
>
> I am now experimenting with ffmpeg & things like
>
> -filter_complex
> "[0:v]setpts=PTS-STARTPTS[v0]; \
> [0:a]asetpts=PTS-STARTPTS,ebur128=metadata=1[a0]; \
> [a0]volume=metadata=lavfi.r128.I,ebur128[a1]" \
> -map [v0] -map [a1]
>
> This produces a correct output in ffmpeg, but alas without volume
> correction. But my intuition says something like this should be
> possible. Would that be an idea?
>
The following seems to work for me:
./ffmpeg -i in.mp3 -af ebur128=metadata=1,volume=metadata=lavfi.r128.I -y out.wav
Verified by comparing:
./ffplay -f lavfi -i 'amovie=in.mp3,ebur128[out0][out1]'
./ffplay -f lavfi -i 'amovie=out.wav,ebur128[out0][out1]'
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130222/caf35432/attachment.asc>
More information about the ffmpeg-devel
mailing list