Skip to content

Instantly share code, notes, and snippets.

@shhider
Last active August 9, 2019 03:15
Show Gist options
  • Save shhider/510fe14e78017e141e0cdce013fd05e2 to your computer and use it in GitHub Desktop.
Save shhider/510fe14e78017e141e0cdce013fd05e2 to your computer and use it in GitHub Desktop.
[ffmpeg 常用功能记录] #ffmpeg

convert image format

ffmpeg -i input.jpg output.gif

convert audio format

ffmpeg -i input.mp3 -acodec copy output.aac

concat audios

将要合并的文件设置到文件:

# mylist.txt
# 默认情况下是要填写相对目录下文件名,而不是路径
# 如果必须是路径,后面执行的时候要加 safe 选项
file 'file1.mp3'
file 'file2.mp3'

然后执行:

ffmpeg -f concat -i mylist.txt -c copy output.mp3

Reference:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment