Git Product home page Git Product logo

deezy's Introduction

DeeZy

In it's current form it's designed around encoding audio with Dolby Engine Encoder.

However, it was designed with expandability as needed for other encoders.

Install (no install needed it's portable)

At the moment you'll need to download your binary (Windows 8+ x64 or Linux) and handle this one of two ways.

  1. You can add both FFMPEG and dee.exe (Dolby Encoding Engine) to your system PATH and use DeeZy as a normal executable.

  2. Create an apps folder beside DeeZy with two nested directories ffmpeg and dee

deezy (executable)
- apps
    - ffmpeg
    - dee

You can place the executables to those files and needed libraries in the folders and then use DeeZy as a normal executable.

Uninstall

Delete files.

Basic Usage

usage: DeeZy [-h] [-v] {encode,find,info} ...

positional arguments:
  {encode,find,info}

options:
  -h, --help          show this help message and exit
  -v, --version       show program's version number and exit

Encode Usage DD

DeeZy encode dd [-h] [--ffmpeg FFMPEG] [--dee DEE] [-t TRACK_INDEX]
                       [-b BITRATE] [-d DELAY] [-k]
                       [-p {STANDARD[0],DEBUG[1],SILENT[2]}] [-tmp TEMP_DIR]
                       [-o OUTPUT] [-s {STANDARD[0],DPLII[1]}]
                       [-c {AUTO[0],MONO[1],STEREO[2],SURROUND[6]}]
                       [-drc {FILM_STANDARD[0],FILM_LIGHT[1],MUSIC_STANDARD[2],MUSIC_LIGHT[3],SPEECH[4]}]
                       INPUT [INPUT ...]


positional arguments:
  INPUT
   Input file paths or directories

options:
  -h, --help
   show this help message and exit
  --ffmpeg, FFMPEG
   Path to FFMPEG executable.
  --dee, DEE
   Path to DEE (Dolby Encoding Engine) executable.
  -t, --track-index, TRACK_INDEX
   The index of the audio track to use.
  -b, --bitrate, BITRATE
   The bitrate in Kbps.
  -d, --delay, DELAY
   The delay in milliseconds or seconds. Note '-d=' is required! (-d=-10ms / -d=10s).
  -k, --keep-temp
   Keeps the temp files after finishing (usually a wav and an xml for DEE).
  -p, --progress-mode, {STANDARD[0],DEBUG[1],SILENT[2]}
   Sets progress output mode verbosity.
  -tmp, --temp-dir, TEMP_DIR
   Path to store temporary files to. If not specified this will automatically happen in the temp dir of the os.
  -o, --output, OUTPUT
   The output file path. If not specified we will attempt to automatically add Delay/Language string to output file name.
  -s, --stereo-down-mix, {STANDARD[0],DPLII[1]}
   Down mix method for stereo.
  -c, --channels, {AUTO[0],MONO[1],STEREO[2],SURROUND[6]}
   The number of channels.
  -drc, --dynamic-range-compression, {FILM_STANDARD[0],FILM_LIGHT[1],MUSIC_STANDARD[2],MUSIC_LIGHT[3],SPEECH[4]}
   Dynamic range compression settings.

Encode Usage DDP

DeeZy encode ddp [-h] [--ffmpeg FFMPEG] [--dee DEE] [-t TRACK_INDEX]
                        [-b BITRATE] [-d DELAY] [-k]
                        [-p {STANDARD[0],DEBUG[1],SILENT[2]}] [-tmp TEMP_DIR]
                        [-o OUTPUT] [-s {STANDARD[0],DPLII[1]}]
                        [-c {AUTO[0],MONO[1],STEREO[2],SURROUND[6],SURROUNDEX[8]}]
                        [-n]
                        [-drc {FILM_STANDARD[0],FILM_LIGHT[1],MUSIC_STANDARD[2],MUSIC_LIGHT[3],SPEECH[4]}]
                        INPUT [INPUT ...]

positional arguments:
  INPUT
   Input file paths or directories

options:
  -h, --help
   show this help message and exit
  --ffmpeg, FFMPEG
   Path to FFMPEG executable.
  --dee, DEE
   Path to DEE (Dolby Encoding Engine) executable.
  -t, --track-index, TRACK_INDEX
   The index of the audio track to use.
  -b, --bitrate, BITRATE
   The bitrate in Kbps.
  -d, --delay, DELAY
   The delay in milliseconds or seconds. Note '-d=' is required! (-d=-10ms / -d=10s).
  -k, --keep-temp
   Keeps the temp files after finishing (usually a wav and an xml for DEE).
  -p, --progress-mode, {STANDARD[0],DEBUG[1],SILENT[2]}
   Sets progress output mode verbosity.
  -tmp, --temp-dir, TEMP_DIR
   Path to store temporary files to. If not specified this will automatically happen in the temp dir of the os.
  -o, --output, OUTPUT
   The output file path. If not specified we will attempt to automatically add Delay/Language string to output file name.
  -s, --stereo-down-mix, {STANDARD[0],DPLII[1]}
   Down mix method for stereo.
  -c, --channels, {AUTO[0],MONO[1],STEREO[2],SURROUND[6],SURROUNDEX[8]}
   The number of channels.
  -n, --normalize
   Normalize audio for DDP.
  -drc, --dynamic-range-compression, {FILM_STANDARD[0],FILM_LIGHT[1],MUSIC_STANDARD[2],MUSIC_LIGHT[3],SPEECH[4]}
   Dynamic range compression settings.

Find Usage

usage: DeeZy find [-h] [-n] INPUT [INPUT ...]

positional arguments:
  INPUT       Input file paths or directories

options:
  -h, --help  show this help message and exit
  -n, --name  Only display names instead of full paths.

Example:

deezy find "Path\*.*"
Path\Men.in.Black.3.2012.UHD.BluRay.2160p.TrueHD.Atmos.7.1.DV.HEVC.HYBRID.REMUX.mkv

Info Usage

usage: DeeZy info [-h] INPUT [INPUT ...]

positional arguments:
  INPUT       Input file paths or directories

options:
  -h, --help  show this help message and exit

Example:

deezy info "Path\Avatar.The.Last.Airbender.S01E01.The.Boy.in.the.Iceberg.mkv"
File: Avatar.The.Last.Airbender.S01E01.The.Boy.in.the.Iceberg.mkv
Audio tracks: [0]
------------------------------------------------------------------------------------------
Track               : 0
Codec               : FLAC - (flac)
Channels            : 2.0 - L R
Bit rate mode       : VBR / Variable
Bit rate            : 760 kb/s
Sampling Rate       : 48.0 kHz
Duration            : 23 min 40 s
Language            : English
Title               : FLAC 2.0
Stream size         : 128.7 MiB
Bit Depth           : 24 bits
Compression         : Lossless
Default             : Yes
Forced              : No
------------------------------------------------------------------------------------------

Track ... : 0 corresponds to the -t / --track-index arg when selecting your track to encode with dd/ddp

Input Types

You can line up multiple inputs to be encoded with the same settings:
input.mkv input.mp4 etc...
If there is space in the name you'll likely want to wrap them in quotes

It also supports everything the python glob module supports. This allows you to filter or search recursively etc:

Will find all mkv's in the specified directory:
"directory/nested_path/*.mkv"

Will find all mkv's recursively:
"directory/nested_path/**/*.mkv"

deezy's People

Contributors

jessielw avatar xesteem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

deezy's Issues

Exceeds path length for DEE

Path provided with input file exceeds path length for DEE.

DeeZy throws this error whenever I try to specify a temp directory with the "-tmp" switch.
If I use the default OS temp directory the command runs without issues.


If temp_dir is provided, creates a directory with that name instead of a randomly generated one.
If the length of the path to the input file plus the length of temp_dir exceeds 259 characters, raises a PathTooLongError.

The combined path length of my input file and temp directory does not exceed 259 characters. Here's the exact command I'm using:
deezy encode ddp -t 0 -b 1536 -k -tmp "H:\temp_deezy" -o "H:\deezy.eac3" "H:\input.mkv"

DDP Bitrate Issue

If I encode a Dolby Digital Plus 5.1 audiofile with a bitrate <384 kbit/s the produced file has always 384 kbit/s. Above 384 kbit/s everything is fine.
For example: I configure a bitrate of 320 kbit/s an the new file has a bitrate 384 kbit/s.

Add a bit more logic to determine_track_index function

We can add some additional logic by checking count of all tracks (other than general) to ensure that audio is/isnt the only track in the file.

Additionally check the track data in media info lib, as we may be able to utilize streamids directly without the need for logic.

Delete the temp dir ... completely?

Just something to think about:

Basically there is no need to specify a temp dir. In my case I had not enough space left, so I have chosen an HDD and gladfully I have specified an empty folder, because this code look like: When a temp dir is set, delete everything in it, even subfolders. ๐Ÿ˜ฎ

So in case you set --temp-dir="D:\" and forget to add --keep-temp everything will be lost, right?

https://github.com/jlw4049/DeeZy/blob/25224319d36b0f36fae98833fd40b2bd8ba2e782/deezy/audio_encoders/dee/dd.py#L181-L185

https://github.com/jlw4049/DeeZy/blob/25224319d36b0f36fae98833fd40b2bd8ba2e782/deezy/audio_encoders/dee/ddp.py#L176-L189

Var `stripped_file_path` issue

Currently it's only removing single spaces.

This will need to be remedied, can easily achieve this with regex.

We need to ensure all white space is removed from the filename

Print help without dependencies

When you want to get help while dee.exe and/or ffmpeg.exe are not available, the help won't be printed:

.\deezy.exe -h
dee.exe path not found

Would be nice to get the (basic) help regardless the dependencies, because they are not required yet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.