Java实现混音 音频合成_ffmpeg混音(将多个声音合成一个)命令

本文介绍了如何使用ffmpeg的amix过滤器将多个音频输入混合成一个输出。通过设置inputs参数指定输入数量,duration参数决定输出长度,dropout_transition参数设定音量重新归一化的过渡时间。示例中,将一个MP4文件的音频与电脑的立体声混音设备音频混合,并创建一个10秒的输出文件。
摘要由CSDN通过智能技术生成

ffmpeg命令中可以使用filter amix实现这个功能。

官方文档

http://ffmpeg.org/ffmpeg-filters.html

6.8 amix

Mixes multiple audio inputs into a single output.

Note that this filter only supports float samples (the amerge and pan audio filters support many formats). If the amix input has integer samples then aresample will be automatically inserted to perform the conversion to float samples.

For example

ffmpeg -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex amix=inputs=3:duration=first:dropout_transition=3 OUTPUT

will mix 3 input audio streams to a single output with the same duration as the first input and a dropout transition time of 3 seconds.

It accepts the following parameters:

inputs

The number of inputs. If unspecified, it defaults to 2.

duration

How to determine the end-of-stream.

longest

The duration of the longest input.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值