Created
October 18, 2015 00:26
-
-
Save Birchwell/94549e064a6499a490c4 to your computer and use it in GitHub Desktop.
Convert video to avi, 3gp, flv, mov, mp4, asf, wmv, mkv, mpg. The video and audio bitrates can be customized.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!# /bin/bash | |
ConvertTo=$(zenity --list --column="Select One" --title="Video | |
Converter" --height=300 --width=250 --text="Select the format | |
to convert to" avi 3gp flv webm mov mp4 mkv asf wmv mpg mov) | |
if [ $? == 1 ]; then | |
exit | |
fi | |
Video=$(zenity --entry --entry-text="1000" --title="Video | |
Converter" --text="Enter video bitrate (Kb/sec)") | |
if [ $? == 1 ]; then | |
exit | |
fi | |
Audio=$(zenity --entry --entry-text="128" --title="Video | |
Converter" --text="Enter audio bitrate (Kb/sec)") | |
if [ $? == 1 ]; then | |
exit | |
fi | |
tail -f ~/Scripts/convert-video.sh | zenity --progress --pulsate | |
--auto-close --auto-kill --title="Converting" --text="Converting | |
video to $ConvertTo ... Please wait." & | |
name=$(echo $1 | cut -f1 -d.) | |
ffmpeg -i "$1" -ab "$Audio"K -vb "$Video"K "$name.$ConvertTo" | |
killall -KILL tail | |
zenity --info --title="Video Converter" --text="Conversion to | |
$ConvertTo finished.\n\nPlease check file to insure\nno errors | |
on conversion." | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment