<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi,<div><br></div><div>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.</div><div><br></div><div><div><b>ffmpeg -i SonOfGod.mp4 -af "volumedetect[out];[out]silencedetect=noise=0.0001" -vn -f null -</b></div><div><br></div><div>[silencedetect @ 0x560151c2aa60] silence_start: -0.0030839<br></div><div>[silencedetect @ 0x560151c2aa60] silence_end: 7.08209 | silence_duration: 7.08517</div><div>size=N/A time=00:02:30.90 bitrate=N/A speed= 752x    </div><div>video:0kB audio:25996kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown</div><div>[Parsed_volumedetect_0 @ 0x560151b8c220] n_samples: 13309952</div><div>[Parsed_volumedetect_0 @ 0x560151b8c220] mean_volume: -18.4 dB</div><div>[Parsed_volumedetect_0 @ 0x560151b8c220] max_volume: -0.9 dB</div><div>[Parsed_volumedetect_0 @ 0x560151b8c220] histogram_0db: 4</div><div>[Parsed_volumedetect_0 @ 0x560151b8c220] histogram_1db: 282</div><div>[Parsed_volumedetect_0 @ 0x560151b8c220] histogram_2db: 3686</div><div>[Parsed_volumedetect_0 @ 0x560151b8c220] histogram_3db: 7464</div><div>[Parsed_volumedetect_0 @ 0x560151b8c220] histogram_4db: 14025</div></div><div><br></div><div>But if I use the same filter description (<b>"volumedetect[out];[out]silencedetect=noise=0.0001"</b>) in C API code , it produce below error.</div><div><br></div><div><div>[Parsed_silencedetect_1 @ 0x55667ecdbac0] Cannot select sample rate for the link between filters Parsed_silencedetect_1 and Parsed_silencedetect_1.</div><div>[Parsed_volumedetect_0 @ 0x55667ed87a00] n_samples: 0</div><div>Error occurred: Invalid argument</div></div><div><br></div><div>How do I resolve it.?</div><div><br></div><div>Regards,</div><div>Venkateswaran.S</div><div><br></div><div><br></div></div></div></div></div>