From 54114b62ad6af4b9cfc41d267a2c36b8f902792a Mon Sep 17 00:00:00 2001 From: Knah Tsaeb Date: Fri, 13 Feb 2015 12:25:41 +0100 Subject: [PATCH] [upd] better encoder profil --- bin/cronTask.sh.sample | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/cronTask.sh.sample b/bin/cronTask.sh.sample index d9d06b9..0813964 100644 --- a/bin/cronTask.sh.sample +++ b/bin/cronTask.sh.sample @@ -4,7 +4,7 @@ finalDest=/path/of/sovigall/videos/ tempDest=/path/of/sovigall/tmp/ pageCache=/path/of/sovigall/pagecache/ -threads=3 # nb cpu core - 1 +threads=1 # nb cpu core - 1 convertingTool=/usr/bin/ffmpeg mimeMagic=/etc/mime.types #### END CONFIG #### @@ -35,10 +35,10 @@ do fi convert "$urlHash.jpg" -resize 260 "$urlHash.thumb.jpg" mimeFile=$(file --mime-type -b "$urlHash.raw") - if [[ "$mimeFile" != "video/webm" ]] + if [ "$mimeFile" != "video/webm" ] then createDate=$(stat -c %y $urlHash.raw 2>&1 | awk '{print$1}' | sed 's/[\-]//g') - eval $convertingTool -i $urlHash.raw -threads $threads -quality good -cpu-used 0 -bufsize 1600k -b:v 800K -metadata creation_time="$createDate" $urlHash.webm + eval $convertingTool -i $urlHash.raw -threads $threads -cpu-used 0 -c:v libvpx -crf 18 -b:v 700K -c:a libvorbis -qscale:a 4 -metadata creation_time="$createDate" $urlHash.webm else mv $urlHash.raw $urlHash.webm fi @@ -49,7 +49,7 @@ do mimeFile=$(file --mime-type -b "$urlHash.webm") if [[ "$mimeFile" != "video/webm" ]] then - eval $convertingTool -i $urlHash.webm -threads $threads -quality good -cpu-used 0 -bufsize 1600k -b:v 800K -metadata creation_time="$createDate" $urlHash.webm + eval $convertingTool -i $urlHash.webm -threads $threads -cpu-used 0 -c:v libvpx -crf 18 -b:v 700K -c:a libvorbis -qscale:a 4 -metadata creation_time="$createDate" $urlHash.webm fi eval $convertingTool -i $urlHash.webm -vframes 1 -an -ss 3 $urlHash.jpg convert "$urlHash.jpg" -resize 260 "$urlHash.thumb.jpg" @@ -67,6 +67,7 @@ do then if [ -f "$urlHash.webm" ] then + #rm $file sleep 2 mv $urlHash* $destination fi