Skip to content

Fabrice Bellard: FFmpeg, QEMU and the One-Man Project

Abstract

Fabrice Bellard (born 1972) is a French programmer who has started, mostly alone, a string of programs that much of the world’s software now depends on. FFmpeg, which he began under a pseudonym in 2000, decodes and converts the video and audio of browsers and media players. QEMU, from 2003, emulates whole computers and underlies Linux virtualization and the Android emulator. In between he wrote a C compiler small enough to win the Obfuscated C contest, found a faster formula for the digits of pi, and in 2009 computed pi to 2.7 trillion digits on a desktop PC, a world record. Later projects run a Linux PC inside a web page, a 4G base station on an ordinary computer and a compressor built on a language model.

Grenoble and LZEXE

Fabrice Bellard was born in 1972 in Grenoble. At seventeen he wrote LZEXE, a compressor for MS-DOS executable files that unpacked itself in memory when the program ran. He studied at the École Polytechnique and then at Télécom Paris.

In 1997 he published a formula for computing a given hexadecimal digit of pi without computing the ones before it, about 43 percent faster than the Bailey–Borwein–Plouffe formula of 1995 on which it improved. It is known as Bellard’s formula, and the distributed project PiHex used it.

Small Compilers

The International Obfuscated C Code Contest rewards short, deliberately unreadable C programs that still work; Bellard has won it three times. His 2001 entry, OTCC, the Obfuscated Tiny C Compiler, was a compiler for a subset of C small enough to fit the contest’s size limit that could compile itself. He grew it into the Tiny C Compiler (TCC), a complete C99 compiler whose x86 executable is about 100 kilobytes. It compiles, by Bellard’s measurement, about nine times faster than GCC, though its code runs more slowly, and it is fast enough to run C source files as scripts. To show this, Bellard’s TCCBOOT compiled a Linux kernel from source at boot time and started it, in about ten seconds. Bellard stopped working on TCC around 2012; others have maintained it since.

FFmpeg

In 2000 Bellard started a project to decode and encode video and audio formats under the pseudonym “Gérard Lantau”; the first revision in its repository is dated 20 December 2000. The name was FFmpeg, FF for “fast forward” and MPEG for the video standards. It grew into a set of libraries, libavcodec above all, that implement hundreds of codecs and container formats, and a command-line tool that converts nearly anything into anything else. Bellard led it for its first years; Michael Niedermayer led it from 2004 to 2015.

FFmpeg became the shared media layer of free software and much commercial software. It is a core part of the VLC player, handles audio and video playback in Chromium and so in Google Chrome and the browsers built on it. In March 2011 a group of developers split off as Libav after a dispute over how the project was run; the fork was declared abandoned in 2020. Because so much depends on a project maintained by a small group of volunteers, FFmpeg is a standard example in the arguments described in Volunteer-Maintained Infrastructure.

QEMU

Bellard released the first preview of QEMU, the “Quick EMUlator”, in 2003. It emulates a complete machine, processor, memory and devices, so that an operating system for one architecture can run unmodified on another. To make this fast it translates blocks of guest machine code into host machine code at run time and caches the result; since version 0.10 the translator has been the Tiny Code Generator, which replaced an earlier scheme that relied on GCC. Bellard described the technique in a paper at the 2005 USENIX Annual Technical Conference.

When the guest and the host have the same architecture, QEMU can hand the processor work to the Linux kernel’s KVM module and use the hardware virtualization built into modern chips. KVM is the hypervisor most commonly used with QEMU on Linux (see The Virtualization Revolution). It also powers the Android emulator in Google’s Android SDK, and it is the usual way to run software for old or unusual processors (see Emulation and Retrocomputing). The project has long since been run by others.

Pi on a Desktop

On 31 December 2009 Bellard finished computing pi to about 2.7 trillion decimal digits, roughly 123 billion more than the previous record. That record, about 2.6 trillion digits, had been set in August 2009 by Daisuke Takahashi at the University of Tsukuba on a supercomputer in 29 hours. Bellard used one desktop PC: a 2.93 GHz Core i7 with 6 gigabytes of memory and five 1.5-terabyte hard disks running Fedora Linux, which cost less than €2,000. The computation with the Chudnovsky formula took 103 days, checking the binary result 13 days of single-PC time (actually run in 34 hours on nine computers), converting it to decimal 12 days and verifying that 3, for 131 days in all. He announced the record in early January 2010. Bellard said he had done it mostly for fun and that his method was about 20 times more efficient than earlier ones. Alexander Yee and Shigeru Kondo, also on a single but much larger machine, passed him with 5 trillion digits in August 2010.

In the Browser and on the Air

In May 2011 Bellard published JSLinux, a PC emulator written in JavaScript that booted Linux in a web browser in a few seconds, with a shell, his QEmacs editor and TCC. He wrote it to show what the new JavaScript engines could do. Later versions emulate RISC-V and 64-bit x86 machines and run Windows 2000 and X Window in a browser tab.

In 2012 he co-founded Amarisoft with Franck Spinelli. Its product is a 4G LTE base station, later also 5G, that runs entirely in software on a standard PC with a radio front end; network operators and equipment makers use it for testing. He also wrote ffasn1, an ASN.1 compiler for the telecom protocols such a base station must speak, and a program that turns a PC’s VGA output into a television signal source: images are precomputed so that the graphics card’s output is a valid analog or digital (DVB-T) TV signal, which a cable carries straight into a television receiver.

Later Work

Bellard kept publishing small, complete programs. BPG (2014) is an image format built on the HEVC video codec that produces smaller files than JPEG at the same quality. QuickJS (2019), written with Charlie Gordon, is a compact JavaScript engine that supports nearly all of the current language standard and is embedded in Amazon’s LLRT runtime, CouchDB, nginx and yt-dlp. From 2019 he turned to neural networks: the lossless compressor NNCP, which uses a transformer model to predict the next symbol, went to the top of the Large Text Compression Benchmark; ts_zip (2023) compresses text with a large language model; TSAC (2024) compresses audio at very low bit rates; and his company’s TextSynth service offers access to language models. In 2025 he released MicroQuickJS for microcontrollers.

He received an O’Reilly Open Source Award in 2011 for QEMU and FFmpeg.

📚 Sources