Commit 6893775b authored by Nikolay Nikolov's avatar Nikolay Nikolov
Browse files

bug fixed

parent 779bb2b6
#!/bin/bash #!/bin/bash
# Version 0.1 # Version 0.2
# Package video-converter # Package video-converter
# Author Nikolay Nikolov # Author Nikolay Nikolov
# Copyright root.bg All rights reserved. # Copyright root.bg All rights reserved.
...@@ -23,16 +23,16 @@ function install_deps { ...@@ -23,16 +23,16 @@ function install_deps {
function convert_videos { function convert_videos {
echo "" echo ""
echo "=== Starting ffmpeg to convert this video to mp4,ogg, format ===" echo "=== Starting ffmpeg to convert $1 to mp4,ogg, webm formats. ==="
ffmpeg -i $2 -c:v libx264 -preset ultrafast videoz/$2.mp4 ffmpeg -i $1 -c:v libx264 -preset ultrafast videoz/$1.mp4
ffmpeg -i $2 -acodec libvorbis -ac 2 -ab 96k -ar 44100 videoz/$2.ogv ffmpeg -i $1 -acodec libvorbis -ac 2 -ab 96k -ar 44100 videoz/$1.ogv
ffmpeg -i $2 -acodec libvorbis -ac 2 -ab 96k -ar 44100 videoz/$2.webm ffmpeg -i $1 -acodec libvorbis -ac 2 -ab 96k -ar 44100 videoz/$1.webm
echo "" echo ""
echo "=== Now will create screenshot from the movie and will save it in videoz directory" echo "=== Now will create screenshot from the movie and will save it in videoz directory"
ffmpeg -ss 00:00:15 -i videoz/$2.mp4 -vf scale=800:-1 -vframes 1 videoz/$2.jpg ffmpeg -ss 00:00:15 -i videoz/$1.mp4 -vf scale=800:-1 -vframes 1 videoz/$1.jpg
} }
...@@ -59,10 +59,10 @@ convert) ...@@ -59,10 +59,10 @@ convert)
echo "" echo ""
echo " ****************************************************" echo " ****************************************************"
echo " * Converting %2 *" echo " * Converting $2 *"
echo " ****************************************************" echo " ****************************************************"
convert_videos convert_videos $2
echo " ****************************************************" echo " ****************************************************"
echo " * Installation Complete *" echo " * Installation Complete *"
...@@ -76,4 +76,4 @@ convert) ...@@ -76,4 +76,4 @@ convert)
echo -e "\033[35;1m For example: ./video-converter.sh install \033[0m" echo -e "\033[35;1m For example: ./video-converter.sh install \033[0m"
echo "" echo ""
;; ;;
esac esac
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment