Required tools:
- eac3to
- ArcSoft decoder
- DTS HD Master Suite
- A hex editor
- SoX
- Wavewizard (optional)
- GoldWave (optional)
- mkvtoolnix (optional)
- Tons of disk space (~20 GiB per hour of movie length is a good safety net)
Code: Select all
mkvextract tracks input.mkv <stream number>:original.dtshd
Code: Select all
eac3to <bluray path> <title number>) <stream number>: original.dtshd
Code: Select all
eac3to input.mkv <stream number>: original.dtshd
Code: Select all
eac3to input.dtshd output.wavs
Code: Select all
sox -S in.wav out.wav speed 0.75
5. Load up the channels as shown below:
6. Make sure to click "Encode Entire File" under "Timecode Settings".
7. Click the "Save To" button to select the path to save to. Once selected it will fill in the name of the file to "DTSENC". There is no need to change it unless you have a weird reason to. Lastly, click the round red "ENCODE" button. Go do some other tasks; it takes a long time.
8. Once the encoding is done, open the resulting "DTSENC.dtshd" and the original "input.dtshd" files in your hex editor.
9. Select the first 140 (8C) bytes of "DTSENC.dtshd" and copy it.
10. Paste that data at the beginning of "input.dtshd" and save it. It's okay to overrite it. If you mess it up, it can always be demuxed again.
11. Open the "input.dtshd" with DTS -HD StreamPlayer under the "Primary Audio" field in the "File Input" panel. Click on the "Playlist" button. In the panel that extended to the right, just single click on "input.dtshd". Click the "Decode to PCM" button and select the output directory. It will stop decoding some time before 100%.
12. Now we will merge, or stitch, the new individual wavs into a single multichannel wav. The M$ channel order for the 7.1 layout we want (0x0000063F) is as follows: Front Left, Front Right, Front Center, LFE, Back Left, Back Right, Side Left, and Side Right. The generated files labeled as "Ls" and "Rs" are going to be the "side" channels. The "Lsr" and "Rsr" files are going to be the "back" channels. I personally use SoX for this, but i will also show you how to do it in Wavewizard.
Code: Select all
sox -S -M input_L.wav input_R.wav input_C.wav input_LFE.wav input_Lsr.wav input_Rsr.wav input_Ls.wav input_Rs.wav final.wav
Now you can do whatever you want with the resulting wav file. I encode mine to FLAC with eac3to. As far as the data, it's a bit-perfect decode from the original, with the exception of the channel layout. Who knows, maybe they selected the wrong layout in authoring and meant for it to be standard, and what we're going here is correcting their mistake...