LEX-FRIDMAN · 2026-05 AI & TECH
LEX-FRIDMAN · EPISODE DECK

FFmpeg & VLC

The invisible backbone of video on the internet

Jean-Baptiste Kempf & Kieran Kunhya · President of VideoLAN (VLC) & FFmpeg core contributor

Jean-Baptiste Kempf (VLC) and Kieran Kunhya (FFmpeg) take Lex through the invisible plumbing of internet video — what happens between "press play" and "see pixels," why every video…

FFmpeg: The Incredible Technology Behind Video on the Internet | Lex Fridman Podcast #496
FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

Why this episode matters

A four-hour conversation about software that almost no one notices but everyone depends on.
The plumbing
YouTube, Netflix, Chrome, Discord — >90% of video pipelines run through FFmpeg
The volunteers
5 people maintain VLC. 10–15 maintain FFmpeg. Used by billions.
The lost art
240,000 hand-written assembly lines in dav1d — 62× faster than C
The drama
Google AI security reports. Microsoft Teams SLA demands. CIA Vault 7.
The ethics
JB turned down "obscene" offers to keep VLC ad-free. Refused two backdoor requests.
The future
AV2 codec, 4 ms glass-to-glass robotics, stereo smell, "VLC for Neuralink"
FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

The cone

The VLC traffic-cone icon is one of the most recognized logos in software — and JB describes the strange leverage it gives a tiny project.

"I go to middle of nowhere in India or in China, people know the cone."

"25% of the website traffic that comes to our main website is cone player."

People literally Google "cone player" instead of "VLC".

Lesson

An absurd mascot beats a tasteful one. A play button on a TV is unoriginal. A construction cone is weird, bright, and unforgettable.

When the team once joked about replacing it on April 1st, they got ~10,000 emails begging them not to.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

The weirdest things VLC opens

A VideoLAN conference contest: build the worst file possible. VLC plays it anyway.
VHS via capture card
People still use VLC to digitize VHS tapes through analog capture cards.
MKV that changes everything per frame
"Each frame was changing resolution, aspect ratio, rotation." It worked.
Subtitles as the video
Every frame is black; the entire animation is rendered as SSA subtitle overlays.
Game codecs from one disc
Bit-exact reimplementation of a 10-second Star Wars game intro that exists on one disc.
DVD-Audio
Custom encryption schemes. No one else still supports it. VideoLAN spent a summer.
A pancake in the DVD drive
They actually tried. They have video. It did not work.
FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

Press play → pixels

What actually happens when you double-click a file:

The OS hands you a byte stream from a path or URL.
A demuxer splits it into audio, video, and subtitle tracks.
The player probes each codec to decide GPU vs CPU.
The decoder unpacks entropy coding, runs the inverse transform, applies intra and motion prediction.
Raw YUV pixels go to the GPU; raw PCM samples go to the audio card.

"Every sentence is someone's lifetime's work. There are books about every sentence."

— Lex on the pipeline

Press play → pixels & sound1. URL / file / DVD → byte stream2. Demux: split audio / video / subs3. Probe codec: GPU? CPU fallback?4. Decode: entropy → transform → predict5. Raw YUV → GPU / speakersEvery sentence is someone's lifetime of work
FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

Containers vs codecs

Two different layers, perpetually confused — even on purpose by the industry.

Container (a.k.a. mux)

A wrapper holding multiple tracks of compressed data.

MP4 · MOV's open descendant
MKV / Matroska · open, future-proof
AVI · the old Microsoft format
TS · MPEG transport stream for satellite

Codec (a.k.a. coder/decoder)

The math that compresses/decompresses one track.

H.264 · also called MPEG-4 Part 10 / AVC
HEVC · H.265
AV1, AV2 · royalty-free family
AAC · de facto MP4 audio

JB on the confusion: "It's completely the fault of the industry to make things difficult to understand." H.264 is MPEG-4 Part 10 is AVC — three names, one codec.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

Don't trust the file extension

VLC inherits a paranoid streak from its 1990s ancestor: a UDP multicast streaming client that had to play broken inputs from a noisy network.

So today VLC and FFmpeg ignore what the filename claims.

"Everything in VLC is prepared to work with broken files. And it's a philosophical idea from the beginning."

"You don't trust your inputs, and this is very important into the security."

Why VLC got famous in the 2000s

AVI files distributed online were often downloaded incomplete — the metadata sat at the end of the file.

Every other player refused to play them. VLC said: "this is broken, but I'm still going to try."

The .mp4 extension is just a hint that bumps a module's priority. Real probing happens by looking inside.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

The math: 100× to 1000× compression

