À propos
Dolby Encoding Engine Wrapper
Design et médiasProgression mesurée des étoiles
- in 24h
- 0
- in 7 days
- +3
- in 15 days
- +6
- in 1 month
- +13
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
Original
Dolby Encoding Engine Wrapper
English readme • Magyar leírás
DDP encoding has never been so easy!

Description
- drives the command line tools of Dolby Encoding Engine 6.7 and creates the intermediate files in the background, giving you a proper tool
- encodes DD, DDP, DDP Atmos, TrueHD, TrueHD Atmos, AC4, AC4 Atmos, AC4 IMS (immersive stereo) and AAC (always 2.0, mono inputs are rejected)
- re-encodes TrueHD Atmos to DDP Atmos / TrueHD Atmos / AC4 Atmos from the Atmos master (raw
.thdor a container like mkv/mka/m2ts, use-tito select the track; decoded with truehdd, DDP Atmos and TrueHD Atmos use dee_shim to stop DEE smoothing the object positions a second time) - encodes DTS:X and Auro-3D (in 24-bit DTS-HD MA, or in 24-bit FLAC, PCM and TrueHD with a harletty that reads PCM,
--codec wav; ffmpeg pipes the decoded wav, bit-exact) to DDP Atmos / TrueHD Atmos / AC4 Atmos / AC4 IMS (raw.dtsor a container): harletty decodes them into an Atmos master, which goes into DEE like a TrueHD Atmos source; harletty's DTS:X decoding is based on reverse engineering, some DTS:X layouts are marked experimental (deew warns about them), check the result. Every other format decodes DTS with ffmpeg as before (the DTS:X / Auro-3D track as its 5.1 / 7.1 bed) - reads Dolby Atmos masters directly: ADM BWF (
.wav/.bwfwithchnaandaxmlchunks) and DAMF (.atmoswith its.atmos.audioand.atmos.metadata) go straight into DEE forddp-atmos,thd-atmos,ac4-atmosandac4-ims(no truehdd, no ffmpeg), and-momeasures them;dd/ddpget a 5.1 (or-dm 2/1) render of the master from DEE - runs multiple encodes in parallel for batch encoding (see config)
- works on Windows, Linux and macOS
- automatic sample rate conversion using ffmpeg's soxr resampler in case of an unsupported sample rate
- for DD/DDP/AC4 unsupported rates will be converted to 48 kHz
- for TrueHD unsupported rates will be converted to 48 kHz if source sample rate is lower than 72 kHz, otherwise will be converted to 96 kHz
- automatic channel swapping for 7.1 sources (DEE swaps Ls Rs with Lrs Rrs for some reason)
- automatically compensates for the delay of the encoders: 256 samples for DD/DDP, 2048 for AC4, 1710 / 1702 / 1600 for AAC (up to 71 / 72–87 / from 88 kbps), 32 more when DEE does the downmix (TrueHD has none)
- works even with video inputs
- AC4
-dn(loudness measurement) doesn't support 7.1 sources - versatile delay option that supports ms, s and also frame@fps formats, parsing delay from filenames also supported
The deew tool chain page shows how deew connects ffprobe, ffmpeg, truehdd, harletty, dee_shim and the DEE tools, with the exact options it passes to each one for every format.
Requirements
- ffmpeg
- ffprobe
- Dolby Encoding Engine 6.7
- truehdd 0.6.3 or newer (only for TrueHD Atmos sources of the Atmos formats:
ddp-atmos,thd-atmos,ac4-atmos,ac4-ims; Atmos masters don't need it) - harletty 0.9.0 or newer (only for DTS sources of
ddp-atmos,thd-atmos,ac4-atmosandac4-ims, to read and decode their DTS:X or Auro-3D, and to show Auro-3D inputs as such; builds exist for x86_64 Linux (glibc 2.35 or newer), x86_64 Windows and macOS (universal). Until my pull requests to harletty are merged,deew -gtdownloads it from my fork pcrlnd/harletty-bridge: harletty'smainplus Auro-3D from PCM (--codec wav, needed for Auro-3D in FLAC, PCM and TrueHD), the universal macOS build and the version in--version) - dee_shim 0.5.0 or newer (only for
ddp-atmos,thd-atmos, TrueHD with DRCnoneor at 96 kHz, the standard profile of 7.1 DDP, 7.0 DDP, 5.0 DD and DDP and-moof 7.1/7.0); deew refuses a job that needs truehdd, harletty or dee_shim when it is older,deew -gtreplaces them with the latestddp-atmosandthd-atmosuse it so DEE doesn't smooth the object positions of the TrueHD decode a second time, TrueHD with DRCnone(the default) uses it because the TrueHD encoder has nononeDRC preset; 96 kHz TrueHD (any DRC) is encoded through it with--apodise offso it stays lossless (DEE's own encoder applies its apodising filter to 96 kHz input, which changes every sample, so dee_shim is required for it)
Where deew looks for the programs
deew looks for the programs in this order, there is nothing to set in the config:
- next to the deew executable (the DEE tools in the
deefolder next to it) - your PATH
- on macOS also
/opt/homebrew/binand/usr/local/bin(an app started from Finder doesn't get the PATH of your terminal)
config.toml and the default temp folder are next to the deew executable too. deew-gui and deew-web look for the CLI next to themselves and use its config; the macOS deew-gui.app looks next to the app (the CLI is not inside it), or in ~/Library/Application Support/deew/ when it is in Applications (see below).
macOS: deew-gui.app in Applications
With deew-gui.app in /Applications (or ~/Applications) the deew folder is ~/Library/Application Support/deew/ instead of the folder next to the app: deew-macos, config.toml, dee/ (the DEE tools, put there by hand), ffmpeg, ffprobe, truehdd, harletty, dee_shim and temp/ all live there. The tools are looked up there first, then in the PATH, then in /opt/homebrew/bin and /usr/local/bin.
- Utilities → Update and install all downloads
deew-macosthere if it is missing;deew -gt(Utilities → Download tools) downloads the tools there;-ufrom that CLI also updates/Applications/deew-gui.app. - To use the CLI in a terminal run
~/Library/Application Support/deew/deew-macos, or link it:ln -s ~/Library/Application\ Support/deew/deew-macos /usr/local/bin/deew. - With
deew-gui.appin any other folder (portable) everything stays next to the app.
deew -v shows what it found and where.
deew -gt / deew --get-tools downloads everything except DEE next to deew: ffmpeg, ffprobe, truehdd, harletty and dee_shim, only what is missing or out of date: it shows each tool's installed and latest version and what it does, and a tool found only in the PATH counts as not installed (ffmpeg is the latest stable GPL build from BtbN on Windows/Linux and from martin-riedl.de on macOS). DEE can't be downloaded, install it by hand (see below).
deew -u / deew --update updates deew, and deew-gui and deew-web if they are next to it, to the latest release (it shows what will change and asks first, -np skips the question). deew -u all also installs the missing ones. On macOS it also finds deew-gui.app in /Applications (or ~/Applications).
One folder holds everything:
| Windows | Linux | macOS | |
|---|---|---|---|
| CLI | deew.exe |
deew |
deew-macos |
| GUI (optional) | deew-gui.exe |
deew-gui |
deew-gui.app (from deew-gui-macos.zip) |
| web UI (optional) | deew-web.exe |
deew-web |
deew-web-macos |
| tools | ffmpeg.exe, ffprobe.exe, truehdd.exe, harletty.exe, dee_shim.exe |
ffmpeg, ffprobe, truehdd, harletty, dee_shim |
ffmpeg, ffprobe, truehdd, harletty, dee_shim |
plus config.toml, dee/ (dee_ddp_encoder, dee_dthd_encoder, ... license.lic) and temp/.
Dolby Encoding Engine installation
- install VisualCppRedist AIO on Windows
- install DEE 6.7, use the version that matches your OS (Windows, Linux or macOS)
- DEE 5.2.1 and older versions are not supported anymore
- put the folder of the DEE tools (
dee_ddp_encoder,dee_ac4_encoder, ...) next to deew and name itdee, or put the tools in your PATH - the Linux version of DEE doesn't include a TrueHD encoder (
dee_dthd_encoder): dthd-mac2linux can build a Linuxdee_dthd_encoderfrom the macOS one, put it into the DEE folder - on Apple silicon the macOS tools need Rosetta 2
deew (CLI) installation
with standalone build (Windows 10-11/Linux/macOS):
- grab the latest build (
deew/deew.exe/deew-macos) from: https://github.com/pcrlnd/deew/releases - on Linux/macOS make it executable:
chmod +x deew(chmod +x deew-macoson macOS) - run with:
deew(deew.exeon Windows,deew-macoson macOS)
(run the binary from terminal, doubleclicking it won't work) - on the first run it will create a config file (the tools go next to deew or in your PATH, see above)
- run
deew -gtto download everything except DEE (ffmpeg, ffprobe, truehdd, harletty, dee_shim) next to deew - updating: run
deew -u, or grab the latest build from: https://github.com/pcrlnd/deew/releases
build from source (Windows/Linux/macOS):
- install Rust if you don't have it already: https://rustup.rs
- run:
cargo install deew - run with:
deew - on the first run it will create a config file
- updating: run the same command again:
cargo install deew - after updating from deew 3.x or older generate a new config with
deew -gc(the config format changed in 5.0.0)
Usage
deew -fh(deew -hshows the same without the advanced-sps,-lpf,-s3a,-wmand-bc)
USAGE: deew [-h] [-fh] [-v] [-u [all]] [-i [INPUT ...]] [-ti INDEX]
[-o DIRECTORY] [-oi] [-on NAME] [-ot TEMPLATE] [-f FORMAT]
[--ddp-mode MODE] [--ddp-atmos-mode MODE] [--ac4-ims-mode MODE]
[-b BITRATE] [-dm CHANNELS] [-dl] [-sps SWITCH] [-lpf SWITCH]
[-s3a SWITCH] [-wm MODE] [-bc SWITCH] [-d DELAY] [-r DRC]
[-dn DIALNORM] [-in NUMBER] [-p MODE] [-k] [-kl] [-mo] [-lb] [-la]
[-np] [-pl] [-cl] [-c] [-gc] [-gt]
FLAGS:
-h, --help show this help message.
-fh, --full-help show all options, including the advanced ones
-v, --version show version and the versions of the tools.
-u, --update [all] update deew and the deew-gui/deew-web next to it,
all also installs the missing ones
-i, --input [INPUT ...] audio file(s) or folder(s)
wildcards (*, ?, **) work, quoted or not
ADM BWF and DAMF (.atmos) Atmos masters work for
dd/ddp and the Atmos formats
-ti, --track-index INDEX examples: 1, a:1, s:3
default: 0
select the audio track of input(s)
N or a:N: Nth audio track, s:N: stream index N
-o, --output DIRECTORY default: output path of the config, else the current
directory
specifies output directory
-oi, --output-to-input save each output next to its input file
overrides -o and the output path of the config
-on, --output-name NAME name of the output file, one input file only
-ot, --output-template TEMPLATE
default: {stem}, config: output.template
name of each output file, placeholders:
{stem} (name without extension and delay tag)
{name}, {format}, {codec}, {channels}, {bitrate}
{lang}, {title} (of the audio track), {track}
empty values drop out with a separator
-f, --format FORMAT options: dd / ddp / ddp-atmos / thd / thd-atmos /
ac4 / ac4-atmos / ac4-ims / aac
default: ddp
ddp-atmos and thd-atmos use truehdd and dee_shim,
ac4-atmos and ac4-ims (from Atmos) use truehdd
ddp-atmos, thd-atmos, ac4-atmos and ac4-ims also
take DTS:X and Auro-3D sources, decoded with
harletty
Auro-3D is read from 24-bit DTS-HD MA, and from
24-bit FLAC, PCM and TrueHD with a harletty that
reads PCM (--codec wav)
--ddp-mode MODE options: standard / bluray
default: run -c/--config
profile of 7.1 DDP, 5.1 and below are not affected
standard: E-AC-3 only, 384-1792 kbps
bluray: AC-3 core + E-AC-3, 768-1664 kbps
--ddp-atmos-mode MODE options: streaming / standard / bluray
default: run -c/--config
profile of ddp-atmos
streaming: 5.1 with Atmos, 384-1024 kbps
standard: 7.1 with Atmos, E-AC-3 only, 768-2048 kbps
bluray: 7.1 with Atmos, AC-3 core + E-AC-3,
1152-1664 kbps
--ac4-ims-mode MODE options: general / music
default: run -c/--config
profile of ac4-ims (stereo for headphones and TV
speakers, from 5.1 or Atmos)
music: no dialogue enhancement, DRC music_light
-b, --bitrate BITRATE options: run -lb/--list-bitrates
default: run -c/--config
-dm, --downmix CHANNELS options: 1 / 2 / 6
specifies downmix, only works for DD/DDP/AC4/AAC and
TrueHD (2 / 6)
DD, AC4 and ac4-ims will be automatically downmixed
to 5.1 in case of a 7.1 source
AAC output is always 2.0
-dl, --disable-lfe remove the LFE channel of 5.1 and 7.1 inputs
DD and DDP get a real 5.0 or 7.0, the others keep a
silent LFE
5.0 and 7.0 inputs are supported, they have no LFE
-sps, --surround-phase-shift SWITCH
options: on / off
default: on
DEE's 90° phase shift of the surround channels
only works for DD/DDP/DDP Atmos, config:
surround_phase_shift
-lpf, --low-pass-filter SWITCH
options: on / off
default: on
DEE's 120 Hz low-pass filter on the LFE channel
only works for DD/DDP, config: low_pass_filter
-s3a, --surround-3db-attenuation SWITCH
options: on / off
default: off
3 dB attenuation of the surround channels
only works for DD/DDP/TrueHD, config:
surround_3db_attenuation
TrueHD asks first: the output is no longer identical
to the source
-wm, --warp-mode MODE options: normal / warping / prologiciix / loro
default: from the source's metadata
warp mode of the TrueHD Atmos (truehdd) and DTS:X /
Auro-3D (harletty) sources, only used when the
source has none
config: truehdd_warp_mode
-bc, --bed-conform SWITCH
options: on / off
default: off
truehdd's bed conformance, for Atmos sources whose
bed comes out as objects
DTS:X and Auro-3D sources are always conformed
config: truehdd_bed_conform
-d, --delay DELAY examples: -5.1ms, +1,52s, -24@pal, +10@24000/1001
default: 0ms or parsed from filename
specifies delay as ms, s or frame@FPS
FPS can be a number, division or ntsc / pal
you have to specify negative values as -d=-0ms
-r, --drc DRC options: none / film_light / film_standard /
music_light / music_standard / speech
default: none (music_light for AC4)
specifies drc profile
none uses dee_shim for TrueHD, not available
for AC4 (AC4 Atmos and ac4-ims have it)
-dn, --dialnorm DIALNORM options: between -31 and 0 (in case of 0 DEE's
measurement will be used)
default: 0
applied dialnorm value, doesn't work for AAC,
AC4 Atmos and ac4-ims
-in, --instances NUMBER examples: 1, 4, 50%
default: 50%
specifies how many encodes can run at the same time
50% means 4 on a cpu with 8 threads
one DEE can use 2 threads so 50% can utilize all
threads
(this option overrides the config's number)
-p, --pipe MODE options: auto / always / never
default: run -c/--config
ffmpeg's audio goes into DEE without a temp .wav
only works for DD/DDP/AC4/AAC and -mo, config: pipe
-k, --keeptemp keep temp files
-kl, --keep-log keep TrueHD's log and write a .deew-log.html report
for each output
-mo, --measure-only only measures the loudness of the source with DEE,
no encoding, -f and the encoding options are
ignored, TrueHD Atmos sources and Atmos masters are
measured as Atmos
-lb, --list-bitrates list bitrates that DEE can do for each format
-la, --long-argument print ffmpeg, truehdd, harletty and DEE arguments
for each input
-np, --no-prompt skip confirmation questions, print them as notes and
continue
-pl, --print-logos show all logo variants you can set in the config
-cl, --changelog show changelog
-c, --config show config and config location
-gc, --generate-config generate a new config, asks before overwriting an
existing config (-np skips the question)
-gt, --get-tools download ffmpeg, ffprobe, truehdd, harletty and
dee_shim next to deew
blue: uses dee_shim
GUI
- download
deew-gui/deew-gui.exe/deew-gui-macos.zipfrom https://github.com/pcrlnd/deew/releases and put it in the same folder as the CLI binary (it looks fordeewnext to itself,deew.exeon Windows) - on Linux make the binaries executable:
chmod +x deew deew-gui - on macOS unzip
deew-gui-macos.zip. Either keepdeew-gui.appin the deew folder, next todeew-macos(portable;chmod +x deew-macos), or put it in Applications: then the CLI,config.toml,dee/and the tools live in~/Library/Application Support/deew/and Utilities → Update and install all downloads the CLI there. The app does not contain the CLI, see Where deew looks for the programs. The app is not signed: on the first launch use System Settings → Privacy & Security → "Open Anyway", or runxattr -dr com.apple.quarantine deew-gui.app - Linux needs the WebKitGTK runtime:
libwebkit2gtk-4.1-0(Debian/Ubuntu),webkit2gtk4.1(Fedora),webkit2gtk-4.1(Arch) - Windows 10/11 already include the needed
WebView2runtime - the GUI has its own version number, independent from the CLI
- build from source:
cd gui && npm install && npm run tauri build -- --no-bundle(the binary will be ingui/target/release/), for development usenpm run tauri dev - more details (development, web mode, security notes): GUI readme
Web UI
deew-webis the GUI in your browser, can be handy for a headless server (no WebKit needed)- download
deew-web/deew-web.exe/deew-web-macosfrom https://github.com/pcrlnd/deew/releases and put it next to the CLI binary, - on Linux/macOS run
chmod +x deew-web(chmod +x deew-web-macoson macOS) - run it and open http://127.0.0.1:8765, use
--host 0.0.0.0to make it reachable from other machines - login: run the
deew-web --hash-passwordcommand and paste the hash into yourconfig.tomlfile - build from source:
cd gui && npm install && npm run build && cargo build -p deew-web --release(the binary will be ingui/target/release/)
Examples
deew -i *thd
TrueHD -> DDP encoding
deew -b 768 -i *flac
DDP encoding at 768kbps
deew -f ddp-atmos -i *thd
TrueHD Atmos -> DDP Atmos encoding from the Atmos master (uses truehdd and dee_shim)
deew -f thd-atmos -i *thd
TrueHD Atmos -> TrueHD Atmos re-encode (16 elements, uses truehdd and dee_shim)
deew -f ac4-atmos -b 448 -i *thd
TrueHD Atmos -> AC4 Atmos encoding at 448kbps
deew -f ddp-atmos -i *mkv
DTS:X or Auro-3D (DTS-HD MA, FLAC, PCM, TrueHD) -> DDP Atmos encoding (uses harletty and dee_shim)
deew -f ac4-ims -i *thd
TrueHD Atmos -> AC4 immersive stereo (--ac4-ims-mode music for music)
deew -f ddp-atmos -i master.atmos
DDP Atmos from a DAMF Atmos master (ADM BWF .wav works the same way)
deew -f dd -i *dts -kdeew -f ddp -i *dts
encode multiple formats/bitrates while creating the temp file only once
Discussion and Support
Donate
If you like deew, you can support the people behind it on Ko-fi or with Monero.
pcroland:
Ko-fi
Monero:
42pcroLMNqQbs87sSuNNTk8E8XHD88NhnSAx3exA3s1mHWAAyKH1oBw7dScYVRx3VJhUZT96QZNeo9Uw2qL72kwoHxVBXmL
rainbaby (developer of truehdd and dee_shim):
Monero:
47BgNcwYCWhSHB3WMd7CPLX3Yb4Kz8TCsGJaUmX7KqG895UKvixks6yje3GSa489XR97FLQMcUaSacAHbMbF2xWz7dvyX9U
Explorer des projets similaires
Chargement…