Convert OGV to AVI (gtk-recordMyDesktop)

For a while I have been looking for a good way to make some video tutorials in Linux and be able to upload them in good quality to a video hosting site. I finally found a good piece of software that would let me choose where I wanted to record, gtk-recordMyDesktop. This can be obtained by typing sudo apt-get install gtk-recordmydesktop or through the Add/Remove Programs feature. The output of the recorded file is in a .ogv format. I want to convert it to a .avi format so I can upload it. Here is the command to do so:

mencoder -idx input.ogv -ovc lavc -oac mp3lame -o output


There is another way to do this through ffmpeg with this command:

ffmpeg -i input.ogv output.avi

Either one works, but to keep things easy, I made a script to assist with the conversion:

#!/bin/bash
echo "Convert from .OGV to .AVI"
NAME=$(whoami)
read -p "Is the file on your Desktop? (y/n):" DESKTOP
if [ "$DESKTOP" = "y" ]; then
{
    read -p "Please specify the name of the .OGV file: /home/$NAME/Desktop/" OGV
    read -p "Please specify the desired output filename: /home/$NAME/Desktop/" AVI
    mencoder -idx /home/$NAME/Desktop/$OGV -ovc lavc -oac mp3lame -o /home/$NAME/Desktop/$AVI
    echo "Conversion completed."
}
else
{
    read -p "Please specify the location of the .OGV file: " OGV
    read -p "Please specify the desired output filename: " AVI2
    mencoder -idx $OGV -ovc lavc -oac mp3lame -o $AVI2
    echo "Conversion completed."
}
fi
read -p "Would you like to play the converted movie? (y/n):" PLAY

if [ "$PLAY" = "y" ]; then
{   
    if [ "$DESKTOP" = "y" ]; then
            totem /home/$NAME/Desktop/$AVI
            echo "Process Completed Successfully!"
            clear
            exit
    else
            totem $AVI2
            clear
            echo "Process Completed Successfully!"
            exit       
    fi
}
else
    clear
    echo "Process Completed Successfully!"
    sleep 2
fi
exit

Just make sure to issue chmod 755 ogvtoavi before running it.

So now you can expect some videos in the upcoming days...

6 comments:

  mikemunsil

February 11, 2010 at 9:26 AM

Beautiful! Many thanks.

Works flawlessly converting .ogv created in GTKRecordmyDesktop to .avi file in Ubuntu 9.10.

  Anonymous

October 15, 2010 at 1:57 PM

thanks, your script works a treat. :)

  Anonymous

December 15, 2010 at 7:10 AM

Excelellent tutorial and script!
Thank you so much.

  Anonymous

February 3, 2017 at 5:53 PM

I use iDealshare VideoGo to convert OGV to AVI, MP4, WMV, MOV, MPG etc. Here is the easy guide https://www.idealshare.net/video-converter/ogv-to-avi-or-avi-to-ogv.html

  Anonymous

May 23, 2017 at 7:10 PM

Avdshare Video Converter can serve as a multifunctional OGV converter which can not only convert OGV to AVI, MOV, WMV, MPG, DV, Prores, MP4, VOB, GIF, WTV, FLV, SWF, MP3, AAC, WAV, FLAC, WMA, etc. but also can convert other video formats to OGV for your personal reasons, like converting MP4 to OGV, AVI to OGV, MKV to OGV, MOV to OGV, FLV to OGV, WMV to OGV, etc.
https://www.avdshare.com/ogv-converter-for-mac-windows

  kanju

March 5, 2022 at 9:42 PM


I am very impressed with your post because this post is very beneficial for me and provide a new knowledge…
idealshare-videogo-crack
sparkocam-crack-serial-number
bytefence-crack-anti-malware-pro
download-superantispyware-crack
skype-crack