[upd] better encoder profil
This commit is contained in:
parent
08e47a6af9
commit
54114b62ad
|
@ -4,7 +4,7 @@
|
||||||
finalDest=/path/of/sovigall/videos/
|
finalDest=/path/of/sovigall/videos/
|
||||||
tempDest=/path/of/sovigall/tmp/
|
tempDest=/path/of/sovigall/tmp/
|
||||||
pageCache=/path/of/sovigall/pagecache/
|
pageCache=/path/of/sovigall/pagecache/
|
||||||
threads=3 # nb cpu core - 1
|
threads=1 # nb cpu core - 1
|
||||||
convertingTool=/usr/bin/ffmpeg
|
convertingTool=/usr/bin/ffmpeg
|
||||||
mimeMagic=/etc/mime.types
|
mimeMagic=/etc/mime.types
|
||||||
#### END CONFIG ####
|
#### END CONFIG ####
|
||||||
|
@ -35,10 +35,10 @@ do
|
||||||
fi
|
fi
|
||||||
convert "$urlHash.jpg" -resize 260 "$urlHash.thumb.jpg"
|
convert "$urlHash.jpg" -resize 260 "$urlHash.thumb.jpg"
|
||||||
mimeFile=$(file --mime-type -b "$urlHash.raw")
|
mimeFile=$(file --mime-type -b "$urlHash.raw")
|
||||||
if [[ "$mimeFile" != "video/webm" ]]
|
if [ "$mimeFile" != "video/webm" ]
|
||||||
then
|
then
|
||||||
createDate=$(stat -c %y $urlHash.raw 2>&1 | awk '{print$1}' | sed 's/[\-]//g')
|
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
|
else
|
||||||
mv $urlHash.raw $urlHash.webm
|
mv $urlHash.raw $urlHash.webm
|
||||||
fi
|
fi
|
||||||
|
@ -49,7 +49,7 @@ do
|
||||||
mimeFile=$(file --mime-type -b "$urlHash.webm")
|
mimeFile=$(file --mime-type -b "$urlHash.webm")
|
||||||
if [[ "$mimeFile" != "video/webm" ]]
|
if [[ "$mimeFile" != "video/webm" ]]
|
||||||
then
|
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
|
fi
|
||||||
eval $convertingTool -i $urlHash.webm -vframes 1 -an -ss 3 $urlHash.jpg
|
eval $convertingTool -i $urlHash.webm -vframes 1 -an -ss 3 $urlHash.jpg
|
||||||
convert "$urlHash.jpg" -resize 260 "$urlHash.thumb.jpg"
|
convert "$urlHash.jpg" -resize 260 "$urlHash.thumb.jpg"
|
||||||
|
@ -67,6 +67,7 @@ do
|
||||||
then
|
then
|
||||||
if [ -f "$urlHash.webm" ]
|
if [ -f "$urlHash.webm" ]
|
||||||
then
|
then
|
||||||
|
#rm $file
|
||||||
sleep 2
|
sleep 2
|
||||||
mv $urlHash* $destination
|
mv $urlHash* $destination
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue