Possibility to transcode/downmix to regular (non-HD) DTS and passthrough core only from DTS-HD (MA)

Archive of historical feature requests.
Please use the GitHub link above to report issues.
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.

*******************************
jd17
Posts: 38
Joined: Thu May 04, 2017 3:19 pm

Possibility to transcode/downmix to regular (non-HD) DTS and passthrough core only from DTS-HD (MA)

Post by jd17 »

Please describe what you would like to see added to HandBrake:
I would very much like the possibility to select regular (non-HD) DTS as non-passthrough option and as core extraction option for DTS-HD (MA).

Why would you like to see this added:
Two scenarios I would like to use on a regular basis:
a) Transcode/downmix Dolby TrueHD or Atmos to 5.1 DTS at 1509kbit/s.
b) Extract and keep DTS core only from a DTS-HD track.

Especially when the audio track is 5.1 (not 7.1 or more) Dolby TrueHD/Atmos or DTS-HD MA, regular DTS would be a great option to me.
I don't hear any losses at 1509kbit/s DTS in comparison to DTS-HD MA and that would get me much smaller files.

The same thing is possible in Handbrake with Dolby Digital, but that is limited to only 640kbit/s.

What version of HandBrake are you currently running:
HandBrake 1.0.2

What operating system and version and you currently running (e.g. OSX 10.11, Windows 7, Ubuntu 14):
Windows 10, 64bit
rollin_eng
Veteran User
Posts: 4854
Joined: Wed May 04, 2011 11:06 pm

Re: Possibility to transcode/downmix to regular (non-HD) DTS and passthrough core only from DTS-HD (MA)

Post by rollin_eng »

You can extract the core DTS from DTS-HD already I think.

I believe there is no open source DTS encoder thus no option for it in HB.
jd17
Posts: 38
Joined: Thu May 04, 2017 3:19 pm

Re: Possibility to transcode/downmix to regular (non-HD) DTS and passthrough core only from DTS-HD (MA)

Post by jd17 »

rollin_eng wrote: Fri May 12, 2017 12:26 pm You can extract the core DTS from DTS-HD already I think.
Really? Can you tell me how?
The last time I tried this I selected "DTS passthrough" on a DTS-HD audio track, but that did not work.
I believe there is no open source DTS encoder thus no option for it in HB.
I just googled "open source DTS encoder" and this came up:
https://github.com/darealshinji/dcaenc
rollin_eng
Veteran User
Posts: 4854
Joined: Wed May 04, 2011 11:06 pm

Re: Possibility to transcode/downmix to regular (non-HD) DTS and passthrough core only from DTS-HD (MA)

Post by rollin_eng »

Does DTS Passthrough of a DTS-HD source work?

I guess it also has to be compatible under the license HB works under as well but perhaps a dev can comment.
Deleted User 11865

Re: Possibility to transcode/downmix to regular (non-HD) DTS and passthrough core only from DTS-HD (MA)

Post by Deleted User 11865 »

rollin_eng wrote: Fri May 12, 2017 4:24 pm Does DTS Passthrough of a DTS-HD source work?
No. For MPEG program or transport stream sources (e.g. HD-DVD, Blu-ray), splitting the core from the extensions is easy because of the way they're multiplexed, so we present a separate track for the core's substream that can be used with DTS passthrough. This is not possible for other sources (MKV, etc.), however.
rollin_eng
Veteran User
Posts: 4854
Joined: Wed May 04, 2011 11:06 pm

Re: Possibility to transcode/downmix to regular (non-HD) DTS and passthrough core only from DTS-HD (MA)

Post by rollin_eng »

No but Yes :)

So it depends on the source. But why no DTS encoder?
Woodstock
Veteran User
Posts: 4619
Joined: Tue Aug 27, 2013 6:39 am

Re: Possibility to transcode/downmix to regular (non-HD) DTS and passthrough core only from DTS-HD (MA)

Post by Woodstock »

MakeMKV normally will split out the "core" as a separate track, which works well with handbrake. But some people de-select the core track, because "why would I need core when I have HD?"
Deleted User 11865

Re: Possibility to transcode/downmix to regular (non-HD) DTS and passthrough core only from DTS-HD (MA)

Post by Deleted User 11865 »

rollin_eng wrote: Fri May 12, 2017 4:38 pm No but Yes :)

So it depends on the source. But why no DTS encoder?
Lack of time, lack of interest, plus DTS is a terribly inefficient format…
jd17
Posts: 38
Joined: Thu May 04, 2017 3:19 pm

Re: Possibility to transcode/downmix to regular (non-HD) DTS and passthrough core only from DTS-HD (MA)

Post by jd17 »

Rodeo wrote: Fri May 12, 2017 6:16 pm...plus DTS is a terribly inefficient format…
Now that you say that I have to admit that I never really looked into the alternatives in handbrake! Shame on me. :shock:

I see that AAC, Vorbis and Opus offer high bitrates at 5.1.
Would those offer better audio quality at the same bitrate than DTS?
Which of the three is the most efficient or offers the best quality?

I assume Kodi can decode all three to 5.1 PCM?
Deleted User 11865

Re: Possibility to transcode/downmix to regular (non-HD) DTS and passthrough core only from DTS-HD (MA)

Post by Deleted User 11865 »

Opus and Vorbis will be more efficient that DTS for sure. AAC can be, though if you're a Windows or Linux user, our encoder is not the world's best AAC encoder. Under macOS, you can use Apple's very good AAC encoder.

Kodi should be able to decode any of them, though AAC is most compatible generally (especially if proprietary software is involved in your workflow).

But we're talking about a DTS core from DTS-HD, that's 1,536 Kbps… which is FLAC 16-bit territory, rather than a direct competitor to the aforementioned lossy encoders.
jd17
Posts: 38
Joined: Thu May 04, 2017 3:19 pm

Re: Possibility to transcode/downmix to regular (non-HD) DTS and passthrough core only from DTS-HD (MA)

Post by jd17 »

Rodeo wrote: Fri May 12, 2017 10:51 pmBut we're talking about a DTS core from DTS-HD, that's 1,536 Kbps… which is FLAC 16-bit territory, rather than a direct competitor to the aforementioned lossy encoders.
Why is that?
Opus and AAC have that same bitrate as option too (Vorbis is limited to a still high 1344kbit/s) and as far as I understood you, they'll be more efficient so more transparent than the DTS core, right?

Image

Wouldn't FLAC 16bit result in much larger filesizes?

The DTS core is 48kHz/24bit, am I right in assuming Opus, AAC and Vorbis are all 16bit?


The only downside of all these (including FLAC) is, that I can't send any of them through S/PDIF, right?
That is not an issue with 1080p content, but will be with UHD, since my AVR can't process that and I really don't want to replace it. ;)
Deleted User 11865

Re: Possibility to transcode/downmix to regular (non-HD) DTS and passthrough core only from DTS-HD (MA)

Post by Deleted User 11865 »

FLAC 16-bit 5.1 should average between 1,200 and 1,800 Kbps depending on the source. AAC/Opus/Vorbis have variable bit depth, it can go above 16-bit for some samples. Personally, I'd still take lossless 16-bit over lossy anything, but YMMV.
Deleted User 11865

Re: Possibility to transcode/downmix to regular (non-HD) DTS and passthrough core only from DTS-HD (MA)

Post by Deleted User 11865 »

And indeed, all the formats we're discussing will not carry over SPDIF.
jd17
Posts: 38
Joined: Thu May 04, 2017 3:19 pm

Re: Possibility to transcode/downmix to regular (non-HD) DTS and passthrough core only from DTS-HD (MA)

Post by jd17 »

Thank you so much for helping me out with this Rodeo! This is really great. :)
I already learned a lot!

I just encoded a 20min DTS-HD MA sample out of "Captain America: Civil War" in both Opus 1536kbit/s and FLAC 16bit, result:
Opus file size: 993MB
FLAC file size: 929MB
(Video is encoded in x265 10bit CRF15 medium in both cases.)

This is really amazing - and of course I prefer lossless 16bit too. :)


That brings me to another question and I am thinking about making that a separate feature request if you agree (while closing this one):
Could you add the option to "passthrough channels" for FLAC, AAC, Vorbis, Opus etc.?
Right now, they are all limited to a 5.1 downmix.
However, I know that FLAC at least can do 7.1 as well, the others probably too...
Maybe even more?
Why limit this to 5.1 while so many movies these days have native 7.1 (or more) tracks?
jd17
Posts: 38
Joined: Thu May 04, 2017 3:19 pm

Re: Possibility to transcode/downmix to regular (non-HD) DTS and passthrough core only from DTS-HD (MA)

Post by jd17 »

OMG this is embarrassing... I just updated to 1.07 and voila! Downmix 6.1 and 7.1 options! :D

But still, is a "passthrough channels" option not a good idea too? :)


Edit:
I might have been extra stupid regarding 6.1/7.1 downmix.
I just realized that I looked at a 5.1 DTS-HD MA track before, which I thought to be 7.1.
Sorry for that...
So I guess it's been possible for a while to downmix to 6.1 and 7.1?
Deleted User 11865

Re: Possibility to transcode/downmix to regular (non-HD) DTS and passthrough core only from DTS-HD (MA)

Post by Deleted User 11865 »

If your source is 7.1, you should be able to encode all channels when using FLAC, Opus or Vorbis, since at least version 1.0, but IIRC also version 0.10.x…
jd17
Posts: 38
Joined: Thu May 04, 2017 3:19 pm

Re: Possibility to transcode/downmix to regular (non-HD) DTS and passthrough core only from DTS-HD (MA)

Post by jd17 »

Thanks again for your help! :)

One last question if I may, you seem to know so much about audio codec efficiency and google did not help me...

I will use FLAC 16 for all HD tracks in the future, but I am considering adding a "safety net" compability audio track, as long as the combined bitrate is still much lower than the HD audio bitrate.

The only viable option (for S/PDIF) is AC-3 5.1 @640kbit/s if I am not mistaken.

I know that AC-3 is less efficient than Opus and AAC etc., but is it at least more efficient than DTS?
Is AC-3 640kbit/s an adequate substiture for 1.5mbit/s DTS or is it much worse?


I only found this guideline...
https://trac.ffmpeg.org/wiki/Encode/HighQualityAudio

...but the quality high to low comparison does not include DTS:
Based on quality produced from high to low:
libopus > libvorbis >= libfdk_aac > aac > libmp3lame >= eac3/ac3 > libtwolame > vorbis > mp2 > wmav2/wmav1
rollin_eng
Veteran User
Posts: 4854
Joined: Wed May 04, 2011 11:06 pm

Re: Possibility to transcode/downmix to regular (non-HD) DTS and passthrough core only from DTS-HD (MA)

Post by rollin_eng »

A lot of this will depend on your source, what are you mainly encoding?

Maybe post a log or two.
jd17
Posts: 38
Joined: Thu May 04, 2017 3:19 pm

Re: Possibility to transcode/downmix to regular (non-HD) DTS and passthrough core only from DTS-HD (MA)

Post by jd17 »

Sources would always be Blu-rays with either TrueHD/Atmos or DTS-HD MA tracks.

Example 1:
Image

Example 2:
Image

While I am writing this, I think I have to report a bug.
I was looking for a 7.1 DTS-HD MA track, but Handbrake lists every single one I tested as 5.1.
Even one I already passed through in an older Handbrake version.
Since I used to just auto passthrough DTS-HD I did not check the channels, so I don't know if this is a new bug or not.

MediaInfo Source:
Image

Handbrake:
Image
jd17
Posts: 38
Joined: Thu May 04, 2017 3:19 pm

