- 追加された行はこの色です。
- 削除された行はこの色です。
#contents
「-r 23.98 -hq -g 60 -s 320x180 -padtop 30 -padbottom 30 -vcodec mpeg4 -qscale 3 -acodec aac -ac 2 -ar 24000 -ab 32
*FFMPEG USAGE [#x8bbb5ec]
少しずつ日本語化してます。ご協力をお願いします。
詳しい方、どんな効果があるとかオプションの引数の型とか付け足してくれるとありがたいです。
参考資料:[[ffmpeg Documentation:http://www.mplayerhq.hu/~michael/ffmpeg-doxy/index.html]]
利用可能なフォーマット、コーデック、プロトコル &ref(format.txt);(-formats の出力ママです)
使い方: ffmpeg [[infile options] -i infile]... {[outfile options] outfile}...
**メインオプション [#main]
:-L |ライセンスを表示
:-h |ヘルプを表示
:-version |バージョンを表示
:-formats |利用可能なフォーマット、コーデック、プロトコルを表示 &ref(format.txt);
:-f <fmt> |強制的にfmtで指定したフォーマットを適用する
:-img <img_fmt> |強制的にimg_fmtで指定したイメージフォーマットを適用する
:-i <filename> |インプットファイル名を指定する
:-y |同名ファイルがあった場合アウトプットファイルを上書きする
:-t <duration> |変換する時間(長さ)を指定する(hh:mm:ss.ms 又は、s)
:-fs <limit_size> |ファイルサイズを制限する
:-ss <time_off> |変換開始時間をセットする(hh:mm:ss.ms 又は、s)
:-itsoffset <time_off> |インプットファイルのオフセットを指定する(±hh:mm:ss.ms 又は、±s)
:-title <string> |タイトルをセットする
:-timestamp <time> |タイムスタンプをセットする
:-author <string> |著作者名
:-copyright <string> |著作権表示
:-comment <string> |コメント
:-v <verbose> |ログの量をコントロール(?)バーボーズモード
:-target <type> |ターゲットのファイルタイプを指定 ("vcd", "svcd", "dvd", "dv", "pal-vcd", "ntsc-svcd", ...)
:-dframes <number> |変換するフレーム数を指定する
:-hq |ハイクオリティセッティングを有効にする
**ビデオオプション [#video]
&aname(b);
:-b <bitrate> |ビデオビットレートの設定 (kbit/秒) &br;Default=200
-- [[-qscale>#qscale]] を指定すると無視されます。
:-vframes <number> |変換するビデオフレーム数
:-r <rate> |フレームレートの設定(fps、値、小数部または簡略名) &br;Default=25
:-s <size> |フレームサイズの設定(WxHか簡略名)
:-aspect <aspect> |アスペクト比の設定(4:3、16:9、または1.3333、1.7777)
&aname(fixaspect);
:-fixaspect |固定アスペクト比(変換君では元ソースのピクセル数比(←注意!)を固定しつつ足りない時は余白を追加)
:-vn |ビデオなし
&aname(bt);
:-bt <tolerance> |set video bitrate tolerance (in kbit/s)
-- [[-qscale>#qscale]] を指定すると無視されます。
:-maxrate <bitrate> |最大ビデオビットレートの設定 (kbit/秒)
:-minrate <bitrate> |最小ビデオビットレートの設定 (kbit/秒)
:-bufsize <size> |set ratecontrol buffer size (in kByte)
:-vcodec <codec> |ビデオコーデックを指定 &br;Default=copy
:-sameq |ソースと同じクオリティで変換
-- ソースが VBR の場合は、暗黙に VBR となります。
:-pass <n> |2passのとき1pass目か2pass目かを指定(1 or 2)
:-passlogfile <file> |2passのときログファイル名を指定
*** crop オプション [#crop]
- 数値は''必ず偶数で指定する''、奇数の場合はエラーが出ます。
- ''-s'' の前に入れればトリミング出来る。 &br;画面キャプチャし、縦横比固定でトリミングすれば数値を求められるが、キャプチャした画像が元ソースと同じピクセル数でないと誤差が起きるので注意!
:-croptop <size> |上部からピクセル単位でカット
:-cropbottom <size> |下部からピクセル単位でカット
:-cropleft <size> |左端からピクセル単位でカット
:-cropright <size> |右端からピクセル単位でカット
*** pad オプション [#pad]
- 数値は''必ず偶数で指定する''、奇数の場合はエラーが出ます。
- [[-fixaspect>#fixaspect]] が上手く機能しない時はコレで補完すると良い。
-- 例:-s 176x144 → -s 176x132 -padtop 6 -padbottom 6 (元ソースが720x480とか)
:-padtop <size> |上部からピクセル単位で余白追加
:-padbottom <size> |下部からピクセル単位で余白追加
:-padleft <size> |左端からピクセル単位で余白追加
:-padright <size> |右端からピクセル単位で余白追加
:-padcolor <color> |余白の色指定 (Hex 000000 thru FFFFFF)
**高度なビデオオプション [#advance_video]
:-pix_fmt <format> |ピクセルフォーマットの設定
&aname(g);
:-g <gop_size> |set the group of picture size:Default = 12
-- 0 で動き予測を無効にする。[[-intra>#intra]] を指定したことになります。
-- 特に思うところがなければ使用しません
&aname(intra);
:-intra |Iフレームのみを利用する。
-- 動き予測を無効にする
-- 変換速度は速くなるが、画像の品質は下がる(同じ品質の場合はファイルサイズが大きくなる)
&aname(qscale);
:-qscale <q> |動画全体の量子化係数を固定する:Default = 0 (VBR)
-- ''0'' で無効
-- 品質固定で符号化します。
-- [[-b>#b]] [[-bt>#bt]] オプションが無効になります。
-- [[-qmin>#qmin]] [[-qmax>#qmax]] オプションが無効になります。
-- ビットレートは不定になるので携帯端末用の動画作成では今ひとつ使い勝手が良くありません。 &br;再生制限が比較的ゆるい PSP や プレイやん などで使用します。
&aname(qmin);
:-qmin <q> |動画全体の量子化係数の最小値を設定する:Default = 2 (VBR)
&aname(qmax);
:-qmax <q> |動画全体の量子化係数の最大値を設定する:Default = 31(VBR)
:-lmin <lambda> |min video lagrange factor (VBR)
:-lmax <lambda> |max video lagrange factor (VBR)
:-mblmin <q> |マクロブロックの量子化係数の最小値を設定する:Default = 2 (VBR)
-- 特に思うところがなければ使用しません
:-mblmax <q> |マクロブロックの量子化係数の最大値を設定する:Default = 31(VBR)
-- 特に思うところがなければ使用しません
:-qdiff <q> |フレーム間の量子化係数の最大差を設定する:Default = 3(VBR)
-- 特に思うところがなければ使用しません
:-qblur <blur> |量子化計数が変化した際の変化時間を設定する:Default = 0.5(VBR)
-- 0.0 - 1.0 秒で設定する
-- 特に思うところがなければ使用しません
:-qsquish <squish> |2-pass エンコードで [[-qmin>#qmin]] [[-qmax>#qmax]] の数値をどのように扱うか設定する:Default = 0(VBR)
-- 0 = [[-qmin>#qmin]] [[-qmax>#qmax]] を保持 &br; 1 = 別な機能を使う
--- 未検証、どなたか試した結果を教えてください。
-- 特に思うところがなければ使用しません
:-qcomp <compression> |量子化係数が hard & easy に変化した際の変化時間を設定する:Default = 0.5(VBR)
-- 0.0 - 1.0 秒で設定する
-- 特に思うところがなければ使用しません
// 原文:amount of qscale change between easy & hard scenes (0.0-1.0)
// すまん、巧く説明できないw
:-rc_init_cplx <complexity> |initial complexity for 1-pass encoding
:-b_qfactor <factor> |qp factor between p and b frames
:-i_qfactor <factor> |qp factor between p and i frames
:-b_qoffset <offset> |qp offset between p and b frames
:-i_qoffset <offset> |qp offset between p and i frames
:-ibias <bias> |intra quant bias
:-pbias <bias> |inter quant bias
:-rc_eq <equation> |set rate control equation
:-rc_override <override> |rate control override for specific intervals
:-me <method> |動き予測の手法を設定する
:-dct_algo <algo> |set dct algo
:-idct_algo <algo> |set idct algo
:-me_threshold <threshold> |motion estimaton threshold
:-mb_threshold <threshold> |macroblock threshold
:-er <n> |set error resilience
:-ec <bit_mask> |set error concealment
:-bf <frames> |Bフレームを利用する。参照するフレーム数(1〜8)
-- 数字が大きいほど変換速度は遅くなるが画像の品質は上がる(同じ品質の場合はファイルサイズが小さくなる)
-- 対応していない携帯端末があるので注意
:-mbd <mode> |マクロブロックのモードを決定
-- 0 = FF_MB_DECISION_SIMPLE:内部変数 mb_cmp を使用します &br;1 = FF_MB_DECISION_BITS:必要に応じて最小ビットを選びます &br;2 = FF_MB_DECISION_RD:レートの歪曲収差から割り当てる
--default = 0
:-mbcmp <cmp function> |macroblock compare function
:-ildctcmp <cmp function> |ildct compare function
:-subcmp <cmp function> |subpel compare function
:-cmp <cmp function> |fullpel compare function
:-precmp <cmp function> |pre motion estimation compare function
:-preme |pre motion estimation
:-lelim <elim> |single coefficient elimination threshold for luminance (negative values also consider DC coefficient)
:-celim <elim> |single coefficient elimination threshold for chrominance (negative values also consider DC coefficient)
:-lumi_mask |luminance masking
:-dark_mask |darkness masking
:-scplx_mask |spatial complexity masking
:-tcplx_mask |temporal complexity masking
:-p_mask |inter masking
:-4mv |マクロブロック毎に four motion vector を利用する。(MPEG4)
-- 変換速度は遅くなるが画像の品質は上がる(同じ品質の場合はファイルサイズが小さくなる)
:-obmc |use overlapped block motion compensation (h263+)
:-lf |use loop filter (h263+)
:-part |data partitioning を使用する (MPEG4)
-- 携帯動画では使用しません
-- -ps オプションと組み合わせて使用します
:-bug <param> |workaround not auto detected encoder bugs
:-strict <strictness> |how strictly to follow the standards
:-deinterlace |インタレースの解除
--本来のデータを間引くことになるので使用には注意が必要
:-ildct |force interlaced dct support in encoder (MPEG2/MPEG4)
:-ilme |force interlaced me support in encoder (MPEG2/MPEG4)
:-psnr |処理したフレームに対して PSNR を計算する
-- Peak Signal to Noise Ratio:ピーク信号対ノイズ比
-- 携帯動画変換君では使用しません。
:-vstats |エンコード情報をファイルに出力
:-vhook <module> |insert video processing module
:-aic |enable Advanced intra coding (h263+)
:-aiv |enable Alternative inter vlc (h263+)
:-umv |enable Unlimited Motion Vector (h263+)
:-ssm |enable Slice Structured mode (h263+)
:-alt |enable alternate scantable (MPEG2/MPEG4)
:-qprd |
:-cbp |
:-trell |格子量子化を有効にする。
--変換速度は遅くなるが画像の品質は上がる(同じ品質の場合はファイルサイズが小さくなる)。
:-mv0 |try to encode each MB with MV=<0,0> and choose the better one (has no effect if mbd=0)
:-naq |normalize adaptive quantization
:-cgop |closed gop
:-sgop |strict gop
:-noout |skip bitstream encoding
:-scan_offset |enable SVCD Scan Offset placeholder
:-qpel |1/4画素精度(クォーターペル精度)動き補償を有効にする。
-- 変換速度は遅くなるが画像の品質は上がる(同じ品質の場合はファイルサイズが小さくなる)。
-- 対応していない携帯端末が多い
:-intra_matrix <matrix> |specify intra matrix coeffs
:-inter_matrix <matrix> |specify inter matrix coeffs
:-top <n> |top=1/bottom=0/auto=-1 field first
:-nr |ノイズリダクション(性能は不明)
:-qns |量子化ノイズ(A/D,D/A変換ノイズ)をシャープに
:-sc_threshold <threshold> |シーンチェンジ検出精度(詳細不明) threshold(スレッショルド)=閾値
:-me_range <range> |limit motion vectors range (1023 for DivX player)
:-dc <precision> |intra_dc_precision
:-coder |coder type
:-context |context model
:-pred |prediction method
:-vprofile |profile
:-vlevel |level
:-nssew |weight
:-subq |
:-lowres |
:-vtag <fourcc/tag> |ビデオのfourcc/tag(コーデックなどで決められている4文字の名前みたいなもの)を強制する。
-- 中身とタグがちがってると再生できなくなるので通常はいじらないが吉
:-skip_threshold <threshold> |フレームスキップの閾値
:-skip_factor <factor> |frame skip factor
:-skip_exp <exponent> |frame skip exponent
:-skip_cmp <compare function> |frame skip compare function
**オーディオオプション [#audio]
:-aframes <number> |変換するオーディオフレーム数
:-ab <bitrate> |チャンネル毎のオーディオビットレート (in kbit/s)
:-ar <rate> |サンプリング周波数 (in Hz)
:-ac <channels> |オーディオチャンネル数
:-an |オーディオなし
:-acodec <codec> |オーディオコーデックを指定 (変換なしのときは'copy')
:-vol <volume> |ボリューム調整 (100=通常)
**高度なオーディオオプション [#advance_audio]
:-atag <fourcc/tag> |オーディオ部分のfourcc/tagを書き換える。例えば-atag samrとすると中身aacでもamr_nbのタグになり再生機器をごまかせる可能性がある。ほとんどの場合中身とタグが違うと再生できなくなると思う。
**オーディオ・ビデオの外部入力オプション [#grab]
- 携帯動画変換君では使用しません。
:-vd <device> |set video grab device
:-vc <channel> |set video grab channel (DV1394 only)
:-tvstd <standard> |set television standard (NTSC, PAL (SECAM))
:-ad <device> |set audio device
:-grab <format> |request grabbing using
:-gd <device> |set grab device
**高度なオプション [#advance]
:-map <file:stream> |set input stream mapping
:-map_meta_data <outfile:infile> |set meta data information of outfile from infile
:-debug |print specific debug info
:-vismv |motion vector を視覚化する(デバッグ用)
--1:visualize forward predicted MVs of P frames &br;2:visualize forward predicted MVs of B frames &br;4:visualize backward predicted MVs of B frames
:-benchmark |add timings for benchmarking
:-dump |dump each input packet
:-hex |when dumping packets, also dump the payload
:-bitexact |only use bit exact algorithms (for codec testing)
:-re |read input at native frame rate
:-loop |loop (current only works with images)
:-threads <count> |thread count
:-vsync <int> |ビデオ同期方法(引数:整数。これを使ってるのみたことない)
:-async <int> |オーディオ同期方法(引数:整数。1とか1000とかがよく使われる模様)
:-copyts |copy timestamps
:-shortest |finish encoding within shortest input
:-ps <size> |パケットのサイズをbit単位で指定する。
:-error <rate> |指定したパケット毎にエラーを発生させる(通常は使用しません)
:-muxrate <rate> |set mux rate
:-packetsize <size> |パケットのサイズを指定する(mux)
:-muxdelay <seconds> |set the maximum demux-decode delay
:-muxpreload <seconds> |set the initial demux-decode delay
:-muxab <bitrate> |mux tag にあるオーディオのビットレート値を書き換える (in kbit/s)
:-muxvb <bitrate> |mux tag にあるビデオのビットレート値を書き換える(in kbit/s)
----
*コメント [#comment]
-いろんなオプションが日本語化されていて、さらに解説までついていて、とってもありがたいです -- &new{2005-07-28 (木) 14:37:05};
-個人的には各オプション(またはオプションの種類)ごとにページを分けて、 &br;mpeg4,XviDで使えるか、各端末での再生状況、を集積したら良いと思う。 -- &new{2005-07-28 (木) 17:58:20};
-どこにオプションを入れればいいかを書いてくれるとありがたいです。 -- &new{2005-07-29 (金) 13:20:04};
#comment