ffmpeg常用命令

ffmpeg常用命令

把当前目录下的所有m4a文件转成mp3

for foo in *.m4a; do ffmpeg -i "$foo" -acodec libmp3lame -aq 2 "${foo%.m4a}.mp3"; done

压缩视频

ffmpeg -i /Users/bruce/Downloads/sample.mp4  -vcodec libx264 -preset fast -crf 28 -y -vf "scale=640:-1"  a.mp4

scale=640:-1 表示等比例缩放,宽缩放为640,高为-1表示自动根据比例缩放。


任何格式转h.264 mp4格式

ffmpeg -i IMG_1310.MOV -vcodec libx264 -y IMG_1310.mp4
打赏
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x

扫码在手机查看
iPhone请用自带相机扫
安卓用UC/QQ浏览器扫

ffmpeg常用命令