Compression isn't ZIP. It's controlled degradation tuned to human perception.

Audio

~10×
raw → MP3

Video typical

100–200×
"You need to remove all the details that you don't care about"

Video target

1000×
"The target is 1,000x"

JB's framing: "Compression is not like a ZIP. A ZIP, you have data in, you get data out. Here we are degrading the signal."

All of it is built around one constraint: the output is for human eyes and ears.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

Why YUV, not RGB

Every video codec works in the YUV color space: one luminance channel plus two chroma channels. It's not how cameras capture or screens display.

It's the model that matches the human eye.

"Inside your eyes you have the cones and the rods… some look on brightness and more on the others on colors."

"We scale down the resolution of the color compared to the brightness. Most people don't see it, and it divides the size by two."

The trick

The eye has far fewer color receptors than brightness receptors.

So codecs throw away half the color resolution, and your brain doesn't notice. Free 2× compression before the math even starts.

Then the heavy math

DCT (cousin of Fourier), block partitioning, quantization, entropy coding — all stacked on top to drive 100–1000× ratios.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

Every generation: ~30% better, 10–100× harder

The headline gain

Each new codec generation gives roughly 30% less bitrate at the same visual quality.

JB: "Each generation of the codec is like thirty percent less for the same quality."

The hidden cost

Kieran's correction: "An order of magnitude, perhaps even two orders of magnitude more compression power."

CPU power needed to achieve that 30% gain explodes generation over generation.

Modern codecs aren't codecs — they're toolboxes

AV1, AV2, VVC are collections of tools. A Zoom call sharing a slide deck and then a video clip needs different coding strategies. The codec switches its toolset to match the content.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

FFmpeg is a language

The command-line tool isn't a wrapper — it's a small DSL for multimedia processing.

"It's a language. It's an actual language." — JB

People build pipelines with thousands of characters on a single line. There's now a cottage industry of LLMs that generate FFmpeg commands.

JB: "There is a ton of people who are using AI to generate command lines for FFmpeg because you have no idea what it is."

What ships under the name

ffmpeg · the command-line transcoder
ffprobe · inspect any file
libavcodec · the codec library
libavformat · containers, muxers, demuxers
libavfilter · the filter graph
libswscale · scaling and color conversion

The same library underneath Chrome, OBS, smart TVs, professional broadcast boxes, the Mars 2020 rover, and ffmpeg -i input.mp4 on your laptop.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

One stack, level playing field

"It's incredible that your home videos, your, your grandmother's home videos and trillion-dollar corporations effectively are on a level playing field using the same technology stack."

— Kieran on FFmpeg's reach

Inside the trillion-dollar shops

Some use the C API. Others maintain three-thousand-line FFmpeg command lines in production.

The democratization story

In the 1990s, professional video compression required "equipment that cost hundreds of thousands of dollars… it was the size of a car."

Now anyone with a laptop has the same toolkit.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

Open source = the recipe and the oven

JB's analogy: a closed-source product is a finished chocolate cake.

Open source is the cake plus the recipe plus instructions for building the oven plus permission to modify it and sell it on.

"Software is just a very long recipe of small instructions. Computers are not very clever. They go very, very fast."

"We work for the greater good. We work for everyone, and that is what open source is."

Two big license families

Permissive — MIT, BSD, Apache. Do whatever, no obligation back.
Copyleft — GPL, LGPL, AGPL. Modifications must come back.

VLC core and FFmpeg are LGPL. You can ship them inside a closed app — but any changes to the library itself must be published.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

Re-licensing means hunting down every contributor

Open source projects have joint copyright. Changing licenses means asking everyone.

To move VLC's core from GPL to LGPL, JB had to contact more than 350 contributors, going back over a decade.

"Most of the times they don't even care. They wanted to help VLC."

But sometimes contact info was a dead email. JB traveled in person to track people down.

The hardest signature

One contributor had died. JB went to the man's father — a factory worker — to explain why he needed a signature on his son's code.

"I had to explain all those types of open source meanings, and no, I was not a company trying to rip out the two lines or five lines that that guy did."

"I was almost in tears, right? It's very difficult, right? We are talking about lives of people."

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

The Linus bar

JB defends the legendarily harsh tone of kernel-style code review — and connects it directly to the maintenance load.

"The core community of VLC is five people. The core community of FFmpeg is ten to fifteen."

"We are the ones who are going to maintain your code. It needs to be maintainable. It needs to be excellent."

1% retention math

Roughly 1,000 contributors over a project's life, but only ~10 stay.

"You will have change of job, change of wives, you have children, you have accidents in life. You're not going to come back. It's most likely."

