|
@@ -1,10 +1,11 @@
|
|
|
#!/bin/bash
|
|
|
|
|
|
-version="0.1.3"
|
|
|
+version="0.1.4"
|
|
|
videoFile=''
|
|
|
audioFile=''
|
|
|
outputName=''
|
|
|
outputFolder=''
|
|
|
+allowCacheStay=0
|
|
|
tempFolder=/tmp/4dage-ffmpeg
|
|
|
time=$(date "+%Y%m%d-%H%M%S")
|
|
|
tempFilePrefix="4dage-source-${time}"
|
|
@@ -132,6 +133,12 @@ while test $# -gt 0; do
|
|
|
export outputName=$(echo $1 | sed -e 's/^[^=]*=//g')
|
|
|
shift
|
|
|
;;
|
|
|
+ --cache)
|
|
|
+ shift
|
|
|
+ echo "allow cahche remain"
|
|
|
+ export allowCacheStay=1
|
|
|
+ shift
|
|
|
+ ;;
|
|
|
-v)
|
|
|
echo "$version"
|
|
|
shift
|
|
@@ -163,7 +170,10 @@ covertVideoTask() {
|
|
|
# ffmpeg -i $tempVideo -s 1056x792 -c:v libx265 -movflags faststart -bf 2 -c:a copy "$outputFolder/$outputName.265.$videoFileType" -y
|
|
|
# export lastOutPutVideo=$outputFolder/$outputName.$videoFileType
|
|
|
# export lastOutPutVideoFlv="$outputFolder/$outputName.flv"
|
|
|
- # rm $tempAudio $tempVideo
|
|
|
+ if test $allowCacheStay -eq 0; then
|
|
|
+ rm $tempAudio $tempVideo
|
|
|
+ fi
|
|
|
+
|
|
|
}
|
|
|
|
|
|
concatAllLogFile() {
|