Advertisement
Advertisement
| 10.10.2008 at 11:22AM PDT, ID: 23805056 | Points: 500 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: |
#!/bin/bash
while true ; do
rm -f /home/smartdata/www/files/encode/mp4/*.log
for movie in /home/smartdata/www/html/files/encode/mp4/*.* ; do
NEWNAME=`basename $movie`
ORIGINALPATH=$movie
NEWNAME="${NEWNAME%.*}.mp4"
NEWPATH=/home/smartdata/www/html/files/encoding/mp4/$NEWNAME
FINALPATH=/home/smartdata/www/html/files/encoded/mp4/$NEWNAME
COPYPATH=/home/smartdata/www/html/files/encode/mp4/copy/$NEWNAME
echo Processing $movie
echo -- New name is $NEWNAME
echo -- New path is $NEWPATH
echo -- Final path is $FINALPATH
echo -- Original path is $ORIGINALPATH
ffmpeg -i "$movie" -y -an -pass 1 -vcodec libx264 -s 416x312 -b 500kb -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -me epzs -subq 1 -trellis 0 -refs 1 -bf 16 -b_strategy 1 -coder 1 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 500kb -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 "$NEWPATH"
ffmpeg -i "$movie" -y -acodec libfaac -ab 64k -pass 2 -vcodec libx264 -s 416x312 -b 500kb -flags +loop -cmp +chroma -partitions +parti8x8+parti4x4+partp8x8+partb8x8 -flags2 +brdo+dct8x8+wpred+bpyramid+mixed_refs -me umh -subq 6 -trellis 1 -refs 4 -bf 16 -directpred 3 -b_strategy 1 -bidir_refine 1 -coder 1 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 500kb -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 "$NEWPATH"
mv $ORIGINALPATH /home/smartdata/www/html/files/encode/mp4/finished/
mv $NEWPATH $FINALPATH
done
echo 5
echo 4
echo 3
echo 2
echo 1
echo Waiting 5 minutes
sleep 300 #wait 5 min
echo Done Waiting 5 minutes
done
|