Re: Possibility to transcode/downmix to regular (non-HD) DTS and passthrough core only from DTS-HD (MA)

Post by jd17 »

rollin_eng wrote: Sun May 14, 2017 10:25 amMaybe post a log or two.
Well, I know what kind of bitrates I will be looking at - I will do a (dummy video) test run first to get the average HD audio bitrate and the resulting FLAC.
So deciding if it's worth to encode in FLAC is not the question.
For instance:
[11:47:31] work: average encoding speed for job is 341.989441 fps
[11:47:31] vfr: 149733 frames output, 0 dropped and 37 duped for CFR/PFR
[11:47:31] vfr: lost time: 0 (0 frames)
[11:47:31] vfr: gained time: 0 (0 frames) (0 not accounted for)
[11:47:31] dca-decoder done: 585484 frames, 0 decoder errors
[11:47:31] dca-decoder done: 585484 frames, 0 decoder errors
[11:47:31] h264_qsv-decoder done: 149696 frames, 0 decoder errors
[11:47:31] sync: got 149696 frames, 149734 expected
[11:47:31] sync: framerate min 2.667 fps, max 23.981 fps, avg 23.970 fps
[11:47:31] mux: track 0, 149733 frames, 5138491 bytes, 6.58 kbps, fifo 1024
[11:47:31] mux: track 1, 585484 frames, 2856937928 bytes, 3659.69 kbps, fifo 4096
[11:47:31] mux: track 2, 65054 frames, 916328826 bytes, 1173.80 kbps, fifo 256
The average bitrate of the DTS-HD is 3660 kbit/s, the encoded FLAC 16 is only 1174 kbit/s.
So even with an added 640 kbit/s for the "compability AC3" I am still at half the source bitrate, ergo it pays off.


The only actual question I have is about AC3 640kbit/s efficiency:
I know that AC-3 is less efficient than Opus and AAC etc., but is it at least more efficient than DTS?
Is AC-3 640kbit/s an adequate substiture for 1.5mbit/s DTS or is it much worse?
Deleted User 11865

Re: Possibility to transcode/downmix to regular (non-HD) DTS and passthrough core only from DTS-HD (MA)

Post by Deleted User 11865 »

Generally speaking, 640 Kbps AC-3 is indeed mostly equivalent to 1.5 Mbps DTS. IIRC, HandBrake's AC-3 encoder is not quite as good as Dolby's official encoder, but it's not the world's worst encoder either :)
jd17
Posts: 38
Joined: Thu May 04, 2017 3:19 pm

Re: Possibility to transcode/downmix to regular (non-HD) DTS and passthrough core only from DTS-HD (MA)

Post by jd17 »

Thank you!

Can you comment on the DTS-HD situation?
I read somewhere that it always shows 5.1 because Handbrake can only decode the DTS core, not the HD track - but it can passthrough the DTS-HD.
That would explain what I see.
However, that discussion is from 2011 (another forum).

Is that still the case? Can Handbrake not decode DTS-HD?
Deleted User 11865

Re: Possibility to transcode/downmix to regular (non-HD) DTS and passthrough core only from DTS-HD (MA)

Post by Deleted User 11865 »

AFAIK, the latest version of HandBrake (1.0.x) has partial support for DTS-HD, but I can't recall exactly which extension(s) are supported.
jd17
Posts: 38
Joined: Thu May 04, 2017 3:19 pm

Re: Possibility to transcode/downmix to regular (non-HD) DTS and passthrough core only from DTS-HD (MA)

Post by jd17 »

Well, I tested at least ten 7.1 DTS-HD MA tracks now, all are only recognized as 5.1 in Handbrake 1.0.7.

I just installed "Hybrid", which I do not like.
However, it can decode 8 channel DTS-HD and also has a "don't change" downmix option, which is essentially my "passthrough channels" idea.

Can you ask the dev team to look into DTS-HD 7.1 decoding?
Do you want me to open a new feature request (or bug report?) for this?
Post Reply