|
@@ -11,6 +11,13 @@ red=$(tput setaf 1)
|
|
|
green=$(tput setaf 2)
|
|
|
reset=$(tput sgr0)
|
|
|
|
|
|
+command_exists() {
|
|
|
+ if ! [[ -x $(command -v "$1") ]]; then
|
|
|
+ return 1
|
|
|
+ fi
|
|
|
+
|
|
|
+ return 0
|
|
|
+}
|
|
|
print_usage() {
|
|
|
echo -e "\033[43;34m $package - 4dage custom version for ffmpeg: \033[0m"
|
|
|
echo -e "${green}If have problem with this, please contact with gemer AKA: 张宇鹏<zhangyupeng@cgaii.com>"
|
|
@@ -143,11 +150,12 @@ covertVideoTask() {
|
|
|
if [ "${RC}" -ne "0" ]; then
|
|
|
FFREPORT=file="$outputFolder/$outputName.audio.log":level=32 ffmpeg -i $audioFile -af "highpass=f=200, lowpass=f=3000" $tempAudio -y
|
|
|
fi
|
|
|
- ffmpeg -i $videoFile -i $tempAudio -c:v copy -c:a aac $tempVideo -y
|
|
|
+ ffmpeg -i $videoFile -i $tempAudio -c:v copy -c:a aac -strict -2 $tempVideo -y
|
|
|
FFREPORT=file="$outputFolder/$outputName.$videoFileType.log":level=32 ffmpeg -i $tempVideo -s 1056x792 -c:v libx264 -profile:v high -level:v 4.0 -movflags faststart -bf 2 -c:a copy "$outputFolder/$outputName.$videoFileType" -y
|
|
|
FFREPORT=file="$outputFolder/$outputName.flv.log":level=32 ffmpeg -i $tempVideo -s 1056x792 -c:v libx264 -profile:v high -level:v 4.0 -movflags faststart -bf 2 -c:a copy "$outputFolder/$outputName.flv" -y
|
|
|
# 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
|
|
|
}
|
|
|
|
|
@@ -161,9 +169,17 @@ if [ ! -z $videoFile ] && [ ! -z $audioFile ] && [ ! -z $outputName ] && [ ! -z
|
|
|
# ffmpeg -i temp.mp4 -s 1056x792 -c:v libx264 -profile:v high -level:v 4.0 -movflags faststart -bf 2 -c:a copy temp1.mp4 -y
|
|
|
# ffmpeg -i temp1.mp4 -pix_fmt rgb24 -color_range 2 $output -y
|
|
|
# rm temp.mp4 temp1.mp4 temp.mp3
|
|
|
- # mediainfo --fullscan $output --Output=JSON >"$output.json"
|
|
|
+ if [ ! -d $outputFolder ]; then
|
|
|
+ mkdir -p $outputFolder
|
|
|
+ fi
|
|
|
covertVideoTask
|
|
|
|
|
|
+ if command_exists "mediainfo"; then
|
|
|
+
|
|
|
+ mediainfo --fullscan "$outputFolder/$outputName.$videoFileType" --Output=JSON >"$outputFolder/$outputName.json"
|
|
|
+ mediainfo --fullscan "$outputFolder/$outputName.flv" --Output=JSON >"$outputFolder/$outputName.flv.json"
|
|
|
+ fi
|
|
|
+
|
|
|
echo -ne "\033[0;32m"
|
|
|
cat <<EOF
|
|
|
_oo0oo_
|