#!/bin/bash
#
# video2flv - Create a flash video (<videoname>.flv) from a video of a certain type in the current directory
# for use with Coppermine.
#
# Requirement: ffmpeg must be installed.
#
# Place this file in a directory that is in your $PATH to executables such as /usr/local/bin
# Then, chmod a+x video2pic
#
#
# Run this script from within the directory where the videos reside with the command: "video2flv".
#
#
# Get data from terminal
echo -n "Enter video file name to convert (video.ext): ";read file;
filename=${file:0:(${#file})-4};
echo;echo;echo Converting $file to $filename.flv;echo;
ffmpeg -i $file -b 1000k -ar 22050 -f flv $filename.flv;
echo;
echo "Complete!...";
