$ ffmpeg
ffmpeg version 0.8.10-4:0.8.10-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers
built on Feb 6 2014 20:56:59 with gcc 4.6.3
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'
$
去查了一下,原來 ffmpeg 這個專案出現了分支叫做 avconv,然後幫 Debian 和 Ubuntu 包 ffmpeg package 的維護者們跟 avconv 的開發者是同一群人,於是 Debian 和 Ubuntu 目前都是建議使用 abconv 了。
大略用了一下,其實參數都差不多,所以大部分人應該都可以無痛轉移。
安裝
- sudo apt-get install libavcodec-extra-53 libav-tools x264
使用
範例
$ avconv -i input.mkv -vcodec libx264 -crf 23 -preset slow -profile:v baseline -acodec copy -strict experimental -scodec copy output.mkv
參數
-crf (Constant Rate Factor)可選 0-51, 0 是無損,51是最差。預設值 23。通常調教合理的範圍是 18-28。18 是人眼不太容易看出差異,但仍然是有損的。
-present
present 代表包含編碼速度以及壓縮率的一組設定。詳細對應的參數可以使用 x264 --fullhelp 查看。
可用的參數:ultrafast, superfast, veryfast, faster, fast, medium (套入預設的設定), slow, slower, veryslow, placebo
-profile (裝置的相容性)
iOS Compatability (source) | |||
---|---|---|---|
Profile | Level | Devices | Options |
Baseline | 3.0 | All devices | -profile:v baseline -level 3.0 |
Baseline | 3.1 | iPhone 3G and later, iPod touch 2nd generation and later | -profile:v baseline -level 3.1 |
Main | 3.1 | iPad (all versions), Apple TV 2 and later, iPhone 4 and later | -profile:v main -level 3.1 |
Main | 4.0 | Apple TV 3 and later, iPad 2 and later, iPhone 4S and later | -profile:v main -level 4.0 |
High | 4.0 | Apple TV 3 and later, iPad 2 and later, iPhone 4S and later | -profile:v high -level 4.0 |
High | 4.1 | iPad 2 and later and iPhone 4S and later | -profile:v high -level 4.1 |
求助
查看 x264 可使用的參數解釋- x264 --fullhelp