So the bar can't bend — the survivors will inherit your code.

Kieran: in real life, the community is generous. Online, the curt tone is a tired engineer after a day job, often a non-native English speaker. "Not something to take personally."

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

We don't care who you are

"The important thing is, is your code good? We care about excellent code. We don't care who you are. Like maybe you're a dog. I don't care, right? I don't care where you come from. I need to look at your code."

— Jean-Baptiste Kempf

The flip side

"Oh, yeah, but I'm an engineer at this very large company in Italy, in Germany, in the US." "We don't care."

A title doesn't waive the bar.

Why it matters

This is the social contract that makes a Syrian war zone contributor and a Stanford PhD equivalent on patch day.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

Refusing tens of millions to keep VLC clean

The Reddit meme is real — JB has repeatedly turned down "dozens of millions of dollars" to put ads, toolbars, or spyware into VLC.

"The last offer I had was obscene."

"If we had to compromise our software, we would shut it down. This is clear."

It wasn't about money

"I'm not against money, right? I created several startups."

The deal-breaker was the shadiness — bundling spyware, hijacking search engines, replacing ads.

The counterfactual

"If Netflix arrived at some point and said, 'Well, we want to put Netflix inside VLC,' probably the story would have been different."

But it was always "shady ads companies" who showed up.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

VLC's accidental origin

A 1990s LAN built for Doom became the player on six billion devices.

1994–95 · Students at École Centrale Paris run their own campus. They want better network for Doom and Duke Nukem.
Network 2000 · One satellite dish, one decoder, MPEG-2 streamed over a 155 Mbps ATM ring. Demo crashes after 45 seconds; the demo was 40 seconds.
VideoLAN · Two students keep going. The "VLC" was the VideoLAN Client.
2001 · Open-sourced after a three-year fight with the school.
2003 · JB joins, eventually moves it into an independent nonprofit.
VLC's accidental origin1994-95 · Students want fast LAN for DoomÉcole Centrale Paris · campus run by studentsNetwork 2000 · MPEG-2 over a 155 Mbps ATM ringOne big dish, one decoder, video over the LANVideoLAN project · the client = VLCOpen-sourced in 2001 after a 3-year fight with the school2003 · JB joins, lifts VLC out as a nonprofit6+ billion downloads later — still ad-free, still client-side
FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

The Google AI security debacle

Google began running AI-generated security scans against FFmpeg. The reports came with a 90-day industry deadline and were announced to the press before fixes could land.

"It's announcing how good their AI is… without really understanding the nature of volunteer-driven development."

The "critical vulnerability"? A bug in "an obscure 1990s game codec".

Kieran's framing

"The padlock on your home is there to protect against the capabilities of what it's there to protect. It's not there to protect nuclear secrets. It's not there to protect Fort Knox."

Crying wolf

"At some point, the security industry needs to realize you can't keep crying wolf like this."

Everything is marked high, high, high — until people start ignoring the alerts.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

The Microsoft Teams "high priority"

An FFmpeg tweet, quoted verbatim by Lex on the show:

"The XZ fiasco has shown how a dependence on unpaid volunteers can cause major problems. Trillion-dollar corporations expect free and urgent support from volunteers. Microsoft Teams posted on a bug tracker full of volunteers that their issue is high priority. After politely requesting a support contract from Microsoft for long-term maintenance, they offered a one-time payment of a few thousand dollars instead."

Kieran: "They think an open source project is a traditional vendor that they have an SLA. They think a public bug tracker is actually… a third-party vendor's Jira."

JB: VLC isn't even in Microsoft's ISV program. "I am not part of Microsoft ISV programs. I don't have a point of contact at Microsoft."

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

The rap battle theory of open source

The FFmpeg account on X has become a public-pressure tool. Kieran calls it what it is.

"It's a rap battle at the end of the day."

"You say stuff. I say stuff about your mama, but it doesn't mean… I have an actual personal issue with her."

The shitposting worked. Google now sends patches. They built reward tools for fixing issues.

The Android Play Store fix

For over a year, a Play Store bug blocked VLC updates for 100M Android users.

JB tweeted that VideoLAN would stop distributing on Android. Within days, someone from Google reached out.

"The only very strong power we have to solve those issues is blaming on social networks because it snowballs."

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

Why anyone contributes at all

Because video is cool

JB: "Work on something you love."

Many contributors arrive through anime fansubbing — a culture that needed tools the commercial world wouldn't build.

Because it's the best school

"If you're good in C, in FFmpeg, if you know how to write assembly, I assure you you're going to be one of the best programmers ever, even if you're working on writing TypeScript."

