06/08/31 04:26.49 無敵看板娘_07_060818.mpeg
===MENCODER_PASS1===
08/31 04:26.49
/usr/local/bin/mencoder /Users/USERNAME/Movies/無敵看板娘_07_060818.mpeg -nosound -ovc x264 -x264encopts \
threads=2:cabac:bitrate=1024:keyint=240:keyint_min=1:scenecut=55:bframes=2:b_adapt:weight_b:nob_pyramid:qp_min=10:qp_max=51:qp_step=4:qcomp=0.6:ratetol=4:deblock:deblockalpha=0:deblockbeta=0:cqm=jvt:nofast_pskip:direct_pred=3:psnr:\
pass=1:turbo=1 \
-passlogfile /Users/USERNAME/Movies/無敵看板娘_07_060818.264.log \
-vf pullup,softskip,pp=l5,crop=720:480:0:0,scale=640:480:::4,hqdn3d=4:3:6,harddup \
-sws 9 -ofps 24000/1001 -of rawvideo -o /dev/null
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities Altivec
x264 [info]: slice I:431 Avg QP:21.50 size: 29156 PSNR Mean Y:44.33 U:48.73 V:49.89 Avg:45.39 Global:44.89
x264 [info]: slice P:15580 Avg QP:23.42 size: 9033 PSNR Mean Y:42.33 U:46.72 V:48.11 Avg:43.43 Global:42.93
x264 [info]: slice B:19937 Avg QP:24.91 size: 2006 PSNR Mean Y:41.93 U:46.50 V:47.97 Avg:43.07 Global:42.71
x264 [info]: mb I I16..4: 41.6% 0.0% 58.4%
x264 [info]: mb P I16..4: 19.0% 0.0% 6.6% P16..4: 48.8% 9.0% 2.4% 0.0% 0.0% skip:14.3%
x264 [info]: mb B I16..4: 0.7% 0.0% 0.5% B16..8: 14.9% 0.0% 0.0% direct: 9.5% skip:74.5%
x264 [info]: final ratefactor: 21.59
x264 [info]: direct mvs spatial:96.8% temporal:3.2%
x264 [info]: SSIM Mean Y:0.9835922
x264 [info]: PSNR Mean Y:42.131 U:46.626 V:48.056 Avg:43.251 Global:42.826 kb/s:1031.35
Video stream: 1032.369 kbit/s (129046 B/s) size: 193488208 bytes 1499.373 secs 44937 frames
SEC ; 2969
TIME; 0:49.29
===MENCODER_PASS2===Avg QP(p)=22、Global PSNR=44、 数値的にはやや悪い。アニメなら20以下/45は欲しいところだが、他のアニメはぜんぜんその範囲に収まるのでこの素材固有の現象のようだ。実際、動きが 多い。
08/31 05:16.18
/usr/local/bin/mencoder /Users/USERNAME/Movies/無敵看板娘_07_060818.mpeg -nosound -ovc x264 -x264encopts \
threads=2:cabac:bitrate=1024:keyint=240:keyint_min=1:scenecut=55:bframes=2:b_adapt:weight_b:nob_pyramid:qp_min=10:qp_max=51:qp_step=4:qcomp=0.6:ratetol=4:deblock:deblockalpha=0:deblockbeta=0:cqm=jvt:nofast_pskip:direct_pred=3:psnr:\
pass=2:me=3:subq=7:frameref=4:mixed_refs:8x8dct:i8x8:8x8mv:b8x8mv:i4x4:4x4mv:trellis=2:brdo:bime \
-passlogfile /Users/USERNAME/Movies/無敵看板娘_07_060818.264.log \
-vf pullup,softskip,pp=l5,crop=720:480:0:0,scale=640:480:::4,hqdn3d=4:3:6,harddup \
-sws 9 -ofps 24000/1001 -of rawvideo -o /Users/USERNAME/Movies/無敵看板娘_07_060818.264
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities Altivec
x264 [info]: slice I:431 Avg QP:20.37 size: 29233 PSNR Mean Y:45.50 U:49.10 V:50.24 Avg:46.45 Global:45.90
x264 [info]: slice P:15580 Avg QP:22.18 size: 8822 PSNR Mean Y:43.38 U:46.93 V:48.29 Avg:44.35 Global:43.97
x264 [info]: slice B:19937 Avg QP:23.62 size: 2103 PSNR Mean Y:42.91 U:46.76 V:48.21 Avg:43.95 Global:43.65
x264 [info]: mb I I16..4: 7.5% 69.8% 22.7%
x264 [info]: mb P I16..4: 0.8% 6.7% 1.5% P16..4: 52.9% 12.8% 7.4% 0.3% 0.1% skip:17.4%
x264 [info]: mb B I16..4: 0.0% 0.2% 0.1% B16..8: 23.6% 1.4% 3.4% direct: 3.4% skip:67.8%
x264 [info]: 8x8 transform intra:72.6% inter:53.8%
x264 [info]: direct mvs spatial:91.1% temporal:8.9%
x264 [info]: ref P 70.5% 14.5% 10.1% 4.8%
x264 [info]: ref B 73.5% 14.8% 7.2% 4.6%
x264 [info]: SSIM Mean Y:0.9847882
x264 [info]: PSNR Mean Y:43.144 U:46.863 V:48.273 Avg:44.155 Global:43.809 kb/s:1024.32
Video stream: 1025.342 kbit/s (128167 B/s) size: 192171292 bytes 1499.373 secs 44937 frames
SEC ; 7946
TIME; 2:12.26
===FFMPEG_AUDIO===音声は別途ffmpegで。これはffmpegX版。
/usr/local/bin/ffmpeg -i /Users/USERNAME/Movies/無敵看板娘_07_060818.264 -i /Users/USERNAME/Movies/無敵看板娘_07_060818.mpeg -y -vn -f mp4 -acodec aac -ar 48000 -ac 2 -ab 64 -map 1.1:0.0 /Users/USERNAME/Movies/無敵看板娘_07_060818.aac.mp4
===MP4BOX_--mux===これもffmpegX版。
/usr/local/bin/mp4box -fps 23.976025 -add /Users/USERNAME/Movies/無敵看板娘_07_060818.264 -add /Users/USERNAME/Movies/無敵看板娘_07_060818.aac.mp4 -new /Users/USERNAME/Movies/無敵看板娘_07_060818.mp4
===MP4BOX_--info===映像と音声の持続時間が0.11sec異なる。1/23.976025=0.04170833155なので、トータルで2.6フレーム程度のズレがあ る。原因は、冒頭に挿入されるDelay frameの存在と思われる(AVI出力を想 定しているMEncoderにはそもそもtimestampの概念が無い。リンク先同様の手法でBフレームに対応していると思われる)。bframes=2だ し。
/usr/local/bin/mp4box -info /Users/USERNAME/Movies/無敵看板娘_07_060818.mp4
* Movie Info *
Timescale 600 - Duration 00:24:59.330
Fragmented File no - 2 track(s)
File Brand isom - version 1
File has root IOD
Scene PL 0xff - Graphics PL 0xff - OD PL 0xff
Visual PL: AVC/H264 Profile (0x15)
Audio PL: AAC Profile @ Level 2 (0x29)
No streams included in root OD
Track # 1 Info - TrackID 1 - TimeScale 24000 - Duration 00:24:59.331
Media Info: Language "und" - Type "vide" - Sub Type "avc1" - 35948 samples
MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
AVC/H264 Video - Visual Size 640 x 480
Self-synchronized
Track # 2 Info - TrackID 2 - TimeScale 48000 - Duration 00:24:59.221
Media Info: Language "und" - Type "soun" - Sub Type "mp4a" - 70276 samples
MPEG-4 Config: Audio Stream - ObjectTypeIndication 0x40
MPEG-4 Audio AAC LC - 2 Channel(s) - SampleRate 48000
Synchronized on stream 1
種 | タイトル | Hrs | FPS1 | FPS2 | FPS | I 枚数 | I比率 | Avg QP (P) | PSNR (Grobal) |
---|---|---|---|---|---|---|---|---|---|
R | 日本の話芸_へっつい幽霊_060820 | 4.95 | 10.37 | 4.26 | 3.02 | 230 | 0.43% | 20.96 | 45.09 |
A | ゼーガペイン_21_060824 | 2.83 | 15.16 | 5.77 | 4.18 | 441 | 1.04% | 18.74 | 47.19 |
A | ゼーガペイン_20_060817 | 2.82 | 15.19 | 5.78 | 4.19 | 490 | 1.15% | 19.37 | 46.79 |
A | エア・ギア_20_060823 | 3.00 | 14.93 | 5.54 | 4.04 | 402 | 0.92% | 20.79 | 45.55 |
A | 無敵看板娘_08_060825 | 2.91 | 15.21 | 5.92 | 4.26 | 431 | 0.97% | 22.47 | 43.79 |
A | 無敵看板娘_07_060818 | 3.03 | 15.14 | 5.66 | 4.12 | 431 | 0.96% | 22.18 | 43.81 |
A | まんが日本昔ばなし_34_060816 | 2.90 | 15.17 | 5.86 | 4.23 | 294 | 0.67% | 20.81 | 44.60 |
A | ケロロ軍曹_123_060818 | 2.98 | 15.16 | 5.69 | 4.14 | 361 | 0.81% | 18.19 | 47.00 |
平均 | 3.18 | 14.54 | 5.56 | 4.02 | 385 | 0.87% | 20.44 | 45.48 |
種 | タ イトル | Hrs | FPS1 | FPS2 | FPS | I枚数 | I比率 | Avg QP(P) | PSNR (Grobal) |
---|---|---|---|---|---|---|---|---|---|
A | ガイキング_34_060820 | 2.38 | 19.39 | 7.41 | 5.36 | 415 | 0.90% | 18.13 | 46.02 |
A | シムーン_21_新天地への扉_060822 | 2.31 | 19.24 | 7.42 | 5.35 | 367 | 0.82% | 17.27 | 46.53 |
A | NHK_07_モラトリアムにようこそ! | 2.37 | 18.80 | 6.91 | 5.05 | 374 | 0.87% | 18.17 | 46.24 |
A | ドットハックルーツ_20_060824 | 2.29 | 19.46 | 7.49 | 5.41 | 298 | 0.67% | 16.13 | 47.33 |
A | ドットハックルーツ_19_060817 | 2.27 | 19.54 | 7.57 | 5.45 | 290 | 0.65% | 15.90 | 47.22 |
平均 | 2.32 | 19.29 | 7.36 | 5.33 | 349 | 0.78% | 17.12 | 46.67 |
種 | タイトル | Hrs | FPS1 | FPS2 | FPS | I枚数 | I比率 | Avg QP (P) | PSNR (Grobal) |
---|---|---|---|---|---|---|---|---|---|
- | 平均 | 5.148 | 12.66 | 5.13 | 3.65 | 526 | 0.89% | 19.97 | 45.74 |
A | 無敵看板娘_FW_07 | 3.60 | 12.38 | 5.09 | 3.60 | 463 | 0.99% | 19.77 | 45.36 |
A | 無敵看板娘_FW_08 | 3.21 | 12.73 | 5.55 | 3.86 | 439 | 0.98% | 20.36 | 45.26 |
A | 無敵看板娘_FW_09 | 3.09 | 14.05 | 5.66 | 4.03 | 464 | 1.03% | 19.15 | 46.26 |
A | 無敵看板娘_FW_10 | 3.16 | 14.84 | 5.34 | 3.92 | 455 | 1.02% | 20.04 | 45.36 |
R | BSアニメ夜話_23_鋼の錬金術師 | 9.04 | 10.69 | 4.24 | 3.04 | 783 | 0.79% | 20.48 | 45.97 |
R | BSアニメ夜話番外編「アニメの時間よ永遠に」 | 8.78 | 11.31 | 4.89 | 3.41 | 553 | 0.51% | 20.02 | 46.24 |
種 | タイトル | Hrs | FPS1 | FPS2 | FPS | I枚数 | I比率 | Avg QP (P) | PSNR (Grobal) |
---|---|---|---|---|---|---|---|---|---|
- | 平均 | 2.460 | 18.69 | 6.89 | 5.03 | 386 | 0.87% | 14.21 | 49.47 |
A | コヨーテラグタイムショー_FW_07 | 2.45 | 17.87 | 6.94 | 5.00 | 432 | 0.98% | 15.14 | 48.71 |
A | コヨーテラグタイムショー_FW_08 | 2.52 | 18.18 | 6.62 | 4.85 | 347 | 0.79% | 14.33 | 49.13 |
A | コヨーテラグタイムショー_FW_09 | 2.43 | 18.60 | 6.89 | 5.03 | 380 | 0.86% | 14.32 | 49.37 |
A | コヨーテラグタイムショー_FW_10 | 2.65 | 17.63 | 6.26 | 4.62 | 403 | 0.91% | 15.10 | 48.96 |
A | コヨーテラグタイムショー_FW_11 | 2.43 | 18.75 | 6.89 | 5.04 | 427 | 0.97% | 14.12 | 49.75 |
A | ゼロの使い魔_FW_07 | 2.61 | 17.88 | 6.08 | 4.54 | 383 | 0.90% | 15.62 | 48.28 |
A | ゼロの使い魔_FW_09 | 2.37 | 19.51 | 6.82 | 5.06 | 367 | 0.85% | 14.63 | 48.86 |
A | ゼロの使い魔_FW_10 | 2.21 | 19.74 | 7.49 | 5.43 | 384 | 0.89% | 14.65 | 49.08 |
A | 僕等がいた_FW_07 | 2.42 | 19.06 | 7.49 | 5.37 | 416 | 0.89% | 13.01 | 50.40 |
A | 僕等がいた_FW_09 | 2.57 | 18.75 | 6.92 | 5.06 | 343 | 0.73% | 12.11 | 51.29 |
A | 僕等がいた_FW_10 | 2.41 | 19.59 | 7.42 | 5.38 | 362 | 0.77% | 13.24 | 50.31 |
#!/bin/bash
# Version 060917 charset="UTF-8",LF
#変数指定
##変数_ツールパス、出力拡張子指定
MENCODER=/usr/local/bin/mencoder
FFMPEG=/usr/local/bin/ffmpeg
MP4BOX=/usr/local/bin/mp4box
MUXMOVIE=/usr/local/bin/muxmovie
EXT=mp4
##変数_MEncoder Options --Video
EXTME=264
OPTSME_A="-nosound"
OPTSME_V="-ovc x264 -x264encopts threads=2:cabac:bitrate=1024:keyint=240:keyint_min=1:scenecut=55:bframes=2:b_adapt:weight_b:nob_pyramid:qp_min=10:qp_max=51:qp_step=4:qcomp=0.6:ratetol=4:deblock:deblockalpha=0:deblockbeta=0:cqm=jvt:nofast_pskip:direct_pred=3:psnr"
#:nodct_decimate
OPTSME_VP1=":pass=1:turbo=1"
OPTSME_VP2=":pass=2:me=3:subq=7:frameref=4:mixed_refs:8x8dct:i8x8:8x8mv:b8x8mv:i4x4:4x4mv:trellis=2:brdo:bime"
OPTSME_VF="-vf pullup,softskip,pp=l5,crop=720:480:0:0,scale=640:480:::4,hqdn3d=4:3:6,harddup"
OPTSME_OTHER2="-sws 9 -ofps 24000/1001 -of rawvideo"
##変数_ffmpeg Options --Audio
EXTFF=aac.mp4
OPTSFF="-y -vn -f mp4 -acodec aac -ar 48000 -ac 2 -ab 64 -map 1.1:0.0"
##変数_mp4box Options --mux
OPTSMP4BOX="-fps 23.976025"
##変数_muxmovie Options --Cutting Delay Frame
EXTMX=mov
OPTSMX="-startAt 00:00:00.05"
#for loop
for f in "$@"
do
foME="${f%.*}.${EXTME}"
foTEXT="${f%.*}.txt"
foTEXTLOG="${f%.*}.txt.log"
echo `date +%y/%m/%d" "%H:%M.%S` ${f##/*/} | tee ${foTEXT}
## MENCODER_PASS1
echo "===MENCODER_PASS1===" | tee -a ${foTEXT}
START_SEC=`date +%s`;echo `date +%m/%d" "%H:%M.%S` | tee -a ${foTEXT}
echo ${MENCODER} ${f} ${OPTSME_A} ${OPTSME_V}${OPTSME_VP1} -passlogfile ${foME}.log ${OPTSME_VF} ${OPTSME_OTHER2} -o /dev/null | tee -a ${foTEXT}
${MENCODER} ${f} ${OPTSME_A} ${OPTSME_V}${OPTSME_VP1} -passlogfile ${foME}.log ${OPTSME_VF} ${OPTSME_OTHER2} -o /dev/null >& ${foTEXTLOG}
### JIkan Keisan
echo " " | tee -a ${foTEXT};grep x264 ${foTEXTLOG} | tee -a ${foTEXT};echo " " | tee -a ${foTEXT};grep stream ${foTEXTLOG} | tee -a ${foTEXT};END_SEC=`date +%s`;TOTAL_SEC=`expr $END_SEC - $START_SEC`;HRS=`expr ${TOTAL_SEC} / 3600`;MIN=`expr ${TOTAL_SEC} % 3600 / 60`;SEC=`expr ${TOTAL_SEC} % 60`;TOTAL_TIME=${HRS}:${MIN}.${SEC};echo "SEC ; ${TOTAL_SEC}" | tee -a ${foTEXT};echo "TIME; ${TOTAL_TIME}" | tee -a ${foTEXT};echo " " | tee -a ${foTEXT}
## MENCODER_PASS2
echo "===MENCODER_PASS2===" | tee -a ${foTEXT}
START_SEC=`date +%s`;echo `date +%m/%d" "%H:%M.%S` | tee -a ${foTEXT}
echo ${MENCODER} ${f} ${OPTSME_A} ${OPTSME_V}${OPTSME_VP2} -passlogfile ${foME}.log ${OPTSME_VF} ${OPTSME_OTHER2} -o ${foME} | tee -a ${foTEXT}
${MENCODER} ${f} ${OPTSME_A} ${OPTSME_V}${OPTSME_VP2} -passlogfile ${foME}.log ${OPTSME_VF} ${OPTSME_OTHER2} -o ${foME} >& ${foTEXTLOG}
### JIkan Keisan
echo " " | tee -a ${foTEXT};grep x264 ${foTEXTLOG} | tee -a ${foTEXT};echo " " | tee -a ${foTEXT};grep stream ${foTEXTLOG} | tee -a ${foTEXT};END_SEC=`date +%s`;TOTAL_SEC=`expr $END_SEC - $START_SEC`;HRS=`expr ${TOTAL_SEC} / 3600`;MIN=`expr ${TOTAL_SEC} % 3600 / 60`;SEC=`expr ${TOTAL_SEC} % 60`;TOTAL_TIME=${HRS}:${MIN}.${SEC};echo "SEC ; ${TOTAL_SEC}" | tee -a ${foTEXT};echo "TIME; ${TOTAL_TIME}" | tee -a ${foTEXT};echo " " | tee -a ${foTEXT}
## FFMPEG_AUDIO
echo "===FFMPEG_AUDIO===" | tee -a ${foTEXT}
foFF="${f%.*}.${EXTFF}"
echo ${FFMPEG} -i ${foME} -i ${f} ${OPTSFF} ${foFF} | tee -a ${foTEXT}
${FFMPEG} -i ${foME} -i ${f} ${OPTSFF} ${foFF}
## MP4BOX_--mux
echo "===MP4BOX_--mux===" | tee -a ${foTEXT}
echo ${MP4BOX} ${OPTSMP4BOX} -add ${foME} -add ${foFF} -new ${f%.*}.${EXT} | tee -a ${foTEXT}
${MP4BOX} ${OPTSMP4BOX} -add ${foME} -add ${foFF} -new ${f%.*}.${EXT}
## MP4BOX_--info
echo "===MP4BOX_--info===" | tee -a ${foTEXT}
echo ${MP4BOX} -info ${f%.*}.${EXT} | tee -a ${foTEXT}
${MP4BOX} -info ${f%.*}.${EXT} | tee -a ${foTEXT}
## muxmomvie -- Cut Delay frame
#echo "===muxmomvie -- Cut Delay frame ===" | tee -a ${foTEXT}
#echo ${MUXMOVIE} ${OPTSMX} ${f%.*}.${EXT} -o ${f%.*}.${EXTMX} | tee -a ${foTEXT}
#${MUXMOVIE} ${OPTSMX} ${f%.*}.${EXT} -o ${f%.*}.${EXTMX} 2>> ${foTEXT}
## 中間生成物削除
rm ${foME}
rm ${foME}.log
rm ${foFF}
rm ${foTEXTLOG}
done
$ chmod a+x VGA243)ターミナルでVGA24、続いて素材ファイルをD&D。複数処理可。リターンで開始。例えば"VGA24"がデスクトップにある場合、
$ /Users/ユーザ名/Desktop/VGA24 ここにXXX.mpegをD&D リターン
最終更新 2005/07/12 -- TheSSIM Index for Image Quality Assessment試訳:
TheStructural SIMilarity (SSIM)index is a novel method for measuring the similarity between twoimages. TheSSIM index can be viewed as a quality measure of one of the imagesbeing compared, providedthe other image isregarded as of perfectquality. It is an improved version of the universalimage quality index proposed before. A brief description ofthemethod canbe found here.More details are given in the following paper:
--no-psnr Disable PSNR computationMEncoder -x264encoptsではなにもしなくてもログに出る(PSNRは明示的に指定しないと出ない)。
--no-ssim Disable SSIM computation
アニメ素材なら、ソースの解像度が720x480のときSSIMにして99~98%が狙える。主観でいえばオリジナルとの差が見分けられない。と表現している。
種 | タイトル | I枚数 | I比率 | Avg QP (P) | PSNR (Grobal) | SSIM |
---|---|---|---|---|---|---|
- | 平均 | 526 | 0.89% | 19.97 | 45.74 | 0.9903196 |
A | 無敵看板娘_FW_07 | 463 | 0.99% | 19.77 | 45.36 | 0.9901443 |
A | 無敵看板娘_FW_08 | 439 | 0.98% | 20.36 | 45.26 | 0.9892927 |
A | 無敵看板娘_FW_09 | 464 | 1.03% | 19.15 | 46.26 | 0.9909509 |
A | 無敵看板娘_FW_10 | 455 | 1.02% | 20.04 | 45.36 | 0.9899225 |
R | BSアニメ夜話_23_鋼の錬金術師 | 783 | 0.79% | 20.48 | 45.97 | 0.9903982 |
R | BSアニメ夜話番外編「アニメの時間よ永遠に」 | 553 | 0.51% | 20.02 | 46.24 | 0.9912088 |
種 | タイトル | I枚数 | I比率 | Avg QP (P) | PSNR (Grobal) | SSIM |
---|---|---|---|---|---|---|
- | 平均 | 386 | 0.87% | 14.21 | 49.47 | 0.9936473 |
A | コヨーテラグタイムショー_FW_07 | 432 | 0.98% | 15.14 | 48.71 | 0.9924971 |
A | コヨーテラグタイムショー_FW_08 | 347 | 0.79% | 14.33 | 49.13 | 0.9929892 |
A | コヨーテラグタイムショー_FW_09 | 380 | 0.86% | 14.32 | 49.37 | 0.9933534 |
A | コヨーテラグタイムショー_FW_10 | 403 | 0.91% | 15.10 | 48.96 | 0.9926276 |
A | コヨーテラグタイムショー_FW_11 | 427 | 0.97% | 14.12 | 49.75 | 0.9934556 |
A | ゼロの使い魔_FW_07 | 383 | 0.90% | 15.62 | 48.28 | 0.9926050 |
A | ゼロの使い魔_FW_09 | 367 | 0.85% | 14.63 | 48.86 | 0.9932632 |
A | ゼロの使い魔_FW_10 | 384 | 0.89% | 14.65 | 49.08 | 0.9936109 |
A | 僕等がいた_FW_07 | 416 | 0.89% | 13.01 | 50.40 | 0.9952227 |
A | 僕等がいた_FW_09 | 343 | 0.73% | 12.11 | 51.29 | 0.9954948 |
A | 僕等がいた_FW_10 | 362 | 0.77% | 13.24 | 50.31 | 0.9950015 |
x264 [info]: SSIM Mean Y:0.9880310
x264 [info]: PSNR Mean Y:44.499 U:48.195 V:49.478 Avg:45.514 Global:45.450 kb/s:1024.56
タイトル | I枚数 | I比率 | Avg QP (P) |
---|---|---|---|
VGAアニメ平均値 (無敵看板娘を除く33件) | 401 | 0.92% | 20.10 |
『無敵看板娘』平均 (02-12話) | 439 | 0.98% | 22.16 |
『国産ロケットはなぜ墜ちるのか』151p
理工系とひとくくりにされがちだが、理と工の差は、通常想像されるよりもはるかに大きい。理学は自然を理解する事を目的とする学問で、その基本には「妥協なき真理の追究」という態度がある。それに対して工学は、理解した自然の力を応用する学問であり、基本にあるのは「いかに高いレベルで妥協するか」という精神だ。
20061004:MyCometG3 概念の違い
QTの世界では、フレーム自体が表示位置と表示時間長の属性を持つのだけれども、libavcodecのAVFrameには表示位置の属性しかない。pts(Presentation Time Stamp)しかないんだ。
//
だから、頭から順番に再生している場合はいずれも問題ない。けれど後者の場合、フレームの終了時間という概念がないので、頭だしや切り貼りをする際に考え方が曖昧になる。この仕様上、逆転再生が困難なのも容易に理解できる。
===MENCODER_PASS1===
/usr/local/bin/mencoder /Users/USERNAME/Movies/1005/僕等がいた_13_060930.mpeg -nosound -ovc x264 -x264encopts threads=2:bitrate=1024:bframes=3:b_adapt:weight_b:b_pyramid:keyint=240:keyint_min=1:scenecut=55:qp_min=10:qp_max=51:qp_step=4:qcomp=0.6:ratetol=4:deblock:deblock=0,0:cqm=jvt:cabac:direct_pred=auto:nofast_pskip:nodct_decimate:nointerlaced:noglobal_header:psnr:ssim:pass=1:turbo=1 -passlogfile /Users/USERNAME/Movies/1005/僕等がいた_13_060930.264.log -vf pullup,softskip,pp=l5,crop=704:352:4:64,scale=640:352:::3,hqdn3d=4:3:6,harddup -sws 9 -zoom -ofps 24000/1001 -of rawvideo -o /dev/null
===MENCODER_PASS2===
/usr/local/bin/mencoder /Users/USERNAME/Movies/1005/僕等がいた_13_060930.mpeg -nosound -ovc x264 -x264encopts threads=2:bitrate=1024:bframes=3:b_adapt:weight_b:b_pyramid:keyint=240:keyint_min=1:scenecut=55:qp_min=10:qp_max=51:qp_step=4:qcomp=0.6:ratetol=4:deblock:deblock=0,0:cqm=jvt:cabac:direct_pred=auto:nofast_pskip:nodct_decimate:nointerlaced:noglobal_header:psnr:ssim:pass=2:me=umh:subq=7:frameref=4:mixed_refs:8x8dct:partitions=p8x8,b8x8,i8x8,i4x4:trellis=2:brdo:bime -passlogfile /Users/USERNAME/Movies/1005/僕等がいた_13_060930.264.log -vf pullup,softskip,pp=l5,crop=704:352:4:64,scale=640:352:::3,hqdn3d=4:3:6,harddup -sws 9 -zoom -ofps 24000/1001 -of rawvideo -o /Users/USERNAME/Movies/1005/僕等がいた_13_060930.264
オプション名 | default | Profile | メモ | |
---|---|---|---|---|
threads=2 | 1 | CPU数に 応じて指定。 | ||
bitrate=1024 | off | bitrate 指定 | ||
B | bframes=3 | 0 | MP | 最大Bフ
レーム数 ※Baselineにする際は0に。 |
b_adapt | on | 適応的Bフ レーム | ||
weight_b | ? | Bフレーム
の適応重み補間予測。要bframes=1以上。 b_adaptが強力であまり意味が無い。 |
||
b_pyramid | ? | 要bframes =2以上。Bの参照フレーム化 | ||
I | keyint=240 | 250 | IDRフ レーム最大間隔 | |
keyint_min=1 | 25 | IDRフ
レーム最小間隔 1にするとやたら増える。 |
||
scenecut=55 | 40 | Iフレーム 挿入頻度 | ||
レ | ト 制 御 |
qp_min=10 | 10 | 最小量子化 値 | |
qp_max=51 | 51 | 最大量子化 値 | ||
qp_step=4 | 2 | 連続したフ
レームの間でのquantizerの変動幅。画質の急激な変化を抑止。 4はMeGUI2.0ヘルプファイルの推奨値 |
||
qcomp=0.6 | 0.6 | 画質や bitrate変動幅の調整 | ||
ratetol=4 | 1.0 | 平均ビット
レートにおける変動幅の許容値。 低い値はビットレート変化抑止。ストリーミング対応度向上、複雑な場面への対応力低下。 高い値はビットレート変化促進。複雑な場面への対応力向上、ストリーミング信頼性低下。 4はMeGUI2.0ヘルプファイルの推奨範囲の内、最大。 |
||
イ ン ラ イ ン デ ブ ロ ック |
deblock | on | デブロック フィルタの可否 | |
deblock=0,0 | 0,0 | デブロック フィルタ強度 | ||
小 技 |
cqm=jvt | flat | HP | カスタム量 子化マトリクス。切る場合はcqm=flatが安全。 |
cabac | on | MP | 切る場合はnocabacが安全。 | |
direct_pred=auto | spatial | Bフレーム 中のダイレクト・マクロブロックに使われる動き予測のタイプ決定方式 | ||
nofast_pskip | on | Pフレーム
における速い段階でのスキップ検出。速度向上。 切るとディテイルの無いエリア、例えば空などにアーティファクトが出る事がある。 |
||
nodct_decimate | on | Pフレーム
中の若干のディテイル除去。 アニメ以外の素材を高ビットレートで圧縮する場合は効果あるかも。 |
||
他 | nointerlaced | ? | インタレ保 持を切っている。 | |
noglobal_header | off | PSPなど で必要。 | ||
指 標 |
psnr | off | 画質指標の 表示 | |
ssim | off | 新しい画質
指標の表示 ※特に表示変更は見当たらなかった。 |
オプション名 | default | Profile | メモ | |
---|---|---|---|---|
pass=1 | パス指定 | |||
turbo=1 | 1st用高
速化用のプリセット設定。 ログを見ると上記共通項目の中にも効かなくなるものがあるようだ。 |
オプション名 | default | Profile | メモ | |
---|---|---|---|---|
pass=2 | パス指定 | |||
※1 | me=umh | hex | フルピクセルの動き補償アルゴリズム選択。 最大のesaは鬼のように低速。 |
|
subq=7 | 5 | subpel精製品質。7で最大。 | ||
※2 | frameref=4 | 1 | 直前よりも前のフレームを参照フレームに使う。その最大距離。 最大15。実写では6程度を境に効果急減。 |
|
mixed_refs | ? | 8x8、16x8 motion partitionが、独自に参照フレームを選べるようにする。 | ||
サ ブ マ ク ロ ブ ロ ッ ク |
8x8dct | ? | HP | 切る場合はno8x8dctが安全。 |
partitions=p8x8,b8x8,i8x8,i4x4 | 同左 | HP | オプショナルなマクロブロック・タイプの指定。 MPの場合、no8x8dctと共にi8x8も削除。 |
|
※3 | trellis=2 | 1 | レート歪み最適化(RDO)の量子化。意味不明。低速、要subq=6以上。 | |
brdo | ? | Bフレームのマクロブロックタイプにレート歪み最適化。要subq=6以上。 | ||
bime | ? | 双方向(予 測)マクロブロックで使われる2つのモーションベクトルの精密化。要Bフレーム。 |
x264 [info]: using SAR=44/45
x264 [info]: using cpu capabilities Altivec
x264 [info]: slice I:384 Avg QP:16.36 size: 21913 PSNR Mean Y:48.56 U:52.30 V:53.52 Avg:49.55 Global:49.19
x264 [info]: slice P:12378 Avg QP:18.03 size: 9563 PSNR Mean Y:46.15 U:50.67 V:52.13 Avg:47.26 Global:46.90
x264 [info]: slice B:24275 Avg QP:19.60 size: 2923 PSNR Mean Y:45.25 U:50.35 V:51.89 Avg:46.43 Global:46.09
x264 [info]: mb I I16..4: 8.1% 75.4% 16.5%
x264 [info]: mb P I16..4: 0.5% 5.9% 0.8% P16..4: 60.2% 19.0% 8.3% 0.0% 0.0% skip: 5.2%
x264 [info]: mb B I16..4: 0.0% 0.0% 0.0% B16..8: 26.1% 1.7% 3.9% direct: 5.9% skip:62.4%
x264 [info]: 8x8 transform intra:79.2% inter:44.3%
x264 [info]: direct mvs spatial:95.7% temporal:4.3%
x264 [info]: ref P 57.2% 22.4% 11.8% 8.7%
x264 [info]: ref B 71.6% 18.2% 6.1% 4.1%
x264 [info]: SSIM Mean Y:0.9835919
x264 [info]: PSNR Mean Y:45.584 U:50.475 V:51.990 Avg:46.741 Global:46.367 kb/s:1024.09
Video stream: 1025.113 kbit/s (128139 B/s) size: 197948402 bytes 1544.793 secs 46298 frames
SEC ; 7119
TIME; 1:58.39
Loren Merritt氏の見解を表にしてみた。
SSIM値 | qp設定値(※) | |
---|---|---|
0.98 以上 | 20 | オリジナルと区別がつかない。 |
0.95 | 30 | 見るに耐えない。(*または辛うじて、そこそこ見られる*) |
0.9 | 40 | 非常に醜い。 |
0.8 | 51 | これ以上は圧縮できない |
0.7以下 | - | 素材に大量のノイズを加え、さらにそのノイズを量子化工程で消し去るほどqpを高くしない限り、達成困難。 |
※おそらく、qpを使った1パスABRと思はれる。
x264 と JM (10.2) の画質を比較する際に、自分は PSNR を使っていた。 自分の理解では、JM は実際の動きやテクスチャのディテイルの再現よりは、PSNRの向上を追求したものに思える。 x264も同じ方向性だろうか? また、画質の定義として、他に産業界で一般的な数値指標はないだろうか?というのは、PSNRはミスリードを起こす事があるからだ。なにかヒントか、コメントが欲しい。 |
While comparing x264 with JM (10.2) I had been using PSNR for comparing the qualities of the two encoders. I understand JM is an encoder designed to achieve better PSNR rather than track true motion, or increase texture detail. I was wondering if x264 was based on a similar theory? Also, what other metrics are usually being used in the industry to define video quality, since PSNR can be misleading at times. Any pointers/comments? Thanks Axel |
x264 はエンコードの SSIM を表示できる。これはより正確とされている: http://en.wikipedia.org/wiki/SSIM SSIM(From Wikipedia, the free encyclopedia) Guillaume -- 喧嘩することの無い人々の協調関係というものは、最大の国家連合からタウンミーティングや教区会に至るまで、これまでに存在した事が無い。 -- トマス・ジェファーソン (MPlayer ML におけるフレーミングについてインタビューを受けた際に) http://www.brainyquote.com/quotes/quotes/t/thomasjeff157207.html |
x264 can give the SSIM of the encode, which is supposed to be less missleading: http://en.wikipedia.org/wiki/SSIM Guillaume -- An association of men who will not quarrel with one another is a thing which has never yet existed, from the greatest confederacy of nations down to a town meeting or a vestry. -- Thomas Jefferson (when interviewed about MPlayer ML flamewars) http://www.brainyquote.com/quotes/quotes/t/thomasjeff157207.html |
こ んにちは Axel。 Guilliame が書いた通り、x264は SSIM と PSNRを算出できる。 ほとんどの場合、私はSSIMを使う事を奨める。SSIM は非常に良い指標だ。 そしておそらく、PSNRよりも早く、かつ正確なものとしては唯一だ。 単に非常に良い指標では満足できず、天下無双の指標を求めているならば、そしてまた各種指標の比較を知りたいならば、VQEG FR-TV Phase I および Phase II リポートが役立つかも知れない: http://www.its.bldrdoc.gov/vqeg/projects/frtv_phaseI/COM-80E_final_report.pdf上記のテストでは、最強の画質指標は NTIA (ANSI T1.801.03-2003, ITU BT.1683)だ。SSIM はほぼこれに対等。面白い事に、おおくの有名な指標、例えば JND (Tektronix/Sarnoff)や、DVQ (Watson/NASA) 、そして PDM(EPFL) などは、どれもY-PSNRだけを使った場合とほぼ同等か、より悪い(!)。 PSNRについて: シーンカットの無いシークエンスを、同じアルゴリズム(*この場合ほぼコデックと同義か*)で、設定を変えてエンコードした場合、視覚的にはPSNRの しかしながら、PSNRにはいくつか欠点がある。 1)PSNRの値そのものにはなんの意味も無い。例えば、PSNRが40のエンコード結果とオリジナル素材が二組あった場合、片方が素材同等に見える一方 で、もう片方は汚いアーティファクトが出ている、といった事があり得る。これは素材の長さとアルゴリズムのタイプに依存する。これは、大きな違いのあるア ルゴリズムを比べる際には、PSNRは使えないという事だ。また、PSNRを元にシーンカットを跨がるbit配分を行うのは無意味という事でもある。 2)本質的には目に見える事の無いアーティファクトの中に、PSNRに大きく影響するものがある(例えば、Y軸を均等にスケーリングしたり、各ピクセルに 少量のガウシアンノイズを加えてみて欲しい)。その一方で、PSNRに非常に低い影響しか持たないが、非常に目に留まり易いアーティファクトというものも ある(例えばブロッキング)。 SSIMはこれらの問題を、相当程度に緩和する。SSIMは動画/静止画の画質指標としては*ベストではない*が、 高速に算出できるものとしてはベストだ。SSIMの絶対値比較は妥当と言える。非常におおまかなガイドとしては、0.7以下は見るに耐えない。(*または 辛うじて、そこそこ見られる*)。0.8-0.85は多少の目に見える映像の歪みが出るが、大方の人にとってはOK。0.9以上はオリジナルと区別がつか ない。 注意して欲しいのは、x264のSSIMは"ほんとうの"SSIMアルゴリズムのあるべき姿とは別の方式で算出されている事だ。windowingも、 luma maskingも、motion maskingも無い。算出しているのは、sample of all possible positionsだけだ。しかしながら、多くの場合、"ほんとうのSSIM"の数パーセントは表している。そして概ね100倍くらいは早く算出できる。 ここで"多くの場合"とは、普通の長さ(*natural footage*)という意味だ。 可能性としては(*不詳*) があり得る。 しかしそうしたケースに遭遇する事は極めて稀だろう。もし本当のSSIMが欲しければ、私にそういうコードを書くように五月蝿く騒ぎ立ててくれ。;) |
Hello Axel, As Guilliame wrote, x264 can calculate SSIM as well as PSNR. I recommend using that for most work. SSIM is a very good metric, and probably the only one that is both fast and better than PSNR. If you are looking for the absolute best metric as opposed to a merely very good metric, and also for how to compare metrics, you may wish to read the VQEG FR-TV Phase I and Phase II reports: http://www.its.bldrdoc.gov/vqeg/projects/frtv_phaseI/COM-80E_final_report.pdf In those tests, the best metric is NTIA (ANSI T1.801.03-2003, ITU BT.1683). SSIM also does quite well. Interestingly, many well-known metrics such as JND (Tektronix/Sarnoff), DVQ (Watson/NASA) and PDM (EPFL) are either about the same, or worse than, using just Y-PSNR (!). About PSNR: if you encode the same continuous (no scenecuts) sequence with the same algorithm with several different settings, the version with the lower PSNR is almost always visually better. Thus PSNR does a reasonably good job of allowing you to optimise codec parameters that you can vary during an encode (like RDO or rate control). However, PSNR fails on several counts: 1) The absolute value of PSNR means nothing. In other words, looking at two pairs of original/encoded images both with PSNR of 40 (for example), one pair may look identical and the other may have gross artifacts. It all depends on the source footage and on the type of algorithm. This means that PSNR is useless for comparing significantly different algorithms. It also means that using PSNR to allocate bits accross scenecuts will result in bad decisions. 2) Some artifacts which are essentially invisible have a huge PSNR impact (try scaling Y uniformly or adding a small amount of gaussian noise to each pixel for example). Other things which are extremely visible have an unreasonably low PSNR impact (like blocking). SSIM fixes these problems to a significant degree. It is not *the best* video/image quality metric, but it is the best that can be computed quickly. SSIM absolute values can be reasonably compared: as a very rough guide, below 0.7 is barely watchable, 0.8-0.85 has some visible distortion but ok for most people, and 0.9 and higher are indistinguishable from the original. Please note that SSIM in x264 is not calculated the way that the "real" SSIM algorithm (and papers) say it should be. There is no windowing, no luma masking, no motion masking, and only a sample of all possible positions are calculated. However, it is within few percent of the "real" SSIM in most cases, while being about a hundred times faster to calculate. "Most cases" here pretty much means any natural footage; it may be possible to construct synthetic footage so as to defeat the approximations used, but you are extremely unlikely to ever encounter such. If you want real SSIM, bug me to release my code for that ;) Regards, --Alex |
PSNRについて:^^^^^ 高い程、 PSNRはエンコードの過程で変化するコデックのパラメータ(RDOやレートコントロール)を最適化す る上では まぁまぁ役に立つ。本当に?自分の意見では、 SSIM=0.98+ (qp=20) はオリジナルと区別がつかない。 SSIM=0.95 (qp=30) は見るに耐えない。(*または辛うじて、そこそこ見られる*) SSIM=0.9 (qp=40) は非常に醜い。 そしてこれ以上は圧縮できないレベル (qp=51) ですら SSIM=0.8となる。 手許では、素材に大量のノイズを付け加え、そのノイズを量子化工程で消し去るほどqpを高くしない限り、SSIMが0.7 以下となる映像は生成出来ていない。 PSNRでもSSIMでも、指標の絶対値は、圧縮後のストリームにどれだけのqualityが残っているかを示すというよりは、素材にあるノイズの量を示 すものだ。 しかしながらおそらく、同じノイズを持っていると想定される場合、映画の中の異なった場面を比較する上ではSSIMの方が上だろう。 --Loren Merritt |
On Thu, 30 Nov 2006, Alex Izvorski wrote: About PSNR: if you encode the same continuous (no scenecuts) sequence^^^^^ higher reasonably good job of allowing you to optimise codec parameters that Really? imo, SSIM=0.98+ (qp=20) is indistinguishable from the original, SSIM=0.95 (qp=30) is barely watchable, SSIM=0.9 (qp=40) is really ugly, and there could be nothing left of the content (qp=51) and still produce SSIM=0.8. I failed to generate any videos with SSIM<0.7 except by adding tons of noise to the source and then setting qp high enough that all the noise is quantized away. With both PSNR and SSIM, the absolute value of the metric is more a measure of how much noise was in the source than it is of how much quality is left in the compressed stream. Though perhaps SSIM does better at comparing difference scenes within one movie, when they can be assumed to have the same noise. --Loren Merritt |
x264 のモード決定や動き予測の過程でSSIMを使う方法はある? |
Is there a way of using SSIM in the mode decision and ME process of x264? Thanks, Gene |
x264 の土台部分には無い。しかし、 http://akuvian.org/src/x264/x264_ssim_map.00.diff このパッチの名前からすると、smthがなんかしてるんぢゃないかと思う。 Guillaume -- 喧嘩することの無い人々の協調関係というものは、最大の国家連合からタウンミーティングや教区会に至るまで、これまでに存在した事が無い。 -- トマス・ジェファーソン (MPlayer ML におけるフレーミングについてインタビューを受けた際に) http://www.brainyquote.com/quotes/quotes/t/thomasjeff157207.html |
Not natively with vanilla x264, but the name of this patch http://akuvian.org/src/x264/x264_ssim_map.00.diff makes me think that smth is in the works. Guillaume -- An association of men who will not quarrel with one another is a thing which has never yet existed, from the greatest confederacy of nations down to a town meeting or a vestry. -- Thomas Jefferson (when interviewed about MPlayer ML flamewars) http://www.brainyquote.com/quotes/quotes/t/thomasjeff157207.html |
2007/11/01追記:x264cli svn-680に準拠した本記事のアップデートがこちらにあります。
MeGUI | x264cli | MEncoder | 常用値 (MEncoder) |
|
---|---|---|---|---|
![]() |
Deblocking: デコード中のインループ・デブロッキング・フィルタを使用。指定範囲は二つとも -6 から 6の範囲。Deblocking strength はデブロック強度、 Deblocking Threshold はデブロックをかける映像の量を指定する。 | --no-deblock -f, --deblock <alpha:beta> |
(no)deblock deblock=<-6-6>,<-6-6> |
deblock(使用) 0,0 |
Enable PSNR
calculation:
このボックスをチェックすると、x264 はログに PSNR情報をジョブの終了後に書き出す。若干遅くなる。 |
--no-psnr | (no)psnr | psnr(使用) | |
Number of
threads:
マルチコア・システムを持っている場合に、この値を増やしてそのメリットを活かす。複数のフレームを同時に処理できる。マルチスレッド化に伴う画質劣化は
取るに足りない。推奨値は 0。これで x264
はCPUのコア数を検知して最適なスレッド数を使う。このオプションを使うには、MeGUI settingsの Automatically
set
number of threads をdisableにすること。 |
--threads <integer> | threads=<1-16> | 1st,2 2nd,16 参考 |
|
fourCC: AVI
などのコンテナがコデック判定に使う4CCの指定。 |
対応なし | 対応なし | 非使用 | |
AVC profiles:
この設定は、AVCの特定プロファイルに沿った設定をする際の助けとなる。選択されたプロファイルを超えるオプションが指定できなくなる。 |
対応なし | 対応なし | 参考 | |
AVC Level: 特定のAVCレベルに沿ったエンコードをしたい場合に使う。 選択されたレベルでは使えないオプションを指定出来なくするようにはしないので、ツールメニューの "Validate AVC level" でチェックする事。 | --level <string> | level_idc=<10-51> | 参考 |
MeGUI | x264cli | MEncoder | 常用値(MEncoder) | |
---|---|---|---|---|
![]() |
Zones:
Zoneの使い方はこのドキュメントの目的を超えるが、ここでzoneの定義と適用する
Quantizer または重み付けを指定する。 |
--zones | zones | 非使用 |
Custom Commandline Options: x264(cli)の追加コマンドを使いたい場合はここに入力する。x264(cli)に新しい機能が追加されたが、MeGUI のアップデートがまだの際などに使う。 |
MeGUI | x264cli | MEncoder | 常用値 (MEncoder) |
|
---|---|---|---|---|
![]() |
VBV Buffer Size: VBV Bufferの最大サイズ | --vbv-bufsize <integer> | vbv_bufsize=<value> (ABR or two pass) |
未指定(default) |
VBV Maximum Bitrate: Video Buffer Verifierの最大ローカルビットレート | --vbv-maxrate <integer> | vbv_maxrate=<value> (ABR or two pass) |
未指定(default) | |
VBV Initial
Size: VBV bufferのイニシャル占有率。 1.0 = full, 0.0 = empty。 |
--vbv-init <float> | vbv_init=<0.0-1.0> (ABR or two pass) |
未指定(default) | |
Bitrate Variance:
ビットレートの変動範囲。 1.0 = pure VBR, 0.0 = pure CBR |
--ratetol <float> | ratetol=<0.1-100.0> (ABR or two pass) |
4。 番組ごとに地味にサイズが変わる。 |
|
Quantizer
Compression: quantizerの変動範囲。 1.0 = pure CQ, 0.0 = maximum change |
--qcomp <float>か? | qcomp=<0-1> か? (ABR or two pass) |
未指定(default) | |
Temp. Blur
of est. Frame complexity: curve compression(*不詳*)の前にquantizer curveに適用する時間軸ブラーのレベル。時間軸ブラーは量子化程度の一貫性をもたらす。この値を増やすと、映像は真のCQに近づく。 (*適用量子化値の急激な変動を多少滑らかにするものか*) |
--cplxblur <float> | cplx_blur=<0-999> (two pass only) |
未指定(default) | |
Temp. Blur
of Quant after CC: curve compression(*不詳*)の後でquantizer curveに適用する時間軸ブラーのレベル。この値を増やすと、映像はCQに近づく。 |
--qblur <float> | qblur=<0-99> (two pass only) |
未指定(default) | |
Chroma ME:
動き予測の際に、彩度情報も動きの検出に使う |
--no-chroma-me | (no)chroma_me | chroma_me(使用) 要、subq>=5 |
|
ME Range: 動き予測機構が使
う最大捜索範囲(マクロブロックの中で) |
--merange <integer> | me_range=<4-64> | 1st,16 2nd,32 実用範囲16-32程度 |
|
Scene Change Sensitivity:
シーンチェンジと看做すフレーム間の変更をパーセンテージで指定。範囲0-100。-1はシーンチェンジ検出なし。 |
--scenecut <integer> | scenecut=<-1-100> | 実写40(default) アニメ65 |
|
ME Algorithm: 動き予測
に使うサーチアルゴリズムの選択。Exhaustiveはピクセル単位となり、凄まじく遅い。 |
--me <string> | me=<name> | 1st,(turbo) 2nd,umh |
|
Subpixel refinement:
サブピクセル予測に使うアルゴリズムとパーティション決定に使う方式の選択。RDO (Rate Distortion Optimisation)
を選ぶとBフレームにRDOを使う。 |
-m, --subme <integer> | subq=<1-7> | 1st,(turbo) 2nd,7 |
|
Keyframe Interval:
I-frames間の最大間隔 |
I, --keyint <integer> | keyint=<value> | 240または300 | |
Min GOP size: I-frames 間の最小間隔 | -i, --min-keyint <integer> | keyint_min=<1-keyint/2> | 実写,24または30 アニメ1 |
|
Noise reduction: プ リプロセス・ノイズリダクション。0 = disabled。 | --nr <integer> | nr=<0-100000> | 非使用 |
MeGUI | x264cli | MEncoder | 常用値 (MEncoder) |
|
---|---|---|---|---|
![]() |
Quantizers | |||
Minimum Quantizer: x264が使う最大量子化値 | --qpmin <integer> | qp_min=<1-51> (ABR or two pass) |
10 | |
Maximum Quantizer: x264が使う最小量子化値 | --qpmax <integer> | qp_max=<1-51> (ABR or two pass) |
51 | |
Maximum Quantizer Delta: 連続フレーム間における量子化値の最大変動幅 | --qpstep <integer> | qp_step=<1-50> (ABR or two pass) |
実写4 アニメ8 |
|
Credits Quantizer: For use if you set the credit starting point in the preview window. | 不詳 | 不詳 | 不詳 | |
Factor Between I and P frame Quants: IフレームとPフレームの量子化値換算 係数。Iに適用された平均量子化値にここの値を掛けたものがPに適用される。 | --ipratio <float> | ip_factor=<value> | 未指定(default) | |
Factor between P and B frame Quants: P フレームとBフレームの量子化値換算係数。Pに適用された平均量子化値にここの値を掛けたものがBに適用される。 | --pbratio <float> | pb_factor=<value> | 未指定(default) | |
Chroma QP Offset: 輝度に適用する量子化値と彩度に適用する量子化値のオフセット。 | --chroma-qp-offset <integer> | chroma_qp_offset=<-12-12> | 未指定(default) | |
Quant Options | ||||
Trellis: Trellis RDO の適用。最終マクロブロックのみか、常時かを選択。要CABAC | -t, --trellis <integer> | trellis=<0-2> | 2 要CABAC |
|
Number of Reference Frames: 複数参照フレームの最大数。 |
-r, --ref <integer> | frameref=<1-16> | 1st,(turbo) 2nd,4 |
|
Mixed: マクロブロック・パーティション単位で参照フレームを個別に選べるようにする。 |
--mixed-refs | (no)mixed_refs | mixed_refs (使用) |
|
CABAC: 圧縮効率の高い encoding stream syntaxを使う。 | --no-cabac | (no)cabac | cabac(使用) | |
No DCT Decimation: | --no-dct-decimate | (no)dct_decimate | nodct_decimate (非使用) |
|
No Fast P-Skip: スキップ検出の非使用。画質向上 |
--no-fast-pskip | (no)fast_pskip | nofast_pskip (非使用) |
|
Quantization matrix: 使用するカ
スタム量子化マトリクスを指定。You must specify the custom matrix. (*mustの意味不明*) |
--cqm <string> --cqmfile <string> |
cqm=<flat|jvt|<filename>> | JVT | |
Macroblock Options: 各 マクロブロックパーティションの使用可否 | -A, --partitions <string> | partitions=<list> | 1st,(turbo) 2nd,all |
|
B-Frames: | ||||
Number of B-Frames: B-Frames (B-VOPs)の最大連続数 | -b, --bframes <integer> | bframes=<0-16> | 3 | |
Adaptive B-Frames: B-Frames の連続枚数を映像内容に応じて自動調節。 | --no-b-adapt | (no)b_adapt | b_adapt (使用) |
|
B-Pyramid: B-Frames も参照フレームに使う | --b-pyramid | (no)b_pyramid | b_pyramid (使用) |
|
RDO for B-Frames: B-Frames にRDOアルゴリズムを使う | --b-rdo | (no)brdo | brdo(使用) 要subq=6以上 |
|
Weighted Bi-Prediction: B-frames を参照フレームに使うかどうかの精度が高まる | -w, --weightb | (no)weight_b | weight_b (使用) |
|
Bidirection ME: 動き予測の精度最適化に前後両方向の時間軸を使う。 |
--bime | bime | bime (使用) |
|
B-Frame Mode: B-Framesのモーションベクトル予測方式。Autoでフレーム毎に最適な方式を選ぶ。 |
--direct <string> | direct_pred=<name> | auto | |
B-Frame bias: B-Framesの挿入傾向を調整。高い程Bを使う傾向が増える。低い程減る。 |
--b-bias <integer> | b_bias=<-100-100> | 未指定(default) |
※補足
svn co svn://svn.videolan.org/x264/trunk x264x264 のAPIに変更があれば、MPlayerのソースコードも変更されます。ですからMPlayerも常にSVN版を使うのが良いで しょう。おそらくこの状況は x264が「リリース」されたら変わると思います。それまでの間、x264は極めて「unstable」と考えるべきでしょう。というのは、プログラミン グ・インタフェイスが変更の対象になっているからです(*参考記事:MEncoderの-x264encopts、大規模改訂*)。
./configure && make && sudo make installこれで libx264.a が /usr/local/lib に、そして x264.h が /usr/local/includeにインストールされます。
./configure && make && sudo make installこれでMEncoderのconfigure スクリプトがx264を自動検出するハズです。
PPC Mac関連 | 高速化 |
rev | date | 投稿者 | 概要 | メモ |
---|---|---|---|---|
620 | 01/21 | pengvado | tweak
block_residual_write_cavlc. up to 1% faster lossless, no difference at normal bitrates.
|
最
大1%高速化。一般的なbitrateでは差はない。 *cavlcだしな。 |
621 | 01/25 | gpoirier | Fix build
issues on Linux. Only gcc-4.x is supported, as on OSX. Cleans up a few inconsistencies in the code too.
|
Linux/OS
Xのビルド上の問題を改善。 gcc-4.xしかサポートしない。 |
623 | 02/22 | pengvado | ooops,
scenecut detection failed to activate when using threads and not using
B-frames
|
ありゃ、 threadを使うとシーンカット検出にしくじってた。Bも使えなくなってた。 |
624 | 02/28 | aizvorski | add ability to generate doxygen documentation; make dox
|
doxygenドキュメントを生成できるようにした。 *少しアプリケーションとしての体裁 が整った? |
627 | 03/03 | gpoirier | compile fix for
GCC-3.3 on OSX, based on a patch by Patrice Bensoussan % patrice P bensoussan A free P fr% Note: regression test still do not pass with GCC-3.3, but they never did as far as I can remember.
|
OSXのGCC
-3.3でのビルド上の問題を改善。 *regression testってなんだろうな。文法エラーかなんかか。 |
629 | 03/14 | sam |
|
AltiVec最適化関連??? |
630 | 03/14 | sam |
|
AltiVec最適化関連??? |
632 | 03/14 | sam |
|
AltiVec最適化関連??? |
633 | 03/14 | sam |
|
AltiVec最適化関連??? |
637 | 04/02 | xtophe | Compile fix
|
PPC の動き補償関連のビルド修正 |
638 | 04/03 | pengvado | in hpel search,
merge two 16x16 mc calls into one 16x17. 15% faster
hpel, .3% overall.
|
1/2ピクセル精度動き補償を15%
高
速化、全体としては3%。 *確かハーフペル精度ってsubq=3でしか使ってなかったような。 |
641 | 04/04 | pengvado | when encoding with a cqm, probe_skip now also uses the cqm,
instead of
the flat matrix
|
cqm
使用時にprobe_skipもcqmを使うようにした。これまではflatだった。 *フレーム単位でぱたぱたと動く闇階調ブロックノイズに効果があるかも。 |
642 | 04/04 | pengvado | 2x faster quant.
2% overall. side effects: not bit-identical to the previous algorithm. while the new algorithm covers a wider range of cqms than the previous one did, I couldn't find a good way to fallback to a general version for the extreme cqms. so now it refuses to encode extreme cqms instead of just being slower. lays a framework for custom deadzone matrices, though I didn't add an api.
|
量子化を2倍に
高速化。全体としては2%。 過去のアルゴリズムにくらべるとbitレベルで等価では無いが、より幅広いcqmをカバー。 ぶっ とんだcqmをどう扱うのが良いか解らなかったので、そういうものは低速化する代わりに拒絶するようにした。 APIはつけてないが、 カスタムデッドゾーンマトリクスのフレームワークを内蔵している。 *cqmをお使いの方はご注意を。 |
645 | 04/05 | pengvado | x264 H.264/AVC encoder Rev.645参照。 x86 上でのビルド絡みと推測。 |