[Libav-user] Cannot select sample rate for the link between filters

Venkateswaran.S venketeswaran2015 at gmail.com
Sun Mar 10 14:31:35 EET 2019


Hi,

I'm trying to use both silence and volume detect filters in a filter chain.
It works fine if I run through the ffmpeg command line tool as bellow.

*ffmpeg -i SonOfGod.mp4 -af
"volumedetect[out];[out]silencedetect=noise=0.0001" -vn -f null -*

[silencedetect @ 0x560151c2aa60] silence_start: -0.0030839
[silencedetect @ 0x560151c2aa60] silence_end: 7.08209 | silence_duration:
7.08517
size=N/A time=00:02:30.90 bitrate=N/A speed= 752x
video:0kB audio:25996kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
[Parsed_volumedetect_0 @ 0x560151b8c220] n_samples: 13309952
[Parsed_volumedetect_0 @ 0x560151b8c220] mean_volume: -18.4 dB
[Parsed_volumedetect_0 @ 0x560151b8c220] max_volume: -0.9 dB
[Parsed_volumedetect_0 @ 0x560151b8c220] histogram_0db: 4
[Parsed_volumedetect_0 @ 0x560151b8c220] histogram_1db: 282
[Parsed_volumedetect_0 @ 0x560151b8c220] histogram_2db: 3686
[Parsed_volumedetect_0 @ 0x560151b8c220] histogram_3db: 7464
[Parsed_volumedetect_0 @ 0x560151b8c220] histogram_4db: 14025

But if I use the same filter description (
*"volumedetect[out];[out]silencedetect=noise=0.0001"*) in C API code , it
produce below error.

[Parsed_silencedetect_1 @ 0x55667ecdbac0] Cannot select sample rate for the
link between filters Parsed_silencedetect_1 and Parsed_silencedetect_1.
[Parsed_volumedetect_0 @ 0x55667ed87a00] n_samples: 0
Error occurred: Invalid argument

How do I resolve it.?

Regards,
Venkateswaran.S
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20190310/3755cca4/attachment.html>


More information about the Libav-user mailing list