Because grandma understands

"If you go to see your grandma and say, 'I do this so that you can play video on your laptop,' they understand."

Because the world is a museum of passion projects

Kieran's favorite line, attributed to John Collison.

Open source amplifies the network effect — passion plus reach.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

16 milliseconds, no excuses

What makes multimedia engineering different from most software:

"You have 16 milliseconds to display a frame. It's not like a game engine where you can basically slow down and wait a frame."

Miss a frame and the codec's dependency chain destroys downstream frames too.

What "good engineer" means here

You can't just write functionally correct code. You have to understand:

· CPU pipelining
· SIMD instruction sets
· ALU / FPU behavior per generation
· I/O timing and caches
· The memory hierarchy: L1, L2, L3, RAM, SSD, disk

JB: "This is what I think that is missing to a lot of engineers and software engineers today, is understanding what we call computer architecture."

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

A binary star system

VLC and FFmpeg are not competitors. They are not parent and child. They orbit each other.

FFmpeg gives VLC the codec engine: hundreds of formats, decades of edge cases.

VLC gives FFmpeg reach: billions of users surface weird files that no test suite would ever generate.

VideoLAN ships x264, dav1d, checkasm, libdvdcss, libbluray, libspatialaudio — many feed back into the FFmpeg pipeline.

"VLC is to FFmpeg as Android is to Linux." — Kieran

A binary star systemVLCclient · reach · weird filesFFmpegcodecs · filters · libsdepend on eachotherx264 · dav1d · checkasmshared developers & infrastructure
FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

The eras of FFmpeg

Kieran's "Eras Tour" of who carried the torch when.

1990s · Fabrice Bellard

Creates the concept. The seed.

2000s · Michael Niedermayer

Native decoders for every weird MPEG-4 Part 2 variant. Kills the codec-pack era of "DLL from this place, DLL from that place."

Late 2000s / 2010s · Reverse-engineering golden age

Benjamin Larsson, Kostya Shishkov, Paul Mahol on Windows Media, RealMedia, GoToMeeting.

x264 era · Loren Merritt, Henrik Gramner, Måns, Jason, Anton

The assembly culture that later powers dav1d.

Kieran on Michael's work: "This task in the 2000s that Michael did was Sisyphean." A Chinese CCTV system using one weird MPEG-4 ASP variant — fix it without breaking anyone else — times a million.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

Reverse engineering as archaeology

How do you decode a closed-source codec in 2010 so a kid on Android in 2030 can still play the file?

You open the binary in a disassembler, find the decoding loop, dump raw YUV from the original player, and step instruction by instruction — for tens of megabytes of code.

Lex's metaphor: "You're like archaeologists with a little brush trying to reconstruct the entire human civilization."

Why it's a black box

For a long stretch, nothing visible appears. Entropy decoding, intra prediction, motion prediction, IDCT, deblocking — all happen before a single pixel is correct.

Kieran: "You may have the buffer that the coefficients are stored in completely wrong, and so you may be going down a complete rabbit hole."

Reference: a 1 MB binary blob ≈ a month of full-time reverse engineering.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

Kostya: the binary specification wizard

Kostya Shishkov — Ukrainian, lives in Germany, in love with Sweden. Reverse-engineered binary blobs 20–30 MB in size.

JB: "He was able to reverse engineer extremely complex codecs… we do a bit of engineering with Kieran, but clearly not at this level."

Kieran: "He looked at the world as a binary specification. He didn't need documentation or anything. 'I have a binary and I can figure all of this out.'"

The GoToMeeting story

For years, the #1 feature request in VLC was playing GoToMeeting recordings — an obscure proprietary screen codec.

JB put up a bounty. Kostya said "okay" and shipped it in two months.

The code is filled with jokes referencing JB and Kostya. Reverse engineering as performance art.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

FATE: not a matrix, a pivot table

The FFmpeg Automated Testing Environment runs every commit across an absurd matrix:

macOS 10.7 → 26
Windows XP → 11
iOS 9 → 26
Linux, BSD, Solaris, OS/2
x86, ARM, RISC-V
PowerPC, DEC Alpha
GCC, Clang, MSVC, Intel
AVX-512, SVE, SME

Kieran: "It's not just a matrix at this point. It's like a pivot table of different combinations."

Why it has to exist

C compilers miscompile. A bug in GCC 11 on Mac can silently produce wrong output, and small bit-errors cascade across the GOP into visible glitches.

All volunteer-hosted

The Macs at the top of the dashboard live in Kieran's office. Other machines live in other people's homes.

