Skip to content

Dolby Encoding Engine Support

Compare
Choose a tag to compare
@patrickenfuego patrickenfuego released this 28 Feb 03:30
· 133 commits to main since this release
8627878

I'm excited to bring support for the official Dolby Encoding Engine as well as some other major bug fixes, enhancements, and binary updates.

What's New

Dolby Encoding Engine

The script now fully supports the Dee encoder! Shout out to pcroland for writing the python script to parse the XML fuckery employed by the engine before I could even blink. I've forked the repo and made some optimizations for FFEncoder, and plan to make more in the coming weeks.

Five new parameters have been added for Dolby Digital, Dolby Digital Plus, and True HD:

  • dee_dd / dee_ac3
  • dee_ddp / dee_eac3
  • dee_thd

The encoder is really slow, so it gets spun off into a separate process to encode alongside the primary process. The deew script is written in python, so I've automated the process of installing dependencies if you already have python installed (which is currently required to use it). One day I'll port it to PowerShell, but for now, it works.

Disclaimer - You have to get your own binary for dee, I'm not getting sued (and I'm not claiming to possess one)

NLMeans Support

I've also added direct support for nlmeans denoising via the parameter -NLMeans , which accepts a hashtable as a value with 5 properties:

  • s - Set denoising strength. Default is 1.0. Must be in range [1.0, 30.0].
  • p - Set patch size. Default is 7. Must be odd number in range [0, 99].
  • pc - Same as p but for chroma planes. The default value is 5
  • r - Set research size. Default is 3. Must be odd number in range [0, 99].
  • rc - Same as r but for chroma planes. The default value is 3

You're required to pass at least one of the above to activate the parameter. The remaining unpassed values will be filled with the defaults listed above (I changed some of them from the ffmpeg default to a more sane value). For example:

# This results in 2.0:7:7:3:3
PS > .\FFEncoder.ps1 C:\some\file.mkv -NLMeans @{s = 2; pc = 7} -o C:\some\out.mkv

More mkvmerge Integration

Up to this point, the script has primarily used ffmpeg as the main muxer/demuxer, with the exception of DV. Now, if you have the MKVToolnix suite installed, all muxing will go through mkvmerge instead. I've had issues with ffmpeg muxing over the years which is why I decided to do this. If you don't have it installed or you're using a different container format, it will continue to use ffmpeg.

New Track Titling

The script will now automatically name audio tracks for you based on the codec and channel count; if mkvmerge is used, it will also set the language if not already set. Small, but cool!

Other Stuff

I've updated the dovi binaries as there have been some nifty new enhancements.

Stream copy and stereo encoding

This has received quite a bit of work because it was really busted. I fixed a bug that threw an error saying The Alias Q is declared multiple times when stream copying and stereo encoding at the same time. I still have no idea what was causing it (because there was and is only 1 Q alias), but I've completely refactored the code for the better.

In addition, the script will now encode the stereo track in a separate process alongside the main encode if stream copying is used, which speeds things up a bit.

Bug Fixes

  • -ExitOnError parameter has been fixed when used with test parameters. It was previously being ignored
  • Fix for -TestStart parameter when a poster is attached to the container and a frame start is passed
  • Fixed broken console output for audio stuffs, specifically for echoing back bitrate per channel
  • Fix for -OutputPath when the output directory doesn't exist. The script will now try and create that directory structure before exiting on an error
  • The script will now warn when you attempt to transcode from one lossy codec to another lossy codec (but not stop you)

Upcoming

x264 support is nearly finished.