码迷,mamicode.com
首页 > 其他好文 > 详细

ffmpeg混音(将多个声音合成一个)命令

时间:2015-02-27 11:59:31      阅读:1616      评论:0      收藏:0      [点我收藏+]

标签:

最主要的就是使用使用amix的filter

官方文档: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. (default)

shortest

The duration of the shortest input.

first

The duration of the first input.

dropout_transition

The transition time, in seconds, for volume renormalization when an input stream ends. The default value is 2 seconds.


这个是把当前电脑播放的声音混音到前面的文件中的例子命令("audio="后面的改成自己实际的,ffmpeg -f dshow -list_devices 1 -i dummy可以win下获取):

ffmpeg233.exe -re -i 1234.mp4 -f dshow -i audio="立体声混音 (Realtek High Definition "  -filter_complex amix=inputs=2:duration=first:dropout_transition=0 -t 10 out.mp4 -y


ffmpeg混音(将多个声音合成一个)命令

标签:

原文地址:http://blog.csdn.net/langsim/article/details/43965055

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!