VLC's last release still runs on Windows XP, macOS 10.7, iOS 9, and OS/2 — supporting "more OSs than Microsoft or Google or Apple."

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

dav1d: peak video codec

The AV1 software decoder the VideoLAN team built when everyone said AV1 was "too complex for software."

The motto, from Henrik, Ronald, Martin, JB and the rest: every cycle matters.
Why? Because dav1d runs on roughly 3 billion devices decoding video nonstop.
30% of Netflix's video catalog is now AV1.
50% of YouTube is AV1.
Most devices have no hardware AV1 decoder, so software has to be brutal.

Result: a phone with one or two cores can decode 720p AV1 in real time.

dav1d: peak video codec79.9% Assembly240,000 handwritten lines19.6% C30,000 lines0.5% other
FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

62× faster than C

The tweet that radicalized Karpathy.

One function

62×
handwritten SIMD vs the C version of the same function

Typical SIMD gain

10–50×
not 10%, not 50% — multiples

Compiler auto-vectorization

multiples
slower
"It's not like 5%, 10% slower. It's multiple times slower."

The recurring online argument from the C++ crowd: "No, intrinsics is fine. The compiler can do this. Auto-vectorization, it's your fault."

The recurring FFmpeg reply: hundreds of examples of handwritten assembly beating the compiler by orders of magnitude.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

We abuse the machine

dav1d isn't just "well-tuned assembly." It does things the CPU designers never intended.

"We abuse the machine. We go and use the machine in ways that the creator didn't expect."

"Sometimes we use an instruction that's completely unrelated to what we do. We use a cryptography instruction in video processing to do nothing related."

Custom calling conventions

dav1d ignores the OS calling convention inside its own library — saves registers it shouldn't have to, skips the L1/L2 round-trip the ABI requires.

"I've never heard any other project than dav1d doing that. This is why Kieran calls it an art."

One assembly file per ISA

x86, ARM, RISC-V, AArch64, SVE, SME, AVX-512 — each gets its own handwritten assembly, with runtime CPU detection to pick the right one.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

Why bother, post-Moore's-law?

The cultural pushback: "Why hand-write assembly when we have vibe coding?"

JB's answer is structural, not nostalgic.

"We passed the time where hardware was going so much faster. We are at the end of Moore's law."

"Our request for power, CPU power, GPU power are exploding while the hardware is not exploding in speed."

Why dav1d in particular

It runs billions of hours per day. A 10× win at this scale pays for itself in electricity alone.

Where JB sees AI going

"The core thing that you will not be able to vibe code are optimization for the hardware to be as fast as is possible."

LLMs barely know what bit-exact means in assembly — yet.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

The assembly wizards

Two people who hold the world's deepest active knowledge of SIMD.

Henrik Gramner

Sweden. The x86 wizard.

JB: "When we ask questions at Intel about things, they tell, 'Why are you asking us, Intel? You have Henrik. Henrik knows better.'"

He knows the cycle counts of every SIMD instruction across every Intel generation — P4, Nehalem, Core 2, modern.

Martin Storsjö

Finland. The ARM/Neon wizard.

JB on Martin: "He codes in assembly on his phone, editing it with the crappy keyboard, like virtual keyboard you have while watching his kids play in the playground."

Wizard-level on iOS and Android decode paths.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

Teenagers vs Google engineers

A Google employee on X commented "as a teenager running this account" — referring to the FFmpeg account.

Kieran's reply, quoted on the podcast:

"Teenagers have written more assembly in FFmpeg than Google engineers."

And it's true

Felix — joined VLC at 16, now runs Mac and iOS
Edward Wang — Google Code-in student at 14, stayed three years
Daniel Kang — wrote thousands of lines of assembly as a high schooler
Ruikai Peng — at 16, fixing security issues in FFmpeg by quietly sending patches

The 16-year-old "didn't play the alarmist CVE heist." Just fixed it in Git after three days. Kieran: "the kids are all right."

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

Rust: a better C++, not a rewrite

JB has shipped Rust modules in VLC and built his new startup Kyber largely in Rust. He's not anti-Rust.

He's anti-rewrite.

"Rust is extremely good… a better C++ that cares about memory and allows you to do things about memory ownership that no one else can do so far."

"It's great when you start a new project from scratch. But it's very not good when you interop with existing parts."

The 80% trap

"You arrive very quickly at eighty percent, then ninety percent takes a bit more time, and then you got the last ones." Like the Rust coreutils rewrite that's missing the last 1% that's 99% of the work.

And the assembly catch

"Even if I rewrite the C part in Rust, for security reason, you break all the security when you write handwritten assembly because we can jump anywhere."

