Created
January 26, 2014 09:42
-
-
Save hangingman/8630630 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# http://www.geocities.jp/geo_sunisland/variable.html より | |
# atmark.sh を改変 | |
# CMカットを実行する | |
#files=(`ls -1 | grep m2t`) | |
#for file in ${files[@]} | |
#do | |
# ./comskip_wrapper.sh ./comskip.ini $file | |
#done | |
# カレントディレクトリのファイル名リストを配列に格納 | |
files=(`ls -1 | grep CUT`) | |
# インデックスに @ を指定して、全ての要素を for 文の値リストに指定 | |
for file in ${files[@]} | |
do | |
filepath=`pwd`/$file | |
filename=${file%.*} | |
echo "エンコード対象ファイル: $filepath" | |
avconv -y -i $filepath -f mp4 -c:v libx264 -pre libx264-hq-ts \ | |
-r 30000/1001 -aspect 16:9 -s 1280x720 -bufsize 20000k -maxrate 25000k \ | |
-acodec aac -strict experimental -ac 2 -ar 48000 -b:a 128k -crf 25 -threads 4 \ | |
-partitions parti8x8+parti4x4+partp8x8+partb8x8 \ | |
/home4/videodir/"${filename}".mp4 | |
done | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment