使用 ffmpeg 将音频文件的指定部分静音 [英] Mute specified sections of an audio file using ffmpeg

查看:111
本文介绍了使用 ffmpeg 将音频文件的指定部分静音的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 JSON 文件,其中包含我想在给定音频文件中静音的区域.如何处理音频文件以将所列部分之间的文件静音?

I have a JSON file containing regions that I want to mute in a given audio file. How can I process the audio file to mute the file between the listed sections?

推荐答案

以下命令将静音两个部分:介于 5-10 秒和 15-20 秒之间:

The following command will mute two sections: between 5-10s and 15-20s:

ffmpeg -i video.mp4 -af "volume=enable='between(t,5,10)':volume=0, volume=enable='between(t,15,20)':volume=0" ...


说明:


Description:

-af 是音频过滤器.它通过指定在指定时间启用/禁用的多个卷过滤器来工作.volume=enable='between(t,5,10)':volume=0 表示使用在 5 到 10 秒之间启用并将音量设置为 0 的音量过滤器.

-af is the audio filter. It works by specifying multiple volume filters that are enabled/disabled at the specified time. volume=enable='between(t,5,10)':volume=0 means use a volume filter that gets enabled between 5 and 10 seconds and sets the volume to 0.

这篇关于使用 ffmpeg 将音频文件的指定部分静音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