Memory safety stops where the hand-written assembly starts.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

Reading code is harder than writing it

"It is an order of magnitude easier to write code than read code. And you see that also with LLM. They can write code, but analyzing is a lot more difficult."

— Jean-Baptiste Kempf, on why every rewrite eventually regrets

The self-trap

"Imagine I am at my maximum intellectual efficiency in programming, and I write the best code ever. I will not be able to understand it myself six months later."

The implicit knowledge problem

"You arrive, you don't understand all the wisdom, all the business logic, the reasons that were done that is maybe not documented."

The implication for the LLM era: code generation is the easy part; understanding existing systems well enough to evolve them safely is the hard part.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

Open source burnout

JB now maintains a "ton of multimedia and non-multimedia libraries" — not by choice. Original maintainers got fed up and walked.

The XZ fiasco: "There was one guy maintaining it, and he got basically hammered by two attackers who were asking him questions nonstop at weird times at night to block him."

He cracked, handed over commit access, and the attackers got their backdoor.

The Nebraska problem

Lex's xkcd reference: "All modern digital multimedia infrastructure, and then that thing at the very bottom that everything relies on is FFmpeg."

LibXML, time zones, FFmpeg itself

One maintainer for LibXML (now none).

One person for the world's time zone database.

Five for VLC. Ten for FFmpeg.

Daniel Stenberg of curl coined "AI slop" for fake bug reports. The new burnout vector isn't trolls — it's automation.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

Death threats over a PowerPC port

Around 2009–2010, VLC was nearing its 1.0 release. The team was four people. Apple had long since moved away from PowerPC. JB decided VLC would drop the port.

A letter arrived with powder inside it — anthrax-style.

"You, you piece of shit, you should die, PowerPC forever."

The powder turned out to be flour. JB's mother freaked out; they went to the police.

What it forged

"I'm quite happy that this happened at that time. It forged me a lot. I can take a lot of hate on me. I'm okay with it."

And the flip side

"I legitimately hundreds, probably thousands of times in my life had a smile on my face because FFmpeg made me happy, period. And how many times did I get a chance to say that? Zero." — Lex

This is partly why the FFmpeg account exists.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

The CIA had a custom build of VLC

In the 2017 WikiLeaks Vault 7 leak, VideoLAN learned that the CIA had been shipping a slightly-modified copy of VLC.

The normal VLC binaries, with one extra DLL: psapi.dll.

The DLL silently read your Documents folder, encrypted the contents, and exfiltrated them — while you watched a movie for 2 hours.

Why it was clever

People expect VLC to spin up fans and use CPU. The malware hid in plain sight under "playing HD video is hot."

The Indian-banned variant

Chinese hackers ran the same trick against Indian users. VLC got banned in India. JB had to fight in Indian courts to get it unbanned.

The hackers signed the legitimate DLL but called it from a fake vlc.exe.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

Two backdoor requests. Two refusals.

Lex: "The intelligence agencies tried to, like, say, 'Can you put a backdoor in VLC?'"

JB: "Yes. Two of them."

Lex: "What did you say?"

JB: "No. Well, I was a lot less polite."

The definition of compromise

"There is no code that gets into VLC that we don't control. We compile on boxes that are offline, where we start by compiling the compiler. We do everything offline on places that have never been connected to the internet."

The non-negotiable

"If we had to compromise our software, we would shut it down. This is clear."

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

VLC has no telemetry, no platform

The state has no leverage over VideoLAN the way it had leverage over Pavel Durov and Telegram, because VLC is not a platform.

"VLC is completely offline. It doesn't talk to any server, so we don't know anything that you're using the software for."

"There is no telemetry in VLC."

The only network endpoint VideoLAN runs is the download server.

When the US Army emailed

In the middle of the Afghan war, JB got a request: a VLC update had broken RTSP, and troops on the ground used VLC to watch movies from a central server at night.

He shipped them a custom build. "VLC is very important for the morale on the troop on the ground."

The only way VLC works with authorities: helping them play a file they already have. Never seeing the content.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

The codec family tree

Two parallel lineages, each ~30% better than the last, fighting different wars.

MPEG / ITU — H.264 → HEVC → VVC. Highest visual quality. Patent minefield: H.264 was sane; HEVC went out of hand with multiple patent pools.

Alliance for Open Media — AV1 → AV2. Royalty-free. Built by Google, Netflix, Amazon, Apple, VideoLAN, Mozilla after H.265 licensing reached hundreds of millions per year.

The encoders/decoders: x264, x265, dav1d, dav2d, AVM, SVT-AV2 — implementations of those specs.

