Skip to content

Instantly share code, notes, and snippets.

@koron
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koron/11341451 to your computer and use it in GitHub Desktop.
Save koron/11341451 to your computer and use it in GitHub Desktop.
艦これ司令部室 が出力したWMVをffmpegを用いてニコニコ動画に上げるのに適したMP4へ変換するスクリプト。
#!/bin/sh
infile=$1 ; shift
passlog=${infile%.wmv}.passlog
outfile1=${infile%.wmv}-1.mp4
outfile=${infile%.wmv}.mp4
echo infile=$infile
echo outfile=$outfile
ffmpeg -i $infile \
-vcodec h264 -r 15.00 -b 380k -s 800x480 \
-pass 1 -passlogfile $passlog \
-an $outfile1
rm -f $outfile1
ffmpeg -i $infile \
-vcodec h264 -r 15.00 -b 380k -s 800x480 \
-pass 2 -passlogfile $passlog \
-acodec aac -strict experimental -ar 48000 -ab 64k \
$outfile
rm -f ${passlog}-*
@koron
Copy link
Author

koron commented Apr 28, 2014

ビデオのビットレートを380kに下げて合計を445kbpsにすることで、
ニコニコ動画の エコノミー回避 をしてみた。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment