[FFmpeg-devel] [PATCH 3/3] fate: add loudnorm filter test

Michael Niedermayer michael at niedermayer.cc
Tue Oct 18 05:00:11 EEST 2016


On Tue, Oct 18, 2016 at 02:20:03AM +0200, Marton Balint wrote:
> 
> On Tue, 18 Oct 2016, Michael Niedermayer wrote:
> 
> >On Sun, Oct 16, 2016 at 10:12:17PM +0200, Marton Balint wrote:
> >>
> >>On Sun, 16 Oct 2016, Marton Balint wrote:
> >>
> >>>Signed-off-by: Marton Balint <cus at passwd.hu>
> >>>---
> >>>tests/fate/filter-audio.mak | 7 +++++++
> >>>1 file changed, 7 insertions(+)
> >>>
> >>>diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak
> >>>index 9c6f7cd..d376f25 100644
> >>>--- a/tests/fate/filter-audio.mak
> >>>+++ b/tests/fate/filter-audio.mak
> >>>@@ -279,6 +279,13 @@ fate-filter-hdcd-detect-errors: CMD = md5 -i $(SRC) -af hdcd -f s24le
> >>>fate-filter-hdcd-detect-errors: CMP = grep
> >>>fate-filter-hdcd-detect-errors: REF = detectable errors: [1-9]
> >>>
> >>>+FATE_AFILTER-$(call FILTERDEMDECENCMUX, LOUDNORM, AAC, AAC, PCM_S16LE, PCM_S16LE) += fate-filter-loudnorm-simple
> >>>+fate-filter-loudnorm-simple: SRC = $(SAMPLES)/aac/sintel.aac
> >>>+fate-filter-loudnorm-simple: CMD = ffmpeg -t 30 -i $(SRC) -af loudnorm=i=-23 -f s16le -ar 44100 -
> >>>+fate-filter-loudnorm-simple: REF = $(SAMPLES)/filter/loudnorm-simple.pcm
> >>>+fate-filter-loudnorm-simple: CMP = oneoff
> >>>+fate-filter-loudnorm-simple: CMP_UNIT = s16
> >>>+
> >>
> >>This patch needs two files in the fate samples:
> >>
> >>The audio part of the Sintel movie, as a source, because I wanted to
> >>test with a real world example, with proper length. And the
> >>reference file. Sources can be generated like this:
> >>
> >>wget http://media.xiph.org/sintel/sintel-master-st.flac
> >>ffmpeg -i sintel-master-st.flac -codec aac -b 96k fate-suite/aac/sintel.aac
> >>ffmpeg -t 30 -i fate-suite/aac/sintel.aac -af loudnorm=i=-23 -f s16le -ar 44100 fate-suite/filter/loudnorm-simple.pcm
> >>
> >>Due to the 96k AAC codec, sintel.aac is about 15M,
> >
> >are low bitrate speech codecs unsuitable instead of aac for this ?
> >that would cut the size down by alot
> 
> In theory, maybe, on the other hand, we are only using the first 30
> second of the sample, so if size is an issue, we can reduce it to
> around 500k and the fate test will still work.
> 
> Since the reference file alone is 6M, it does not seem to make too
> much difference if the sample is 500k, or less, so I'd prefer the
> normal codec. I am not sure I can give you a pure technical
> reasoning, the only thing I could think of is that as far as I know
> a speech codec is usually not good at very low or very high

> frequencies, but it is a good idea to test loudness measurement with
> all kind of frequencies, because of it's frequency dependant
> filters.

a synthetic sample that contains a sine sweep would excercise all
frequencies
tests/audiogen would need very little space to generate such sample
but i dont know if its worse for testing ?

also is using a PCM file optimal as reference ?
it may be hard to understand from the psnr difference what exactly
changed if some code change triggers a change in the output.
and also if the code is changed to require a new reference in the
future we would need to keep multiple reference files

either way, if you say that these files are the best solution then ill
upload them (assuming the new fate tests pass, didnt try yet)

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you drop bombs on a foreign country and kill a hundred thousand
innocent people, expect your government to call the consequence
"unprovoked inhuman terrorist attacks" and use it to justify dropping
more bombs and killing more people. The technology changed, the idea is old.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20161018/9e8fd581/attachment.sig>


More information about the ffmpeg-devel mailing list