Tuesday, April 22, 2008

Converting audio files to mp3 using mencoder

Install the Mplayer binaries for your operating system from http://www.mplayerhq.hu/
Command line option:
mencoder -ovc frameno -oac mp3lame -lameopts cbr:br=128 -of rawaudio -o <output_file.mp3> -audiofile <input_file> <dummy_video_file>
Make sure that the play time of the video file is more than the play time of the audio you are trying to convert. In case it is not, you can give multiple video files in the place of one. 


D said...

Thanks! Worked perfectly! I was having a lot of trouble generating mp3 files which would work with my MP3 player or Audacious. Your -oac setting did the trick!

Nicolas said...

Thanks a lot! That did the trick - without me having to look up the mencoder man page.