FFMPEG命令记录

2019-12-18 23:26:00

1、拼接两个音频

方法1:

ffmpeg -i "concat:1.mp3|2.mp3" -c copy 4.mp3

如果是android调用命令的话,不需要双引号:ffmpeg -i concat:1.mp3|2.mp3 -c copy 4.mp3

方法2:

ffmpeg -f concat -i file.txt -c copy output.wav

file.txt文本的内容:

file '1.mp3'
file '2.mp3'

2、剪切音频片段

ffmpeg -ss 00:01:00 -t 00:00:30 -i huangwu.mp3 2.mp3

3、多个音频混音

两个:

ffmpeg -i 1.mp3 -i 2.mp3 -filter_complex amix=inputs=2:duration=first:dropout_transition=2  12.mp3

三个:

ffmpeg -i 1.mp3 -i 2.mp3 -i 3.mp3 -filter_complex amix=inputs=3:duration=first:dropout_transition=3  123.mp3

4、剪切一段MP4并转换成gif

ffmpeg -ss 0 -t 4 -i menu.mp4 -s 360*640 -f gif -r 1 bb.gif

5、改变音量大小

ffmpeg -i input.wav -af volume=-3dB output.wav

6、音频淡入淡出

博客:http://www.mamicode.com/info-detail-1208970.html

ffmpeg -i 12.mp3 -filter afade=t=in:ss=5:d=3 tttt111t.wav //从5秒开始淡入3秒,淡入开始前都是最低音量

ffmpeg -i 12.mp3 -filter afade=t=out:st=5.3:d=5 danchu.mp3//5.3秒开始淡出5秒,淡出后面变成静音,无论是否已经完成

6、音频格式处理

ffmpeg -i 13.aac -filter aformat=sample_fmts=s16 -filter aresample=44100 8888.mp3//强制16位  44100

其他常用命令

http://www.cnblogs.com/wainiwann/p/4128154.html


  • 2017-04-12 10:52:35

    最全面的Android Webview详解

    现在很多App里都内置了Web网页(Hyprid App),比如说很多电商平台,淘宝、京东、聚划算等等,如下图

  • 2017-04-12 11:22:43

    WebView你真的熟悉吗?看了才知道

    在Android手机中内置了一款高性能webkit内核浏览器,在SDK中封装为一个叫做WebView组件。下面总结一下使用webview遇到的那些事、那些坑。

  • 2017-04-12 11:28:14

    史上最全webview详解

    WebView在现在的项目中使用的频率应该还是非常高的。 我个人总觉得HTML5是一种趋势。找了一些东西,在此总结。 本篇最后有一个非常不错 的 Html5Activity 加载类,不想看的可以直接跳下载。

  • 2017-04-12 23:11:59

    Android Studio签名打包的两种方式

    给我们自己开发的app签名,就代表着我自己的版权,以后要进行升级,也必须要使用相同的签名才行。签名就代表着自己的身份(即keystore),多个app可以使用同一个签名。

  • 2017-04-13 10:57:08

    webstorm 怎么关闭jshint

    You need to configure the inspections in Settings/Editor/Inspections, then in the list on the right, find JavaScript/JavaScript validity issues. That worked for me to remove the Chai warnings. (I am using the WebStorm 11 EAP at the moment.)

  • 2017-04-13 14:11:14

    MySQL中的describe关键字

    今天写代码的时候,有一个类的数据始终不能插入,老是提示在You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'describe, picPath1, picPath2, picPath3, picPath4, picPath5, agentId, belongStore' at line 1。因为用的是SSH进行插入,所以SQL语句不用自己写,检查了每个字段也没写错。