[FFmpeg-devel] [PATCH v3 3/8] lavfi/silencedetect: Update test parameters

Nicolas Gaullier nicolas.gaullier at arkena.com
Mon Feb 19 15:15:54 EET 2018


Set relevant filter parameters such that the result can easily be
checked with a waveform editor.
In particular, it makes it clear the silence_start is not accurate in
the current code.
---
 tests/fate/filter-video.mak                  |  3 +-
 tests/ref/fate/filter-metadata-silencedetect | 54 ++++++++++++++--------------
 2 files changed, 29 insertions(+), 28 deletions(-)

diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak
index 221ae81fdc..0575fc6767 100644
--- a/tests/fate/filter-video.mak
+++ b/tests/fate/filter-video.mak
@@ -720,7 +720,8 @@ fate-filter-metadata-cropdetect: CMD = run $(FILTER_METADATA_COMMAND) "sws_flags
 SILENCEDETECT_DEPS = FFPROBE AVDEVICE LAVFI_INDEV AMOVIE_FILTER AMR_DEMUXER AMRWB_DECODER SILENCEDETECT_FILTER
 FATE_METADATA_FILTER-$(call ALLYES, $(SILENCEDETECT_DEPS)) += fate-filter-metadata-silencedetect
 fate-filter-metadata-silencedetect: SRC = $(TARGET_SAMPLES)/amrwb/seed-12k65.awb
-fate-filter-metadata-silencedetect: CMD = run $(FILTER_METADATA_COMMAND) "amovie='$(SRC)',silencedetect=d=-20dB"
+fate-filter-metadata-silencedetect: CMD = run $(FILTER_METADATA_COMMAND) "amovie='$(SRC)',silencedetect=n=-42dB:d=.3"
+
 
 EBUR128_METADATA_DEPS = FFPROBE AVDEVICE LAVFI_INDEV AMOVIE_FILTER FLAC_DEMUXER FLAC_DECODER EBUR128_FILTER
 FATE_METADATA_FILTER-$(call ALLYES, $(EBUR128_METADATA_DEPS)) += fate-filter-metadata-ebur128
diff --git a/tests/ref/fate/filter-metadata-silencedetect b/tests/ref/fate/filter-metadata-silencedetect
index 4161287e6c..d1d6f67dc0 100644
--- a/tests/ref/fate/filter-metadata-silencedetect
+++ b/tests/ref/fate/filter-metadata-silencedetect
@@ -4,20 +4,20 @@ pkt_pts=640
 pkt_pts=960
 pkt_pts=1280
 pkt_pts=1600
-pkt_pts=1920|tag:lavfi.silence_start=0.02
+pkt_pts=1920
 pkt_pts=2240
-pkt_pts=2560|tag:lavfi.silence_end=0.16|tag:lavfi.silence_duration=0.14
+pkt_pts=2560
 pkt_pts=2880
 pkt_pts=3200
 pkt_pts=3520
 pkt_pts=3840
 pkt_pts=4160
-pkt_pts=4480
+pkt_pts=4480|tag:lavfi.silence_start=-0.02
 pkt_pts=4800
 pkt_pts=5120
 pkt_pts=5440
-pkt_pts=5760|tag:lavfi.silence_start=0.26|tag:lavfi.silence_end=0.36|tag:lavfi.silence_duration=0.1
-pkt_pts=6080
+pkt_pts=5760
+pkt_pts=6080|tag:lavfi.silence_end=0.38|tag:lavfi.silence_duration=0.4
 pkt_pts=6400
 pkt_pts=6720
 pkt_pts=7040
@@ -67,12 +67,12 @@ pkt_pts=20800
 pkt_pts=21120
 pkt_pts=21440
 pkt_pts=21760
-pkt_pts=22080|tag:lavfi.silence_start=1.28
+pkt_pts=22080
 pkt_pts=22400
 pkt_pts=22720
 pkt_pts=23040
 pkt_pts=23360
-pkt_pts=23680
+pkt_pts=23680|tag:lavfi.silence_start=1.18
 pkt_pts=24000
 pkt_pts=24320
 pkt_pts=24640
@@ -97,7 +97,7 @@ pkt_pts=30400
 pkt_pts=30720
 pkt_pts=31040
 pkt_pts=31360
-pkt_pts=31680|tag:lavfi.silence_end=1.98|tag:lavfi.silence_duration=0.7
+pkt_pts=31680|tag:lavfi.silence_end=1.98|tag:lavfi.silence_duration=0.8
 pkt_pts=32000
 pkt_pts=32320
 pkt_pts=32640
@@ -160,10 +160,10 @@ pkt_pts=50560
 pkt_pts=50880
 pkt_pts=51200
 pkt_pts=51520
