Skip to main content

杜比编码引擎封装

项目描述

构建 github_release pypi_release pypi_downloads 执照
电报 提交 问题
姓名 姓名 姓名



杜比编码引擎封装

英文自述文件 • Magyar leírás

DDP 编码从未如此简单!

图像

描述

  • 在后台处理杜比的 XML 输入问题,为您提供适当的 CLI 界面
  • 将输入转换为 DEE 可以使用的 rf64
    • 位深度,通道数和其他信息从源解析
  • 将根据设置为每个输入生成一个 XML 文件
  • 该脚本利用线程池进行批量编码(请参阅配置)
  • 支持 DEE Win 版本的 WSL 路径转换(见配置)
  • 如果比特率无效,它将选择最接近的允许比特率
  • 在不支持的采样率的情况下,使用 ffmpeg 的 soxr 重采样器进行自动采样率转换
    • 对于 dd/ddp 不受支持的费率将转换为 48000
    • 如果源采样率低于 72000,则不支持的速率将转换为 48000,否则将转换为 96000
  • 7.1 音源的自动频道交换(DEE 出于某种原因将 Ls Rs 与 Lrs Rrs 交换)
  • 自动拨号规范设置
  • 自动补偿 DEE 的 256 采样延迟(DD 和 DDP 编码)
  • 检查是否已经创建了中间文件,以便您可以使用单个中间文件对不同的格式/比特率进行编码,例如:
    deew -f dd -b 448 -i input -k
    deew -f dd -b 640 -i input -k
    deew -f ddp -i input
  • 甚至可以使用视频输入(将选择第一个音频)
  • 使用丰富的精美终端输出
  • 支持 ms、s 和 frame@fps 格式的通用延迟选项
  • 从文件名解析延迟

要求

  • Python (如果您使用独立构建的 deew,则不需要它)
  • ffmpeg
  • ffprobe
  • 杜比编码引擎

杜比编码引擎安装

  • 安装DEE(如果您使用 macOS,请安装DME
    • 对于 TrueHD 编码支持,您需要 Windows 版本
    • 如果您使用 WSL1,请使用 Windows 版本以获得更好的性能
    • 如果您在 Linux(而不是来自 WSL)/macOS 下使用 Windows 版本的 DEE 安装wine-binfmt
  • license.lic文件放在 DEE 二进制文件旁边(dee.exe在 Windows 下,dee在 Linux/macOS 下)

露水安装

独立构建(Windows 8-11/Linux):

使用 Python 环境(Windows/Linux/macOS):

  • 如果您还没有 Python 和 pip,请安装它
  • 跑:pip install deew
  • 运行:deew
  • 在第一次运行时,它将创建一个配置文件
  • 更新:pip install deew --upgrade

设置系统 PATH 变量

如果您不想在配置中使用二进制文件的完整路径,或者在 CLI 中使用它们时,我建议设置系统 PATH 变量

视窗:

  • cmd.exe以管理员身份打开
  • setx /m PATH "%PATH%;[location]"为每个包含二进制文件的路径运行命令
    (替换[location]为路径)
  • 例如:
setx /m PATH "%PATH%;C:\bin\dee"
setx /m PATH "%PATH%;C:\bin\ffmpeg"

Linux/macOS:

  • 在您的或文件中为每个包含二进制文件的路径添加PATH="[location]:$PATH"一行(替换为路径)~/.bashrc~/.zshrc
    [location]
  • 例如:
PATH="/usr/local/bin/dee:$PATH"
PATH="/usr/local/bin/ffmpeg:$PATH"

用法

❯ deew -h
deew 2.9.3

USAGE: deew [-h] [-v] [-i [INPUT ...]] [-ti INDEX] [-o DIRECTORY] [-f FORMAT]
            [-b BITRATE] [-dm CHANNELS] [-d DELAY] [-r DRC] [-dn DIALNORM]
            [-in INSTANCES] [-k] [-mo] [-fs] [-fb] [-lb] [-la] [-np] [-pl]
            [-cl] [-c] [-gc]

FLAGS:
  -h, --help                  show this help message.
  -v, --version               show version.
  -i, --input [INPUT ...]     audio file(s) or folder(s)
  -ti, --track-index INDEX    default: 0
                              select audio track index of input(s)
  -o, --output DIRECTORY      default: current directory
                              specifies output directory
  -f, --format FORMAT         options: dd / ddp / thd
                              default: ddp
  -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
                              DD will be automatically downmixed to 5.1 in case of a 7.1 source
  -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: film_light / film_standard / music_light / music_standard / speech
                              default: music_light (this is the closest to the missing none preset)
                              specifies drc profile
  -dn, --dialnorm DIALNORM    options: between -31 and 0 (in case of 0 DEE's measurement will be used)
                              default: 0
                              applied dialnorm value between
  -in, --instances INSTANCES  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)
  -k, --keeptemp              keep temp files
  -mo, --measure-only         kills DEE when the dialnorm gets written to the progress bar
                              this option overrides format with ddp
  -fs, --force-standard       force standard profile for 7.1 DDP encoding (384-1024 kbps)
  -fb, --force-bluray         force bluray profile for 7.1 DDP encoding (768-1664 kbps)
  -lb, --list-bitrates        list bitrates that DEE can do for DD and DDP encoding
  -la, --long-argument        print ffmpeg and DEE arguments for each input
  -np, --no-prompt            disables prompt
  -pl, --print-logos          show all logo variants you can set in the config
  -cl, --changelog            show changelog
  -c, --config                show config and config location(s)
  -gc, --generate-config      generate a new config

例子

deew -i *thd
编码 DDP

deew -b 768 -i *flac
编码 DDP@768

deew -dm 2 -f dd -b 192 -i *.ec3
使用立体声缩混编码 DD@192

deew -f dd -b 448 -t 4 -i S01
使用 4 个线程对 DD@448 进行编码(输入为文件夹)

deew -f thd -i *w64
编码 TrueHD

deew -f dd -i *dts -k
deew -f ddp -i *dts
对多种格式/比特率进行编码,同时仅创建一次临时文件

讨论与支持

https://t.me/deew_support

项目详情


下载文件

下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。

源分布

deew-2.9.3.tar.gz (21.0 kB 查看哈希)

已上传 source

内置分布

deew-2.9.3-py3-none-any.whl (20.6 kB 查看哈希)

已上传 py3