Music Encoding



Overview

This document briefly describes some of the programs that can be used to create various formats of music files.


Converting MP3 to ogg

Use oggenc from vorbis-tools.

Under Linux use mp32ogg - you can also use sox in combination with oggenc (Debian package vorbis-tools)


Converting ogg to mp3

Under Linux use sox in combination with lame

Alternatively, install vorbis-tools and use ogg123 combined with lame (see section below).

Use ogginfo to see details of the sourc file. If it's a higher bitrate than 128, you might like to add a parameter of -b nnn to the lame arguments. See man lame for options.

$ ogg123 -d au -f - source.ogg | lame -r -h -m s - target.mp3

For all .ogg files in the current folder:

$ for file in *.ogg; do ogg123 -d au -f - "$file" | lame -r -h -m s - "$(basename "$file" .ogg).mp3"; done

See A commmand line ogg to mp3 converter

EasyTAG is probably the easiest way to fix the empty tags in the target files.

Installing lame

See list of mirrors at http://www.debian-multimedia.org/mirrors.html

Converting WMA To MP3

You need to install mplayer and lame and probably w32codes. See 'Installing lame' above for links to install these packages.

This converts the WMA to a WAV file:

  • mplayer -vo null -vc dummy -af resample=44100 -ao pcm:waveheader input.wma

This converts the WAV file to an MP3:

  • lame -m s audiodump.wav result.mp3

Other Useful Tools

Resources


-- Frank Dean - 24 Feb 2005

Related Topics: abcde