ffmpeg : split a video using silencedetect?

6

1

I need to know if ffmpeg is able to split video in several parts using silencedetect? I saw silencedetect used on mp3s to remove silences, but never on a video like blackdetect is.

Xavier C.

Posted 2015-06-23T14:41:21.217

Reputation: 193

Answers

1

You can use silencedetect with filter_complex. So you can select the required channels from the input video and get them through filters. Following is the FFmpeg command I'm suggesting.

ffmpeg -i input_video -filter_complex "[0:a]silencedetect=n=-50dB:d=1[outa]" -map [outa] test1.mp3

This will give you the corresponding silent time periods and you can use them again to split the video. [0:a] refers to the first input file and map will get the filtered audio output to the output file. Here you can find a good example for audio splitting. Same way here video splitting is described.

Hope this helps you!

Chamath

Posted 2015-06-23T14:41:21.217

Reputation: 412