Three decoders, measured against FFmpeg

A decoder is the part of a player that turns a music file back into sound. Orpheic has its own for MP3, for FLAC, and for DST, the lossless compression inside SACDs.

The code was written by Claude, an AI model from Anthropic, from the published standards, under our direction. Nothing was accepted on its word. Each claim on this page was measured, and the code and the tools to repeat the measurements are open, under the MIT licence.

How much faster

How many times faster each decoder runs than FFmpeg's decoder for the same format. Decoder alone, one thread, the same data for both. Each bar is the middle value over the files, on a desktop computer (Intel i9-14900K) against FFmpeg 9.0.2, the newest release.

FLAC2.37 times
MP3, fast path2.25 times
DST, stereo2.01 times
DST, five or six channels1.81 times

FLAC: 8 files, from 2.12 to 2.47 times. MP3: 32 files, from 2.18 to 2.57. DST: five excerpts of SACDs.

On other machines

Desktop PC, FFmpeg 9.0.2MacBook (Apple M4), FFmpeg 9.0.2 from HomebrewRaspberry Pi 5, FFmpeg 7.1.5 from the system
FLAC2.37 times3.45 times1.58 times
MP3, fast path2.25 times2.76 times2.27 times
DST, stereo2.01 times2.06 times2.89 times
DST, five or six channels1.81 times1.60 times2.74 times

Each number is against the FFmpeg that most people on that system have. Against the FFmpeg 6.1.1 that Ubuntu 24.04 ships, the desktop numbers are 2.25, 2.38, 1.89 and 1.79.

What these numbers do not say

The same sound

Speed is worth nothing if the sound changes. So every decoder was compared with FFmpeg's on real music.

MP3: distance from the exact result

The same measure for four decoders, on five other files of our own, in millionths of full scale. Shorter is closer. None of these can be heard.

Orpheic0.18
minimp30.48
mpg1231.18
FFmpeg1.34

These five files are not the 32 above, which is why Orpheic shows 0.18 here and 0.42 there. The other three decoders were not measured on the 32.

16,000 MP3 files from a real library

Files picked at random from one listener's collection of about 130,000, made by every kind of encoder over 25 years. Both decoders read each file, and every frame was compared.

The same as FFmpeg in every frame15,109 files
Differ only in rounding602 files
Have damaged spots200 files
Other difference10 files
Left to FFmpeg (Layer II, MP3 inside WAV, other)79 files

At a damaged spot the two differ on purpose: FFmpeg drops the frame or plays noise, Orpheic plays silence there.

The same bits on every machine

All three decoders give the same output, bit for bit, on Linux with two compilers, on macOS, on a Raspberry Pi 5 and on Windows. This was checked by taking a fingerprint of every sample: 33 MP3 files, 11 FLAC files and 5 files of SACD frames.

For FLAC and DST this follows from the arithmetic, which uses whole numbers only. MP3 needs cosines, sines and powers, and each system answers those a little differently in the last digit. So the MP3 decoder never asks the system. Every such value is written into the code, computed once to 60 digits.

Who gains in practice

Playing an MP3 or a FLAC file never waited on the decoder. There the gain is less work for the processor. With SACDs the decoder is real work for a small machine, and there the gain is room to spare.

How much of one processor core each decoder keeps busy while an SACD plays. Shorter is better.

Raspberry Pi 5

Stereo, Orpheic4.8 percent
Stereo, FFmpeg14.7 percent
Five or six channels, Orpheic14.9 percent
Five or six channels, FFmpeg42.6 percent

A laptop from 2007

Stereo, Orpheic13.5 percent
Stereo, FFmpeg28.2 percent
Five or six channels, Orpheic45.2 percent
Five or six channels, FFmpeg84 percent

Above 100 percent a machine cannot keep up and the music breaks up. Three discs on each machine.

Memory

Kilobytes of memory each decoder asks for while it works. Orpheic's needs a little more than FFmpeg's for MP3 and FLAC, and much less for DST. All of it is small next to the player itself, which uses about 66,000.

OrpheicFFmpeg
MP35042
FLAC6454
DST, stereo48150
DST, five or six channels48232

Other MP3 decoders

Time to decode one minute of music, in thousandths of a second, on the desktop computer. One file at 128 kilobits per second. Shorter is faster.

Orpheic9.4
FFmpeg24.4
mpg12325.87
minimp327.02

FFmpeg, mpg123 and minimp3 were only run, as finished programs. Their code was not read.

How this was measured, and what a careful reader should know

Check it yourself

The three decoders and the small tools that repeat the main checks are in one repository. Each tool prints one fingerprint per file. The same file must give the same line on your machine as on ours.

github.com/orpheic/orpheic-decoders

Where the code comes from

The MP3 and FLAC decoders were written from their standards, and checked against other decoders that were only run, never read. The DST decoder is the second one written for Orpheic. The first was written from the standard and compared, byte for byte, with the standard's reference decoder. The present one keeps its header reading and rewrites the rest for speed.

Nobody can show what an AI model remembers from its training. So the code was also compared with other decoders for the same formats. The reviewers were AI models too: separate ones, which had not written the code and were asked to look for copying. What is shared is what the standards themselves print. The one part of the MP3 decoder they found organised like another decoder was rewritten.

Orpheic itself is not open yet. We are preparing to open the whole program.