| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A Windows 10/11 software implementation of "Dolby Digital Live": a virtual 5.1 audio device that accepts any multichannel PCM stream, encodes it to AC3 (Dolby Digital) in real time, and streams it as an IEC 61937 / S-PDIF bitstream out a chosen Toslink optical output to an AV receiver.
Also known as / what problem this solves: a free, open-source software Dolby Digital Live (DDL) and DTS Connect alternative for Windows — for PCs whose sound card can't encode surround to optical, so you can get true 5.1 surround over a single Toslink / S-PDIF (optical) cable to an AV receiver or soundbar. Essentially SoundPusher for Windows. Useful when "Dolby Digital Live" / "DTS Interactive" / "DTS Connect" isn't available on your motherboard or USB sound card (Realtek, ASUS Xonar, etc.).
Currently encodes AC3 (Dolby Digital, 5.1, 640 kbps). DTS Connect-style DTS output is a feasible extension — FFmpeg ships a DTS encoder; see the design notes in CLAUDE.md.
Keywords: Dolby Digital Live, DTS Connect, DTS Interactive, software AC3 encoder, real-time AC3/AC-3 encoder, 5.1 surround over optical/SPDIF/Toslink, IEC 61937 passthrough, WASAPI exclusive passthrough, virtual audio device/cable, FFmpeg AC3, SoundPusher for Windows, HTPC surround sound.
Get the latest Release:
You also need a virtual audio cable to capture surround audio — install VB-CABLE and set CABLE Input as your default 5.1 device — then connect the optical output to your receiver. Prefer to build from source? See Build below.
Optical (S-PDIF) can carry stereo PCM or a compressed 5.1 bitstream, never 5.1 PCM — so a surround stream has to be encoded to AC3 on the PC before it leaves the optical port. Many onboard sound chips don't offer this; this project does it in software.
Two components (the encoder is FFmpeg and cannot live in a kernel driver, so the work is split):
The engine's real-time design (output clock = master, lock-free ring buffer between capture and output, drift correction by periodic latency-trim) is modeled on SoundPusher (MIT), the equivalent macOS tool. The AC3 encode + S-PDIF mux uses FFmpeg (libavcodec AC3 encoder + spdif muxer + libswresample), the same engine Kodi uses internally. See third_party/reference/ for the cloned references.
engine.exe:
Config precedence: built-in defaults < config file (key=value: in, out, in_id, out_id, bitrate, safe, loopback, out_spdif, upmix) < command-line flags.
Derived from Microsoft's SimpleAudioSample (third_party/reference/wds), trimmed to a single 5.1 render endpoint and rebranded. Build (WDK 10.0.26100 + VS2022):
& "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\MSBuild.exe" `
driver\SimpleAudioSample.sln /p:Configuration=Release /p:Platform=x64 /p:SpectreMitigation=false
# output: driver\x64\Release\package\ (SimpleAudioSample.sys / .inf / .cat)# 1. Disable Secure Boot in your UEFI/BIOS (manual).
# 2. Elevated PowerShell:
scripts\install-driver.ps1 -EnableTestSigning # enables test signing + trusts the test cert
# 3. Reboot.
scripts\install-driver.ps1 # creates the ROOT\SimpleAudioSample device
# Uninstall: scripts\uninstall-driver.ps1 [-DisableTestSigning]# With the virtual driver installed (render-only + loopback):
engine\build\Release\engine.exe --loopback --in "Virtual AC3 Encoder" --out "Realtek Digital Output"
# Or, without the driver, using an existing virtual cable (works with Secure Boot ON):
engine\build\Release\engine.exe --in "CABLE Output" --out "Realtek Digital Output"Set the virtual device as the Windows default 5.1 output, play surround content, and switch the receiver to the matching optical input — it should report Dolby Digital.
Install the engine to a stable per-user location and have it start hidden at every logon, with restart-on-failure (no elevation, no Task Scheduler — a Startup-folder supervisor that runs in the real interactive session):
scripts\setup-autostart.ps1 # VB-CABLE -> Realtek (defaults)
scripts\setup-autostart.ps1 -In "CABLE Output" -Out "Realtek Digital Output" -Bitrate 640000
scripts\setup-autostart.ps1 -In "Virtual AC3 Encoder" -Loopback # when using our own driver
scripts\remove-autostart.ps1 [-DeleteInstall] # undoThis stages engine.exe + DLLs to %LOCALAPPDATA%\virtual-ac3-encoder, writes virtual-ac3-encoder.conf there (edit it to change devices/bitrate), and drops a supervisor in the Startup folder that runs engine --hidden --log and relaunches it if it exits.
Requires Visual Studio 2022 (or Build Tools) and CMake. FFmpeg shared dev libs are fetched into third_party/ffmpeg/.
# 1. Fetch FFmpeg dev libraries (DLLs + import libs + headers)
scripts\fetch-ffmpeg.ps1
# 2. Configure + build
cmake -S engine -B engine\build -G "Visual Studio 17 2022" -A x64
cmake --build engine\build --config Releasescripts\make-test-wav.ps1 # generates engine\test\test_5p1.wav (5.1 tones)
engine\build\Release\encode_wav.exe engine\test\test_5p1.wav engine\test\out.spdif
# Verify the result is real AC3 inside IEC 61937:
ffmpeg -f spdif -i engine\test\out.spdif -f null -MIT — see LICENSE. The kernel driver is derived from Microsoft's MIT-licensed SimpleAudioSample, and the engine design is modeled on SoundPusher (MIT); the engine dynamically links FFmpeg (LGPL). Full attributions are in NOTICE.md. No third-party binaries (FFmpeg, VB-CABLE) are committed — they're fetched/installed separately.
| Back | FazBrowse Home | New Git URL |