H.264 is also MPEG-4 Part 10 is also AVC. Three names. One codec.

Each generation ≈ 30% betterMPEG / patentH.264HEVC / 265VVC / 266Alliance for Open Media (royalty-free)AV1AV2decoder = dav1d → dav2d
FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

The patent minefield

JB: "In multimedia there is a ton of patents and the licensing after H.264 became out of hand."

For HEVC, the licensing situation collapsed:

MPEG LA — the original pool
HEVC Advance — a competing pool
Nokia and others — outside all pools
Uncapped per-user fees

In France, most of those patents are invalid: France rejects software patents and the EU treats them as "mathematical patents."

When the cost broke the math

For YouTube or Netflix, HEVC licensing could mean "hundreds of millions of dollars of licensing for patents per year."

They blinked and built AV1

"At hundred million per year, you know, I could create my own codec. And this is what they did."

That's the entire reason the Alliance for Open Media exists.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

I-frames, P-frames, B-frames

Three frame types, doing different jobs in the compression tradeoff.

I-frame — a complete image, like a JPEG. The anchor.

P-frame — predicted from past frames. "I need block 5, 7, and 42 from before, plus this delta."

B-frame — bi-predicted, depends on past and future frames. Smallest payload.

JB on B-frames: "The biggest mind-blown when I started was the B-frames. The decoding order is not the same as the display order."

I-frames · P-frames · B-framesIa whole image (JPEG-like)Ppredicted from the pastBdepends on future framesDecoding order ≠ display order
FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

Intra-refresh: a stream with no I-frames

Standard streaming hits you with a giant I-frame every few seconds. Great for seeking, bad for low latency — those I-frames are huge.

Kyber and modern low-latency stacks use a different trick.

"You never have an I-frame. This is intra-refresh that we use."

How it works

Refresh a vertical slice of the image each frame. After N frames, every region has been refreshed — you've effectively reconstructed a full I-frame, but spread across time.

Why it matters

Constant bitrate. No latency spike on keyframes. The whole stream looks smooth even when packets drop.

Lex: "That's even smarter."

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

x264 and the visual revolution

For 20 years, codec research worshipped peak signal-to-noise ratio (PSNR) — a mathematical metric that rewards blurring.

The x264 hobbyists rejected it.

Two innovations: psychovisual rate distortion and adaptive quantization. Bias bits toward what the eye notices.

The validation set was a Swedish HD test clip called ParkJoy — kids running through a park with foliage, water, motion. PSNR-optimized encoders blurred it; psychovisual encoders kept the texture.

Tested on laptops, not $30K monitors

Loren Merritt's design goal: "I don't wanna test this on a thirty thousand dollar screen. I want this to look good on someone's laptop at home."

The Blu-ray takeover

A Warner Bros engineer used x264 for the Fringe Blu-ray box set. Movies like Cinema Paradiso were re-encoded with x264. Two decades later, every new codec still benchmarks against it.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

Anime was the secret patron

Before Crunchyroll, anime fans imported Japanese DVDs and ripped them. There was no commercial path.

This community needed: a clean encoder, a great player, and a way to render Japanese subtitles with diacritics.

That's how x264, VLC, and the Aegisub subtitle editor became deeply linked.

Why anime broke the codec

Anime contains gradients on flat backgrounds that produce visible banding in normal compression. Optimizations for that case ended up improving codecs for everyone.

JB on subtitles: you need official Japanese, ruby annotations (hiragana for the kanji), and an English or French translation overlaid simultaneously. The subtitle stack had to be insanely flexible.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

Adaptive streaming is mostly mundane

The dramatic stuff in video is encoding, not streaming. JB: "It is less complex than it seems compared to everything that we've talked about."

You pre-encode 7 resolutions. The player downloads small segments. If a segment takes >50% of its duration to arrive, drop a tier.

What's actually hard

Live events through satellite into a central encoder, real-time at 7 resolutions, push to CDN, layer in DRM, and serve to a thousand different devices — all without QA time.

And the audio tell

Kieran: "You can kind of notice when they move from full fat AAC to the compressed versions of AAC that use spectral band replication. You can kind of see it goes a bit tinny."

Eyes tolerate 30fps; ears don't tolerate format switches.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

Kyber: 4 ms glass-to-glass

JB's new startup — the lowest-latency video link he can engineer, for remote-controlled machines.

One QUIC/UDP socket, many tracks: video, audio, sensors, mouse, keyboard, gamepad.
Forward error correction: send a few % extra so packet loss doesn't add latency.
Re-timestamping for clock drift: when you train robotics AI on a recorded stream, the timestamps have to stay coherent across cameras.
Today: ~7 ms Windows-to-Windows. Goal: 4 ms = 240 Hz.

