[upd] better encoder profil
This commit is contained in:
parent
08e47a6af9
commit
54114b62ad
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue