DTS Audio passthru cli

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
keith2045
Posts: 4
Joined: Tue Jan 05, 2021 2:25 am

DTS Audio passthru cli

Post by keith2045 »

Description of problem or question:
I'm trying to change the video format from VC-1 to another format using the CLI. I'm wanting to keep everything else about the video as close as possible to the original. When I try to copy the DTS audio it always gets converted to some other format.

Steps to reproduce the problem (If Applicable):

Here is the command line i'm using. I've tried several variations with the audio options, but none of them provide DTS audio.

Code: Select all

C:\Users\keith\Desktop\ProcessMovies>HandBrakeCLI.exe --preset "Super HQ 1080p30 Surround" --input "z:\source.mkv" --output "z:\dest-handbrake-cli.mkv" --format  av_mkv --encoder x264 --vb 19962.3 --two-pass --turbo --cfr --rate 23.976 --audio 1,2 --aencoder copy:dts-hd,copy:ac3 --markers 
With --aencode i've tried dts, dts-hd, and just copy,copy. I think i've tried dtshd but i'm running it now. Will report back if that works

HandBrake version (e.g., 1.0.0):

1.3.3


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

The log is from Windows 10, i've also tried thi son Fedora 32


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

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

Re: DTS Audio passthru cli

Post by Deleted User 11865 »

Appears to be working?

Code: Select all

[12:48:45] job configuration:
[12:48:45]  * source
[12:48:45]    + \\source.mkv
[12:48:45]    + title 1, chapter(s) 1 to 38
[12:48:45]    + container: matroska,webm
[12:48:45]  * destination
[12:48:45]    + \\1dest-handbrake.mkv
[12:48:45]    + container: Matroska (libavformat)
[12:48:45]      + chapter markers
[12:48:45]  * video track
[12:48:45]    + decoder: vc1
[12:48:45]    + filters
[12:48:45]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[12:48:45]      + Decomb (mode=39)
[12:48:45]      + Framerate Shaper (mode=1)
[12:48:45]        + frame rate: 23.976 fps -> constant 23.976 fps
[12:48:45]      + Crop and Scale (width=1920:height=814:crop-top=128:crop-bottom=138:crop-left=0:crop-right=0)
[12:48:45]        + source: 1920 * 1080, crop (128/138/0/0): 1920 * 814, scale: 1920 * 814
[12:48:45]    + Output geometry
[12:48:45]      + storage dimensions: 1920 x 814
[12:48:45]      + pixel aspect ratio: 1 : 1
[12:48:45]      + display dimensions: 1920 x 814
[12:48:45]    + encoder: H.264 (libx264)
[12:48:45]      + preset:  veryslow
[12:48:45]      + options: ref=5:bframes=5
[12:48:45]      + profile: high
[12:48:45]      + level:   4.0
[12:48:45]      + quality: 18.00 (RF)
[12:48:45]  * audio track 1
[12:48:45]    + decoder: English (DTS-HD MA) (5.1 ch) (track 1, id 0x1)
[12:48:45]      + bitrate: 1536 kbps, samplerate: 48000 Hz
[12:48:45]    + DTS-HD Passthru
Audio track two is being dropped but that's not DTS…
keith2045
Posts: 4
Joined: Tue Jan 05, 2021 2:25 am

Re: DTS Audio passthru cli

Post by keith2045 »

Hmm... that's interesting. I've been checking with mediainfo and it's not showing that.

Anyway it looks like it worked with the latest command, using dtshd as the argument.
Deleted User 11865

Re: DTS Audio passthru cli

Post by Deleted User 11865 »

Probably easiest to specify just "copy" but then you must set --audio-copy-mask dtshd (you can add any supported passthru codec here, e.g. --audio-copy-mask dts.dtshd,truehd,ac3,eac3,aac) and you then set --audio-fallback <encoder> (any encoder of your choice) to be used whenever the input audio cannot be passed through.
Heatvent
Posts: 2
Joined: Mon Mar 29, 2021 4:43 pm

Re: DTS Audio passthru cli

Post by Heatvent »

Hi,

I am trying to do something similar and I think I am getting a bit confused. Let's say my DTSHD track is track 2. I can get passthrough to work with the following...

--audio 2 --aencoder=copy --audio-copy-mask=dtshd

However, if I take don't specify the audio track, it looks like it defaults to track 1 and then downmixes to Dolby Pro Logic II. Is there any way to get Handbrake to automatically select the dtshd audio track. Ultimately, I would like to accomplish the following:

Passthrough only 1 track in order of preference...

DTSHD english
DTS english
TrueHD english
AC3 english

Struggling to accomplish this with the command line arguments.

Thanks!
Post Reply