Ogv to avi converter on Ubuntu Fedora

Ok... I like to make video tutorials or simply to record my desktop while doing something interesting and I use gtk-recordmydesktop to do that. But the output format is .ogv and I dont like that because Youtube dont support this type of files  and also it isnt a nice video format. I dont know that if on Windows you can play .ogv files! I dont know!
So, all you have to do is to convert this file to another format and probably youll choose .avi format. But how to do this on Linux? Maybe there are some apps that do this kind of job but they probably are very slow, or like on Windows, they do just one type of conversion (like avi to mp4 etc.) so youll need a lot of programs installed for a simple conversion.
Ill present here a tutorial about a very simple script that ran on terminal can convert a file from ogv to avi, and you dont have to install a lot of programs! I must say that this tutorials is for Linux users and I know that it works on Ubuntu distros (like Linux Mint, Ubuntu etc.) and on Fedora 17,18. I tested it on them!
So...
1. install mencoder by typing in terminal: sudo apt-get install mencoder ( sudo yum install mencoder for Fedora users)
2. create a new file: sudo gedit /usr/bin/ogv2avi
3. in ogv2avi file type the following script!

#!/bin/bash
# ogv to avi
# Call this with multiple arguments
# for example : ls *.{ogv,OGV} | xargs ogv2avi
N=$#;
echo "Converting $N files !"
for ((i=0; i<=(N-1); i++))
do
echo "converting" $1
filename=${1%.*}
mencoder "$1" -ovc xvid -oac mp3lame -xvidencopts pass=1 -o $filename.avi
shift 1
done
4. save the file
5. make the file executable: sudo chmod+x /usr/bin/ogv2avi
6. convert videos by typing in terminal: ogv2avi file1.out file2.out etc.

And now, a short video tutorial about how to do all those steps!

Related Posts by Categories

0 comments:

Post a Comment

Blog Archive

Powered by Blogger.