Favoring DTS as output audio

Discussion of the HandBrake command line interface (CLI)
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
dbuttric
Posts: 3
Joined: Wed Dec 25, 2019 8:14 pm

Favoring DTS as output audio

Post by dbuttric »

Description of problem or question:
I'm trying to get DTS to be the Default audio track if available, and AC3 otherwise.
I can't seem to make this work, the DTS track is always the last track in the list, and never has the Default flag set

I'm using the automatic ripping machine to automate the process.
I have confirmed that my system will play DTS in an mkv - I did this mkvpropedit to set the default flag on a movie that I ripped.

Steps to reproduce the problem (If Applicable):
Here is the command I'm using:
HandBrakeCLI -i /dev/sr0 -o /home/arm/media/completed/not_identified/title_01.mkv -t 1 --subtitle scan -F -E copy,aac --audio-copy-mask=dts,ac3 --audio-fallback=ac3



HandBrake version (e.g., 1.0.0):
1.2.1



Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):
Ubuntu 18.04.3



HandBrake Activity Log ***required*** (see How-to get an activity log)
5m21s)

https://pastebin.com/CRx3XPiw
Deleted User 11865

Re: Favoring DTS as output audio

Post by Deleted User 11865 »

You can't do it with HandBrake itself. You could parse the scan output and script it in bash…
dbuttric
Posts: 3
Joined: Wed Dec 25, 2019 8:14 pm

Re: Favoring DTS as output audio

Post by dbuttric »

Is there any reason that the above command line would not be copying the DTS audio at all?

Given that I can't set the Defaul in Handbrake - I'll do that as a post-transcode task in mkvpropedit - , what are the command line options that will get me what I need?

Thanks for the help.
David
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: Favoring DTS as output audio

Post by Woodstock »

You did not specify which source tracks to use. All of my CLI audio sections start with -a followed by the list of source tracks, like:

Code: Select all

-a 2,2 -E ac3,copy:dts -6 dpl2,none -R Auto,Auto -B 160,0 -D 0,0 --gain 0,0 --audio-fallback ac3
In this case, track 2 is the source for both the conversion to AC3 and the copy of DTS.
dbuttric
Posts: 3
Joined: Wed Dec 25, 2019 8:14 pm

Re: Favoring DTS as output audio

Post by dbuttric »

I think I'm beginning to see this.
You have to script a scan of the disk so that you can gather information like which track number has the audio you want.
Once you have all that, you can compose the correct command line options to pass to Handbrake, and then it can transcode the files.
Does that sound about right?

Thanks.
David
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: Favoring DTS as output audio

Post by Woodstock »

Pretty much. Or you can make assumptions and change things if it doesn't work.

Most (not all) sources will have the "best" audio as the first track, so -a 1,1 would work more than 50% of the time.

The difficulty is when you have disks that have DTS-HD MA as opposed to DTS; they aren't considered the same thing for "pass through". Consider making your auto pass string something like --audio-copy-mask=dtshd,dts,ac3
Post Reply