-pkt_pts=51840
+pkt_pts=51840|tag:lavfi.silence_start=2.94
 pkt_pts=52160
 pkt_pts=52480
-pkt_pts=52800|tag:lavfi.silence_start=3.2
+pkt_pts=52800
 pkt_pts=53120
 pkt_pts=53440
 pkt_pts=53760
@@ -193,10 +193,10 @@ pkt_pts=61120
 pkt_pts=61440
 pkt_pts=61760
 pkt_pts=62080
-pkt_pts=62400|tag:lavfi.silence_end=3.9|tag:lavfi.silence_duration=0.7
+pkt_pts=62400
 pkt_pts=62720
 pkt_pts=63040
-pkt_pts=63360
+pkt_pts=63360|tag:lavfi.silence_end=3.96|tag:lavfi.silence_duration=1.02
 pkt_pts=63680
 pkt_pts=64000
 pkt_pts=64320
@@ -248,9 +248,9 @@ pkt_pts=78720
 pkt_pts=79040
 pkt_pts=79360
 pkt_pts=79680
-pkt_pts=80000|tag:lavfi.silence_start=4.9
+pkt_pts=80000
 pkt_pts=80320
-pkt_pts=80640
+pkt_pts=80640|tag:lavfi.silence_start=4.74
 pkt_pts=80960
 pkt_pts=81280
 pkt_pts=81600
@@ -270,7 +270,7 @@ pkt_pts=85760
 pkt_pts=86080
 pkt_pts=86400
 pkt_pts=86720
-pkt_pts=87040|tag:lavfi.silence_end=5.44|tag:lavfi.silence_duration=0.54
+pkt_pts=87040|tag:lavfi.silence_end=5.44|tag:lavfi.silence_duration=0.7
 pkt_pts=87360
 pkt_pts=87680
 pkt_pts=88000
@@ -325,8 +325,8 @@ pkt_pts=103360
 pkt_pts=103680
 pkt_pts=104000
 pkt_pts=104320
-pkt_pts=104640|tag:lavfi.silence_start=6.44
-pkt_pts=104960
+pkt_pts=104640
+pkt_pts=104960|tag:lavfi.silence_start=6.26
 pkt_pts=105280
 pkt_pts=105600
 pkt_pts=105920
@@ -361,8 +361,8 @@ pkt_pts=114880
 pkt_pts=115200
 pkt_pts=115520
 pkt_pts=115840
-pkt_pts=116160|tag:lavfi.silence_end=7.26|tag:lavfi.silence_duration=0.82
-pkt_pts=116480
+pkt_pts=116160
+pkt_pts=116480|tag:lavfi.silence_end=7.28|tag:lavfi.silence_duration=1.02
 pkt_pts=116800
 pkt_pts=117120
 pkt_pts=117440
@@ -425,19 +425,19 @@ pkt_pts=135360
 pkt_pts=135680
 pkt_pts=136000
 pkt_pts=136320
-pkt_pts=136640
+pkt_pts=136640|tag:lavfi.silence_start=8.24
 pkt_pts=136960
 pkt_pts=137280
-pkt_pts=137600|tag:lavfi.silence_start=8.5
+pkt_pts=137600
 pkt_pts=137920
 pkt_pts=138240
 pkt_pts=138560
-pkt_pts=138880|tag:lavfi.silence_end=8.68|tag:lavfi.silence_duration=0.18
+pkt_pts=138880
 pkt_pts=139200
 pkt_pts=139520
 pkt_pts=139840
 pkt_pts=140160
-pkt_pts=140480|tag:lavfi.silence_start=8.68
+pkt_pts=140480
 pkt_pts=140800
 pkt_pts=141120
 pkt_pts=141440
@@ -447,12 +447,12 @@ pkt_pts=142400
 pkt_pts=142720
 pkt_pts=143040
 pkt_pts=143360
-pkt_pts=143680|tag:lavfi.silence_end=8.98|tag:lavfi.silence_duration=0.3
+pkt_pts=143680
 pkt_pts=144000
 pkt_pts=144320
 pkt_pts=144640
 pkt_pts=144960
-pkt_pts=145280
+pkt_pts=145280|tag:lavfi.silence_end=9.08|tag:lavfi.silence_duration=0.84
 pkt_pts=145600
 pkt_pts=145920
 pkt_pts=146240
@@ -503,8 +503,8 @@ pkt_pts=160320
 pkt_pts=160640
 pkt_pts=160960
 pkt_pts=161280
-pkt_pts=161600|tag:lavfi.silence_start=10
-pkt_pts=161920
+pkt_pts=161600
+pkt_pts=161920|tag:lavfi.silence_start=9.82
 pkt_pts=162240
 pkt_pts=162560
 pkt_pts=162880
-- 
2.15.0



More information about the ffmpeg-devel mailing list