diff --git a/Web/Models/shell/processVideo.ps1 b/Web/Models/shell/processVideo.ps1 index eddc9d6e..f2cc9918 100644 --- a/Web/Models/shell/processVideo.ps1 +++ b/Web/Models/shell/processVideo.ps1 @@ -15,6 +15,6 @@ Move-Item $file $temp ffmpeg -i $temp -ss 00:00:01.000 -vframes 1 "$dir$hashT/$hash.gif" ffmpeg -i $temp -c:v libx264 -q:v 7 -c:a libmp3lame -q:a 4 -tune zerolatency -vf "scale=640:480:force_original_aspect_ratio=decrease,pad=640:480:(ow-iw)/2:(oh-ih)/2,setsar=1" -y $temp2 -Move-Item $temp2 "$dir$hashT/$hash.ogv" +Move-Item $temp2 "$dir$hashT/$hash.mp4" Remove-Item $temp Remove-Item $temp2 diff --git a/Web/Models/shell/processVideo.sh b/Web/Models/shell/processVideo.sh index 749dd070..ca2c6d99 100644 --- a/Web/Models/shell/processVideo.sh +++ b/Web/Models/shell/processVideo.sh @@ -1,14 +1,12 @@ tmpfile="$RANDOM-$(date +%s%N)" cp $2 "/tmp/vid_$tmpfile.bin" -cp ../files/video/rendering.apng $3${4:0:2}/$4.gif -cp ../files/video/rendering.ogv $3/${4:0:2}/$4.ogv nice ffmpeg -i "/tmp/vid_$tmpfile.bin" -ss 00:00:01.000 -vframes 1 $3${4:0:2}/$4.gif nice -n 20 ffmpeg -i "/tmp/vid_$tmpfile.bin" -c:v libx264 -q:v 7 -c:a libmp3lame -q:a 4 -tune zerolatency -vf "scale=640:480:force_original_aspect_ratio=decrease,pad=640:480:(ow-iw)/2:(oh-ih)/2,setsar=1" -y "/tmp/ffmOi$tmpfile.mp4" -rm -rf $3${4:0:2}/$4.ogv -mv "/tmp/ffmOi$tmpfile.ogv" $3${4:0:2}/$4.ogv +rm -rf $3${4:0:2}/$4.mp4 +mv "/tmp/ffmOi$tmpfile.mp4" $3${4:0:2}/$4.mp4 -rm -f "/tmp/ffmOi$tmpfile.ogv" +rm -f "/tmp/ffmOi$tmpfile.mp4" rm -f "/tmp/vid_$tmpfile.bin" diff --git a/Web/static/video/rendering.ogv b/Web/static/video/rendering.mp4 similarity index 100% rename from Web/static/video/rendering.ogv rename to Web/static/video/rendering.mp4