"The goal of Kyber is to make distance disappear."

Kyber: 4 ms glass-to-glassRobot / drone~3.5 ms NVIDIA encodeQUIC / UDPforward error correctionOperator~2 ms Intel decodeOne socket, many tracks:videoaudiosensorscommandsAll clock-aligned · re-timestamped for drift
FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

Why 4 ms matters

Use cases the conversation walks through.
Cloud gaming
A frame of input lag is a death in any reflex game. JB was CTO of a cloud gaming startup before this.
Waymo remote operators
When the autonomous stack gets stuck, "there is someone that is basically remote controlling that."
Remote surgery, defense, submarines
The expert can't always go to where the machine is. Distance has to compress to a few milliseconds.
Humanoid teleop & teleobservation
"When everything will be fully autonomous, you need to teleobserve them. You need to check what's happening."

The breakdown of 4 ms: today's NVIDIA hardware encoder eats 3.5 ms, the Intel decoder eats 2 ms. Encoder + decoder alone already exceeds the target. New encoders are required.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

The archiving community

A small, underfunded group of people quietly using FFmpeg to preserve human visual history — led by Dave Rice at City University of New York.

They funded a custom codec: FFV1. Lossless, fast software encoding, error-resilient — if a tape loses a bit, you only lose part of a frame.

They funded GPU encoding for FFV1 so museums can keep up.

The BBC Domesday lesson

The "New Domesday Book" archived UK life onto BBC Micro discs. Within 10–15 years, no one had the software to play it. Reverse engineering had to come along, years later.

And the moral hazard

Tape from the 1970s and 1980s degrades. There aren't enough working tape heads in the world to read everything. Archivists have to choose what dies.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

C is Latin

Kieran on why FFmpeg can plausibly play these archives in 1000 years:

"FFmpeg is written in C. C is the closest to mathematics you're probably gonna get. The closest to logic is — it will be like Latin. C will be like Latin."

A dead language, still readable, still teachable, still compilable.

"FFmpeg runs on Mars, so we are, we are a multi-planetary open source library."

— Kieran on the Mars 2020 rover, which compresses pictures with FFmpeg

Where else it shows up

CERN's LHC. Formula 1 paddocks. SpaceX launch monitoring. The European Space Agency. The US military.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

The future is multimedia, not "video"

JB's definition of multimedia: any digital stream feeding any human sense.

VLC already has a haptic plugin for 4D-cinema hydraulic seats. It already ships VR and XR builds.

There are codecs for point clouds, volumetric video, RGB-D for robotics. Spatial audio just got merged.

"You will have VLC for Neuralink."

"FFmpeg -i input format human brain."

— Kieran, mostly joking, partly not

Kieran: "It's like audio. You'll have a left and right nose track. You have a left and right audio pair. It's easy."

Stereo smell, on the record.

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

JB's zen

Lex asks JB how he stays calm through court orders, death threats, intelligence agencies, and trillion-dollar bureaucracies.

"I have a way of thinking about what is the worst case scenario, always. And the answer is, at the end, if I take like a chess player — am I dead? Yes or no?"

"My moral way is always like, am I dying in the end? Am I hurting someone? If the answer is no, then too bad. Oh, some lawyers are going to be unhappy. What are they going to do? Take all the money of VideoLAN? Wow. They're going to have 50 grand."

"The code — the source code is out there. It's not stoppable. Also because what we do is good and it's done for everyone."

FFmpeg: The Incredible Technology Behind Video on the Internet | AI & TECH

Core quotes

The lines worth keeping from four hours of conversation:

"We don't care who you are. Like maybe you're a dog. I don't care. I need to look at your code."

— JB · on the only filter that matters

"Every cycle matters. We are talking about probably three billion devices which are going to decode video nonstop."

— JB · dav1d's motto

"This is what peak video codec should look like. 79.9% assembly, 19.6% C, and 0.5% other."

— Lex reading the most viral FFmpeg tweet

"It is an order of magnitude easier to write code than read code. And you see that also with LLM."

— JB · why every rewrite eventually regrets

"If we had to compromise our software, we would shut it down. This is clear."

— JB · refusing two intelligence-agency backdoor requests

"FFmpeg runs on Mars, so we are a multi-planetary open source library."

— Kieran · on the Mars 2020 rover. Also: "The world is a museum of passion projects." (Kieran, quoting John Collison)
Jean-Baptiste Kempf & Kieran Kunhya

"Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program."

— Linus Torvalds, quoted by Lex at the close of Episode #496
← PodDeck