25 lines
911 B
Bash
25 lines
911 B
Bash
#!/bin/bash/
|
|
finalDest=/path/of/sovigall/videos/
|
|
pageCache=/path/of/sovigall/pagecache/
|
|
convertingTool=/usr/bin/ffmpeg
|
|
|
|
video=$1
|
|
path="$finalDest$2"
|
|
|
|
duration=$(eval $convertingTool -i "$path""$video.webm" 2>&1 | grep Duration | awk '{print $2}' | tr -d ,)
|
|
heure=$(echo $duration | cut -d":" -f1)
|
|
minute=$(echo $duration | cut -d":" -f2)
|
|
seconde=$(echo $duration | cut -d":" -f3 | cut -d"." -f1)
|
|
total=$(($heure*3600 + $minute*60 + $seconde))
|
|
if [[ $convertingTool == "/usr/bin/ffmpeg" ]]
|
|
then
|
|
sizeOfVideo=$(eval $convertingTool -i "$path""$video.webm" 2>&1 | grep "Stream #0:0" | awk '{print $6}' | tr -d ,)
|
|
else
|
|
sizeOfVideo=$(eval $convertingTool -i "$path""$video.webm" 2>&1 | grep "Stream #0.0" | awk '{print $6}' | tr -d ,)
|
|
fi
|
|
#createDate=$(stat -c %y "$path""$video.webm" 2>&1 | awk '{print$1}' | sed 's/[\-]//g')
|
|
echo "$total"
|
|
echo "$sizeOfVideo"
|
|
#echo "$createDate"
|
|
rm $pageCache*.html 2> /dev/null
|