Translated from the Chinese original by Claude.
A karaoke web player I’ve been working on lately ran into backing tracks in three-channel Ogg Vorbis, with the guide melody on one of the channels. After Chrome and Edge updated themselves to 156 on 27 October, the backing went muddy and choppy as soon as it reached a section where the guide melody came in. Nothing was wrong with the files, the server or the player.
The cause: from 156 on, Chrome decodes Vorbis with Symphonia, written in Rust, instead of FFmpeg. When Symphonia 0.6.1 reads the residue and a channel has an odd number of partitions, the spare entry in the last classword is written onto the first partition of the next channel; that partition is later read with the wrong codebook, and the rest of the packet is read as garbage. My files have 39 or 5 partitions per channel, and both happen to be odd.
An engineer at Google had already sent Symphonia a fix for this [1], merged in early November. While testing, we found another problem, in the order of multichannel coupling, and submitted a fix [2], which has also been merged. The player now does its own decoding in a Web Worker with Xiph’s official libvorbis (compiled to WebAssembly) and no longer depends on the browser. A retest with Edge 158 in early December shows it’s fixed there. Below is how I tracked it down.
Environment
| Item | Details |
|---|---|
| Browser | Chrome / Edge 156 (auto-updated on 27 October 2026); Chromium 152 for comparison |
| Audio | Ogg Vorbis, 3 channels, encoded with aoTuV, 44.1 kHz; 101 songs saved for testing |
| Reference decoders | FFmpeg, Xiph’s libvorbis 1.3.7 |
| Decoder in Chrome 156 | Symphonia 0.6.1 (Rust), feature flag SymphoniaVorbisDecoding |
Symptoms
- Only in Chrome / Edge 156; fine before the update.
- Sections where the guide channel is silent sound normal; as soon as the guide melody comes in, the whole backing goes muddy and keeps cutting out.
For a moment I thought my singing was so awful it had broken the browser - Every song does it; it doesn’t play favourites.
Ruling out the files and the player
First, making sure the files hadn’t changed: the original source, my server and the file the browser downloaded all have identical SHA-256 hashes, and the files haven’t been touched since 2023.
Then I wrote a test page: decode the same file with the browser’s decodeAudioData(), subtract the PCM that FFmpeg decodes from it, sample by sample, and see how big the difference is.
Chromium 152’s output is identical to FFmpeg’s. Edge 156’s error is only 5–7 dB below the music itself, which means the whole thing is decoded wrongly, not just a little off. Like playing a song while someone runs the hoover right next to it
The problem is already there at decodeAudioData(), before the player’s own mixing gets a look in, so the player is ruled out too.
Chrome 156 has a new Vorbis decoder
Comparing the source of 155 and 156: Chromium’s bundled FFmpeg barely changed (just one commit, to do with H.264), but 156 adds the Symphonia decoder, written in Rust and controlled by the feature flag SymphoniaVorbisDecoding. Chrome had already tried Symphonia out on FLAC; this time it was Vorbis’s turn.
Decoding the same file locally with Symphonia 0.6.1 gives exactly the same output as Edge 156: the difference between the two is 136.7 dB below the signal, nothing but floating-point rounding. So the problem is in Symphonia. Mystery solved: it’s written in Rust, so it put the data in the wrong place in a perfectly memory-safe way
The cause: partition classifications written past the end
First, a quick word on Vorbis residue (section 8.6.2 of the spec) [3]. Each channel’s spectral residue is cut into fixed-length partitions, and each partition has a classification, which decides which codebooks are used to read that partition’s data. Classifications aren’t stored one by one: several are packed into a classword and read together.
Symphonia keeps the partition classifications of all channels in one array, one stretch per channel. After reading a codeword, it writes all the classifications in it into the array, but the slice it passes in isn’t cut off at the end of this channel:
1 2 3 4 5 6 | decode_classes( code, parts_per_classword, self.setup.residue_classifications as u32, &mut self.part_classes[part_first + i * parts_to_read..], ); |
In these files each codeword holds 2 classifications. When the number of partitions is odd, the spare entry in the last codeword lands on the first partition of the next channel. Overstepping its jurisdiction, quite literally
Classifications are read only in the first pass (pass 0) and reused in the passes after it. The overwritten partition has already been read with the correct classification in the first pass, but from the second pass on it has a different classification and is read with the wrong codebook. Vorbis data is one continuous stream of bits: read one partition wrongly and you read the wrong number of bits, and everything after it in the packet is garbage. When the spare entry happens to be the same as the original classification, no harm is done.
My files have 39 or 5 partitions per channel, both odd, so every song gets hit. Test files made with libvorbis’s own encoder have 22 or 6, both even, which is why ordinary testing doesn’t catch it.
Cut the slice off at the end of this channel’s range, and Symphonia’s output matches FFmpeg’s (difference −137 dB):
1 2 3 | - &mut self.part_classes[part_first + i * parts_to_read..], + &mut self.part_classes + [part_first + i * parts_to_read..(i + 1) * parts_to_read], |
As it turns out, someone had already fixed it: Symphonia #592 [1], submitted by Syed AbuTalib at Google, changes exactly this (plus an identical line in another residue type), and cites Chromium issue 574545168 [4]. It was merged in early November. All that time spent poring over waveforms, and the answer had been sitting in someone else’s PR all along
A second problem found along the way: the coupling order
To make sure nothing else was wrong, I also encoded a few dozen test files with libvorbis (1–8 channels, 8–96 kHz, every quality from lowest to highest) and compared Symphonia with FFmpeg on each one. That turned up another problem, in channel coupling. First, what coupling is.
What channel coupling is
In stereo music the left and right channels are often very alike: vocals and bass usually sit dead centre, almost identical on both sides. Which is why plenty of people can wear their headphones the wrong way round for an entire song and never notice Storing a full copy of each channel means a good deal of it is duplicated.
So encoders usually restate the two channels in another form before storing them. MP3 and AAC often use ‘sum and difference’: store the sum of left and right, then their difference; the more alike the two sides, the closer the difference is to 0 and the less space it takes. Vorbis uses something else, which the spec calls square polar mapping (sections 1.3.2 and 4.2.4 of the spec) [3]: a pair of channels becomes a ‘magnitude’ channel and an ‘angle’ channel.
Coupling is done in the frequency domain, separately for each frequency. When Vorbis decodes a frame, it first reads the rough outline of the spectrum (the floor) and each channel’s detail (the residue), then undoes the coupling, then multiplies the floor and residue together to get the spectrum, and finally turns that back into a waveform. The partition classification problem above is in the step that reads the residue; the one in this section is in the inverse coupling straight after it.
How magnitude and angle are worked out
For each frequency, take the two channels’ values at that frequency and call them x and y (x goes into the magnitude channel, y into the angle channel):
- Magnitude: whichever of x and y has the larger absolute value, sign and all.
- Angle: the difference between x and y. When the magnitude is positive it is x − y; when the magnitude is negative it is the other way round, y − x.
A few examples:
| x | y | Magnitude | Angle | Notes |
|---|---|---|---|---|
| 5 | 4 | 5 | 1 | x is a bit bigger; the difference is 1 |
| 4 | 5 | 5 | −1 | y is a bit bigger, so the angle goes negative |
| 5 | 5 | 5 | 0 | Both the same: the angle is 0 |
| −6 | −4 | −6 | 2 | Negative magnitude: the difference is taken the other way round |
| 6 | −5 | 6 | 11 | One positive, one negative: a large angle |
The more alike the two channels, the closer the angle is to 0. The angle channel is mostly zeros or very small numbers, which compress into few bits, while the magnitude channel carries most of the loudness.
Decoding goes the other way: given magnitude m and angle a, their signs tell you which side was bigger, and both values can be worked back out. Section 4.3.5 of the spec sets out exactly these four cases [3]. In Python it looks like this (the encoding half is one way of writing it that I worked out backwards from the decoding rules):
1 2 3 4 5 6 7 8 9 10 11 12 | def couple(x, y): """Encode: x goes into the magnitude channel, y into the angle channel""" m = x if abs(x) > abs(y) else y # magnitude: whichever is larger in absolute value, sign kept a = x - y if m > 0 else y - x # angle: the difference of the two, the other way round when the magnitude is negative return m, a def uncouple(m, a): """Decode: the signs of m and a tell which side was larger""" if m > 0: return (m, m - a) if a > 0 else (m + a, m) else: return (m, m + a) if a > 0 else (m - a, m) |
Take uncouple(5, -1): the magnitude is positive and the angle isn’t, so y was the bigger one; hence y = 5 and x = 5 + (−1) = 4.
Why ‘square polar’? Plot (x, y) as a point on a plane: the points with the same absolute magnitude form a square loop, not the circle of ordinary polar coordinates; the angle says where on that loop the point is.
Several coupling steps are undone in reverse
With more channels there can be several coupling steps, each carrying on from the result of the one before. Which pairs of channels are coupled, and in what order, is set out in the mapping in the file’s header. Decoding has to undo them in reverse: section 4.3.5 of the spec says to start from the last step and work back to the first [3]. Like putting on a shirt and then a coat: to take them off, the coat has to come off first. Symphonia 0.6.1: I’ll take the shirt off first, thanks
A small example with the Python above. Three channels a = 2, b = 1, c = 5; couple (a, b) first, then (a, c), and the file stores a = 5, b = 1, c = −3:
- Backwards: undo the second step first, giving a = 2, c = 5; then undo the first step, giving b = 1. All correct.
- Forwards: undo the first step first, but a is still the 5 left by the second step, so out comes b = 4; then undo the second step: a = 2, c = 5. b is wrong.
b: What did I do wrong?
Symphonia has the order the wrong way round
Symphonia 0.6.1 undoes the steps starting from the first. When a channel takes part in only one coupling step, the order doesn’t matter; when it takes part in several, the results come out wrong.
When libvorbis encodes 5.1 at lower qualities, it couples FL/FR, BL/BR, FL/FC and FL/BL, in that order: FL takes part in three steps and BL in two. Undo them forwards and the FL and BL that steps one and two get still have the later steps’ results layered on top, so FL, FR, BL and BR all come out wrong; the wrong FL is then carried into step three, and FC goes wrong with it.
Testing with 5.1 music encoded by libvorbis, five of the six channels come out wrong; only LFE, which isn’t coupled, is unharmed. Not that most people have 5.1 speakers at home anyway FFmpeg’s test sample vorbis/6.ogg (a 5.1 speaker test encoded with libvorbis 1.3.3), decoded with Symphonia 0.6.1, has a wrong BR channel.
The fix is a single line: walk the coupling steps in reverse.
1 2 | - for coupling in mapping.couplings.iter() { + for coupling in mapping.couplings.iter().rev() { |
I submitted this as Symphonia #604 [2]; it was merged in early November.
What to do
Browser users
Quit Chrome or Edge completely (background processes too), then start it with this command-line switch, and it goes back to decoding with FFmpeg. In PowerShell:
1 | Start-Process msedge '--disable-features=SymphoniaVorbisDecoding' |
Or type msedge --disable-features=SymphoniaVorbisDecoding into Run (Win+R). I’ve checked on Edge 158 that with this switch the decoded output really does change to FFmpeg’s.
Web developers
Don’t rely on the browser’s built-in Vorbis decoder. My player now does its own decoding in a Web Worker with Xiph’s official libogg 1.3.6 and libvorbis 1.3.7 [5] (compiled to WebAssembly with Emscripten), and uses the browser’s decoder only as a fallback.
On the 101 saved backing tracks, the difference between its output and FFmpeg’s is below −135 dB for every one. Decoding runs in the Worker, so it doesn’t freeze the page.
Upstream and newer browsers
Both fixes have been merged. On 28 November I tested again with Symphonia’s main branch after the merges: the 101 backing tracks differ from FFmpeg by −148.9 dB, and the 61 test files encoded with libvorbis all match as well.
On 2 December I decoded one of them with Edge 158: with default settings it still uses Symphonia, now −137 dB from FFmpeg, so it’s fixed; with the switch above, using FFmpeg, it’s −140 dB. I haven’t tested whether 157 is fixed. Mostly out of laziness
If you’ve run into this too
- If you’re on Chrome / Edge 156 and Ogg Vorbis plays back muddy or noisy, update to the latest version first; if you can’t update, try the command-line switch above, and if that cures it, it’s Symphonia.
- To be sure, decode with
decodeAudioData()and compare the result with FFmpeg’s sample by sample. - Files with three or more channels and an odd number of partitions per channel are the most likely to be hit; files with several coupling steps, such as 5.1, also run into the second problem.
- To play Vorbis reliably on a web page, ship your own WebAssembly build of libvorbis; then it doesn’t matter when the browser swaps decoders.
References
- [1]S. AbuTalib, “vorbis: Support >8 discrete channels and bound residue part_classes slice,” pdeljanov/Symphonia pull request #592, GitHub, Nov. 2026. [Online]. Available: https://github.com/pdeljanov/Symphonia/pull/592 ↩1↩2
- [2]computerfan, “vorbis: Fix inverse coupling order,” pdeljanov/Symphonia pull request #604, GitHub, Nov. 2026. [Online]. Available: https://github.com/pdeljanov/Symphonia/pull/604 ↩1↩2
- [3]Xiph.Org Foundation, “Vorbis I specification,” Jul. 2020. [Online]. Available: https://xiph.org/vorbis/doc/Vorbis_I_spec.html ↩1↩2↩3↩4
- [4]“Issue 574545168,” Chromium Issue Tracker. Accessed: Dec. 2, 2026. [Online]. Available: https://issues.chromium.org/issues/574545168 ↩
- [5]Xiph.Org Foundation, “Downloads,” Xiph.Org. Accessed: Dec. 2, 2026. [Online]. Available: https://xiph.org/downloads/ ↩



