subglobal

Universpace home

Easy site navigation

Universpace is a one stop site where one can find most of all things.
Follow the 'Puzzles' link to amuze yourself with mind boggling puzzles related to math , common sense , science and much more.
The 'Downloads' link will take you to a page where one can find some nifty tools and softwares developed by the author and his team. These are developed both for Linux and Windows OSes
The 'About Me' is the last place where one would want to visit to know about the author of the site
.

Current topics under discussion

 

Audio and Video encoding


Support ogg-vorbis audio ; bye bye mp3!

This section is closely related to the previous section (JPEG / Image compression). Here , our main aim is to discuss what encoding of audio and video is and have a peek at some elementary methods to apply the same in linux.

A/V encoding

Audio-video encoding has been around since time immemorial ,nevertheless it a hot topic and hasn't lost its importance at all. Encoding is basically converting one form of a given information into a shorter form , which need not necessarily be cryptic in nature.An elementary form of encoding is converting an octal number to its binary equivalent.
Well, so much so to define encoding.
Most of us amy be familiar with audio encoding ; for example an mp3 is an encoded form of standard raw or wav audio. It is well noted that mp3s occupy lesser space compared to wav files.Similarly, divx and mpeg4 are high compression video encoder-decoders (CODECs).  

  

[Top]

Elementary audio encoding Here we basically discuss the process of encoding a wav file .
mp3 being a patented codec will not be discussed in detail here. Instead, a superior and open source codec called ogg-vorbis is our primary concern.
Encoding a wave file using ogg vorbis codec :
Requirments :
1.The ogg-vorbis codecs and other tools
2.linux
oggenc is a nice tool to begin with..
1. oggenc [filename.wav] :this produces an output ogg file with the same name.
2. oggenc [filename.wav] -o [outputfile.ogg] :this produces an output ogg file called outputfile.ogg
3. oggenc [filename.wav] -b [bitrate] -o [out.ogg] :this is used to produce high bitrate ogg outputs.
4. oggenc [filename.wav] -q 3 -o [out.ogg] : this is used to produce high quality ogg outputs
5. oggenc [somefile.wav] -t "The track title" -a "artist who performed this" -l "name of album" -c "OTHERFIELD=contents of some other field not explictly supported" : Supply some info about the audio

Video encoding
A good place to start with video encoding is mencoder.
Try the following :
1.mencoder [inputfile.avi] -oac copy -ovc copy -o [outputfile.avi] : this just rips an input file to an output file without any encoding. ( -oac is output audio codec , -ovc is output video codec )
2.mencoder [inputfile.avi] -oac lavc -ovc lavc -o [output.avi] vcodec=mpeg4 : this encodes the avi using best quailty a/v mpeg4 codecs.
3.mencoder [inputfile.avi] -oac mp3lame -ovc lavc -o [output.avi] vcodec=mpeg4 : encode an avi using mpeg4 codec , mp3 soundtrack.
Well, these are the methods I use most frequently for video encoding and have noticed considerable change in file sizes . for more info , visit this site.

The Universpace verdict... There is no verdict to be given here. Encoding is surely a boon , no drawbacks, plenty of advantages..
Download an audio encoder which converts mp3s to ogg.: mp32ogg
[Top]

About Me | Site Map | Contact Me | ©2005 Universpace <part> | Updated on 01-8-2005