Thursday, March 18, 2010

How To Convert .ogv to .avi File After RecordMyDesktop

Simple Method,in terminal type this command

mencoder input.ogv -ovc xvid -oac mp3lame -xvidencopts pass=1 -o output.avi

Note:-
I assume if ogv has no audio just leave out the '-oac mp3lame'

Another Big Poppa Pump Method is,You can do it with mencoder as forum people said.
I personally created a convenient ad-hoc command.
If you convert many files, you may want to do that as well. Do the following

1. create the file with an editor. Type:
gedit /usr/bin/ogv2avi

2. type the commands in the file:
#!/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

3. save the file

4. make the file executable, type:
sudo chmod +x /usr/bin/ogv2avi

5. call the command with the syntax

ogv2avi file1.ogv file2.ogv file3.ogv

you can convert many files in one go !

A simple mencoder command line help
mecoder vob to avi well if you really want to learn how.
You will need to do a 2 pass encode or more either using xvid ,mpeg4 via lavc or x264 for video and libmp3lame for mp3 audio.
I can give you some examples for hq encodes

xvid
Code:

mencoder -oac mp3lame -lameopts cbr:br=128 -ovc xvid -xvidencopts pass=1 -o /dev/null

mencoder -oac mp3lame -lameopts cbr:br=128 -ovc xvid -xvidencopts pass=2:chroma_opt:vhq=4:bvhq=1:quant_type=mpeg:bitrate=900 -ofps 30000/1001 -o

mpeg4
Code:

mencoder -o /dev/null -oac mp3lame -lameopts cbr:br=128 -ovc lavc -ffourcc DX50 -lavcopts vcodec=mpeg4:vbitrate=900:vhq:vpass=1 -ofps 30000/1001 ; mencoder -o -oac mp3lame -lameopts cbr:br=128 -ovc lavc -ffourcc DX50 -lavcopts vcodec=mpeg4:vbitrate=900:vhq:vpass=2 -ofps 30000/1001

X264
Code:

mencoder -ovc x264 -x264encopts pass=1:turbo=1:nr=500:psnr -oac mp3lame -lameopts cbr:br=128 -ofps 30000/1001 -o /dev/null

mencoder -ovc x264 -x264encopts pass=2:nr=500:psnr:bitrate=900 -oac mp3lame -lameopts cbr:br=128 -ofps 30000/1001 -o

1 comment:

  1. Very nice guide, but it is too complicated. We can get a good solution about how to convert OGV to AVI if in Goggle if we type OGV Converter- Easily Convert OGV to AVI,MP4,WMV,MPEG,and FLV in Google.

    ReplyDelete