2006年01月27日

2006年1月末のエンコード設定

【概要】MEncoder(x264 rawvideo),ffmpeg(aac.mp4),mp4box(mux)
使用ツール
  • ソフト
  • その他
    • Power Mac G5 2Ghz dual, mem1GB, Mac OSX 10.4.4, QuickTime7.0.4

速度(2パス合計)
16:9アニメ24000/1001fps 合計(sec) Fps
Fate/stay night#03_開幕 8089 4.30
ガイキング#09_明日に向って撃て! 8128 4.50
よみがえる空 -RESCUE WINGS-#03_苦しい仕事 7911 4.32
ソルティレイ#13_distance 7567 4.45
ノエイン もうひとりの君へ#14_キオク 8289 4.37
平均 7996.8(2:13:16.8) 4.39
4:3アニメ24000/1001fps
ケロロ軍曹#93_夏美潜入!秘密基地/日向秋たぶん宇宙最強の女 10242 3.42
タクティカルロア#03_微笑と素顔 10655 3.40
MAJOR 2nd season#06_スカウトの陰謀 10108 3.56
怪〜ayakashi〜 Japanese Classic Horror#02_四谷怪談(2) 10470 3.13
舞-乙HiME#15_アリカ、泣く。 9664 3.56
平均 10227.8(2:50:27.8) 3.41
4:3実写30000/1001fps
日本の話 芸「講談」宝井琴梅 6150(1:42:30) 8.77
設定(例)
ffmpegX0.0.9u版では使えないオプションがあり得る。
brdo,bime,mixed_refs,trellisあたりが怪しい。書かなくても良いオプションも、デフォルト値を弄りたくなった時の為に書いて ある。
===MENCODER_PASS1===
mencoder VIS24a_Fate03.mpeg -nosound -ovc x264 -x264encopts
threads=2:bitrate=1024:qp_min=10:qp_max=51:b_adapt:bframes=2:keyint=240:scenecut=45:cabac:deblock:direct_pred=2\
:qp_step=4:qcomp=0.6:psnr\
:pass=1:me=2:subq=2:frameref=1:no8x8dct:noi8x8:no8x8mv:nob8x8mv:noi4x4:no4x4mv \
-passlogfile VIS24a_Fate03.264.log \
-vf pullup,softskip,crop=704:352:8:64,scale=640:352,hqdn3d=4:3:6,pp=l5,harddup
-sws 9 -ofps 24000/1001 -of rawvideo -o /dev/null

===MENCODER_PASS2===
mencoder VIS24a_Fate03.mpeg -nosound -ovc x264 -x264encopts
threads=2:bitrate=1024:qp_min=10:qp_max=51:b_adapt:bframes=2:keyint=240:scenecut=45:cabac:deblock:direct_pred=2\
:qp_step=4:qcomp=0.6:psnr\
:pass=2:me=3:subq=6:frameref=4:i4x4:4x4mv:weight_b:trellis=1:ratetol=4\
:mixed_refs:brdo:bime:deblockalpha=0:deblockbeta=0 \
-passlogfile VIS24a_Fate03.264.log \
-vf pullup,softskip,crop=704:352:8:64,scale=640:352,hqdn3d=4:3:6,pp=l5,harddup
-sws 9 -ofps 24000/1001 -of rawvideo -o VIS24a_Fate03.264
スクリプト(例)
使い方は
$ スクリプト名 素材1.mpeg [素材2.mpeg,素材3.mpeg,,,] return

#!/bin/bash
# Version 060123 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:bitrate=1024:qp_min=10:qp_max=51:b_adapt:bframes=2:keyint=240:scenecut=45:cabac:deblock:direct_pred=2:qp_step=4:qcomp=0.6:psnr"
OPTSME_VP1=":pass=1:me=2:subq=2:frameref=1:no8x8dct:noi8x8:no8x8mv:nob8x8mv:noi4x4:no4x4mv"
OPTSME_VP2=":pass=2:me=3:subq=6:frameref=4:i4x4:4x4mv:weight_b:trellis=1:ratetol=4:mixed_refs:brdo:bime:deblockalpha=0:deblockbeta=0"
OPTSME_VF="-vf pullup,softskip,crop=704:352:8:64,scale=640:352,hqdn3d=4:3:6,pp=l5,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.976"

#変数_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}

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}

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}

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}

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}

echo "===MP4BOX_--info===" | tee -a ${foTEXT}
echo ${MP4BOX} -info ${f%.*}.${EXT} | tee -a ${foTEXT}
${MP4BOX} -info ${f%.*}.${EXT} | tee -a ${foTEXT}

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

posted by ばる at 00:00| Comment(0) | TrackBack(0) | 圧縮日記264 | このブログの読者になる | 更新情報をチェックする
この記事へのコメント
コメントを書く
お名前: [必須入力]

メールアドレス: [必須入力]

ホームページアドレス: [必須入力]

コメント: [必須入力]

認証コード: [必須入力]


※画像の中の文字を半角で入力してください。

この記事へのトラックバック
×

この広告は1年以上新しい記事の投稿がないブログに表示されております。