Using l3enc in 2020...

In the 2020s there is indeed a plethora of codecs available at no cost to the modern computer / tablet / smartphone user so why bother with l3enc, a shareware mp3 encoder that rose and fell in the 90s? The simple answer is that l3enc was at the centre of an exciting time, a time where ordinary users could start experimenting with encoding sound on their personal computers, carry the sound around on portable devices, make their own highly pesonalised mixes and even share their music files with others via file sharing services such as Napster. A time of revolution!

And, Gentle Reader, with a bit of massaging l3enc can still produce mp3 files on a modern computer in 2020. Not so much for playback any more as there are far better mp3 encoders available but just we can look back, even briefly, to the dawn of the revolution and to a time where the Internet itself was only just starting to be widely used...


Finding l3enc itself these days is not the easiest although some reliable sites still hold versions on the archive. I have put a copy on my own web site and instructions below will download from this web site and then install l3enc to /usr/local/bin:

tar -xvf l3enc272.linux.tar.gz
install -D -s -m 0755 l3v272.linux/l3enc /usr/local/bin
install -D -s -m 0755 l3v272.linux/l3dec /usr/local/bin

If only it was all that easy! However this is a binary with links to some very old libraries and it will not run without them. A very clued up Slackware user gave me the guidance required to install these old libraries in a way that is reasonably safe for a modern system. First download the libraries from a truly ancient Slackware version:


Yes, Slackware 4.0! Now install the needed files only from these archives to a safe location in /opt/oldlibs:

mkdir -pv /opt/oldlibs
tar -xvf libc.tgz --transform='s|.newlib||' --show-transformed-names \
    --strip=1 -C /opt/oldlibs lib/{,}
tar -xvf ldso.tgz --show-transformed-names \
    --strip=1 -C /opt/oldlibs lib/

In /opt/oldlibs these ancient libraries should not be found by most compilers or applications on a modern Linux system, and certainly not on my system which by default does not include /opt in the $PATH statement. But of course l3enc cannot find these required libraries either. The following links therefore will be required:

ln -sv /opt/oldlibs/ /usr/lib/ && \
ln -sv /opt/oldlibs/ /usr/lib/ && \
ln -sv /opt/oldlibs/ /lib/

In between usage or experimentation with l3enc I personally remove the symlinks given above to keep such older libraries shielded from my system. As I mentioned before I have a system which does not include /opt in the $PATH statement; make sure and check if this is true of your own system as well.The simple syntax to remove the symlinks is:

rm -v /usr/lib/{,} /lib/

And with the actual libraries 'hidden' in /opt your system should now be as it was, with the libraries easily made available for l3enc by recreating the links when needed. But now with the links still in place l3enc should roar into life. However this is the shareware version and has a few substantial limitations built in. In the day you could buy a licence that would remove these limitations for about $250 but despite my best efforts I could not buy any licence from Fraunhofer. So I used a serial number eaily found online and the limitations then disappeared, I would be happy to do the right thing and purchase a legal licence if that is still possible? In the mean time placement of registration details is as follows:

echo '1234107D90ABCC' > register.inf
install -D -m 0644 register.inf /usr/local/bin

And now you should be able to run l3enc unencumbered by shareware limitations. Note again that I am more than happy to pay an official license fee for this but the infrastructure to deliver such licenses has apparently long since turned to dust...

Commandline usage...

To demonstrate the commandline usage of l3enc I will use my favourite wav file and perhaps you should also download it? With l3enc there is reasonably comprehensive guidance available directly from the command line and I give this below:

andrew@ilium~$ l3enc -h
****  L3ENC V2.72 ISO/MPEG Audio Layer 3 Software Only Encoder   ***
|                                                                  |
|             copyright Fraunhofer-IIS 1994, 1995, 1996            |
|                                                                  |

usage:    l3enc <time-signal file> <bitstream file> -switches

switches:   -h display this help message
            -h <switch> displays more help for <switch> if available (*)
            -f <filename> read arguments from file

 -br   xxx * total bitrate, 8000<=bitrate<=256000    def.: 112000
 -dm       * downmix stereo to mono                  def.: off
 -hq         highest quality, reduced speed          def.: no
 -crc      * enable MPEG1/2 crc check                def.: off
 -anc  xxx * <file-name><rate> 
 -sr   xxx * sampling rate of the input file         def.: 44100
 -spch       best quality for speech signal          def.: no
 -tfs        swap input time file                    def.: no
 -tfc  xxx   specifies channels in time signal file  def.: 2
 -mod  xxx   (obsolete)
 -esr  xxx   (obsolete)

Note that extra details are available for those options that have an asterisk against them. So to see details of the available bitrates, for example, you can run l3enc -h -br and all of the supported bitrates will then be seen. Now I saw 192000 in there so a simple command line would be:

l3enc luckynight.wav test.mp3 -br 192000 -hq -crc

I confess that I had a small thrill the first time that I ran that command line and then sat back and listened to the output, it was as if I had stepped into a time machine back to the 90s! So of course two more limitations become immediately obvious: Constant Bitrate (CBR) only and no facility to add meta data. Well we are stuck with CBR but my best friend eyeD3 can help with the meta tags:

l3enc luckynight.wav test.mp3 -br 192000 -hq -crc && \
eyeD3 --album "Treasure Quest Soundtrack" \
      --album-artist "Jody Marie Gnant" \
      --track 9 \
      --title "Lucky Night" \
      --genre "Soundtrack" \
      --release-year "1995" \
      --comment "l3enc lives..." \

And there is the file, neatly tagged, playing nicely in the background and the grandfather of mp3 encoding has been coaxed back into life in 2020! Now, Gentle Reader, when I get myself a bit more organised I will write up a method of using the Audio CD ripper abcde to convert to mp3 using l3enc on this page. I have recently purchased and external DVD burner now all I need is a rainy weekend!