I wanted a Mac utility that takes a Super Audio CD image and turns it into FLAC. Opening the ISO in ffmpeg does not work. The disc is not PCM. It is one-bit DSD, often still packed as DST. What came out of that is here. The window is Electron. A local Python process does the conversion. The album never leaves the machine.
Here is the part I am not going to dress up. I did not type this project out file by file. It is vibe coding in Cursor. I described what I wanted, looked at the result, and pasted back whatever broke on a real disc. The model is good at the skeleton. It is bad at guessing how Homebrew ffmpeg 9 behaves on a particular DSF. That is the rest of this post. Without those runs on my own Mac, the app would have stayed at “well, it opens.”
What I actually asked for
The first request was short: a macOS utility, DSD ISO to FLAC. Then I wanted MP3 as well, and a real window instead of a browser tab. Then the window turned out to be one long page, so it had to become two columns. Then Russian and English, with the system language as the default. Then a Windows build script, because “it installs on a Mac” is not yet a program.
Each of those was a plain sentence. Cursor edited the code. I built it on the Mac and brought the error text back. That is how it got to version 1.1.0.
Why the ISO will not open
SACD is Scarlet Book. The file looks like an .iso. Inside it is a DSD stream. A DSD64 disc runs at 2,822,400 Hz, one bit per sample. To fit an album, tracks are often stored as DST, which is lossless, but only for DSD. One disc can carry two areas, stereo and 5.1, each with its own listing, artist, and durations.
ffmpeg does not read that. It can read a DSF or a DFF that is already extracted. Walking the sectors, picking an area, and undoing DST is the job of sacd_extract from sacd-ripper. That program is GPL-2.0, and it is not in the Kedr tree. The installer downloads the sources and builds a binary next to the app. Kedr itself is MIT. I did not want those two licenses mixed in one repository.
Then the honest limit. FLAC and MP3 store PCM. You cannot put a bit-perfect SACD into them. If you could, the output would be a DSF. Kedr writes a file a normal player will open, and it copies the tags off the disc.
How the pieces connect
sacd_extract prints the table of contents and pulls the chosen tracks out as DSF, decoding DST on the way. ffmpeg then turns the DSD into PCM.
FLAC defaults to 176.4 kHz, 24-bit, a 40 kHz lowpass, and compression 8. The lowpass is not there for taste. DSD carries modulation noise above the audible band, and keeping all of it makes a strange spectrum and a bigger file. You can keep 352.8 kHz and skip the extra downsampling. The files just get fat.
MP3 is LAME, 320 kbps by default, 44.1 kHz, and a 20 kHz lowpass. MPEG does not store anything above 48 kHz. It also does not store 5.1, so if the output is MP3, Kedr will not even start extracting a multichannel area. Temporary DSF files are deleted after a successful track. If you hit stop, whatever was already written stays in the folder.
Where vibe coding stopped and the disc started
A synthetic tone was all green. A real SACD killed track one with Track 1: Conversion failed! On ffmpeg 9.0 from Homebrew that is the last line of almost any failure, so the message had to be thrown away and the log read upward. The next run said something else: Terminating thread with return code -22, which is Invalid argument from a filter thread. Three separate bugs were sitting under it.
The cover. A DSF often has an ID3 picture. ffmpeg treats it as a second video stream. Send everything into FLAC and ask for 24-bit audio, and that bit depth gets applied to the picture too. The encoder falls over. The command now takes audio only, -map 0:a:0.
The channels. A DSF header has a channel layout type and a channel count. On some multichannel areas, sacd_extract writes the type as stereo while the file has five or six channels. ffmpeg 9 does not forgive that. If the type and the count disagree, Kedr sets the type to 0, which means “trust the count.”
The rate and SoX. The DSD decoder emits PCM at the header rate divided by eight. For DSD64 that is 352,800 Hz. A 40 kHz lowpass computed as an integer filter at that rate, plus SoX at too high a quality, produces the same -22. The lowpass is calculated in double, SoX precision is dropped to a level where it still works, and if SoX still refuses, the track is encoded once more with the built-in resampler. If the lowpass sits above the Nyquist frequency of the rate you picked, the app lowers it.
You cannot invent this in a chat. Until there is a disc on the desk and a specific ffmpeg, the model will confidently emit a “correct” command that passes on 6.1 and dies on 9.0.
The window
Electron is only the frame: the track list, FLAC or MP3, the rate, the lowpass, the folder. Python from the standard library, with no extra packages, serves a page on 127.0.0.1 and does the work. The file dialogs are the system ones.
The first layout was a single long page. You had to scroll to reach the button. Now the disc and the tracks are on the left, the settings are on the right, and the convert button stays at the bottom. On a narrow window the columns stack again.
The language on first launch comes from the system. Russian and English are supported. Anything else becomes English. The switch in settings is remembered. Album folder names stay in the language of the disc, not the language of the interface. If the cover is in Russian, the folder is in Russian.
The same page runs without Electron.
python3 -m kedr info "Album.iso" python3 -m kedr convert "Album.iso" -o ~/Music - mode stereo - rate 176400 python3 -m kedr convert "Album.iso" -o ~/Music - format mp3 - bitrate 320 The build, including the one that did not build
On a Mac, one script installs cmake, libxml2, ffmpeg, Python, and Node, builds sacd_extract, and drops a shortcut in ~/Applications. The first run on a machine where Homebrew was already set up failed with “libxml2 is required,” while brew install libxml2 insisted it was already there. The formula is keg-only. The headers are not in /usr/include. They live inside the Homebrew prefix. The script now passes that path itself.
Windows has its own PowerShell script. winget installs MSYS2, Python, Node, and ffmpeg. sacd_extract.exe is built with the UCRT64 compiler, and a shortcut lands on the desktop. There is no signed installer. Electron sits in the project folder, and the shortcut launches it from there, so it is better not to move that folder after installation.
The short version of the method: Cursor will carry a project like this as long as you bring it real errors, and not a request to “make it good.” It put the skeleton, the window, the languages, and the installers together quickly. The three ffmpeg crashes on a real SACD had to be caught by ear and by the log, and only then pasted back into the chat.




