Which command line args do i need for my specific audio selection?

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
mfreudenberg
New User
Posts: 1
Joined: Fri Jan 01, 2021 6:03 pm

Which command line args do i need for my specific audio selection?

Post by mfreudenberg »

Hi

Description of problem or question:

I would like to rip my BluRays and DVD with a specific set of audio tracks. I am using HandbrakeCLI integrated into ARM (https://github.com/automatic-ripping-ma ... ng-machine). What i would like to achive is the following default track setup for my output files:

1. Deu, Stereo
2. Deu, Surround (any kind of doesn't matter if 5.1 or 7.1 or else)
3. Eng, Stereo
4. Eng, Surround (same as Deu, Surround)

Steps to reproduce the problem (If Applicable):

I am using the following HandbrakeCLI parameter for recoding:

--subtitle-lang-list deu,eng --subtitle-burned --audio-lang-list deu,eng --aencoder=ca_aac,copy,ca_aac,copy --audio-copy-mask aac,ac3,eac3,truehd,dts,dtshd --audio-fallback aac --mixdown stereo,7point1,stereo,7point1

My resulting video has the following tracks (according to VLC):

1. Deu, AAC Stereo
2. Deu, DTS Audio
3. Deu, AAC Stereo
4. Deu, DTS Audio
5. Eng, AAC Stereo

I don't really understand why HandbrakeCLI selected these tracks?

My input file (Lord of the Rings extended edition) has the following audio tracks:

bd: audio id=0x711100, lang=English (DTS), 3cc=eng
bd: audio id=0x1100, lang=English (DTS-HD MA), 3cc=eng
bd: audio id=0x711101, lang=Deutsch (DTS), 3cc=deu
bd: audio id=0x1101, lang=Deutsch (DTS-HD MA), 3cc=deu
bd: audio id=0x1102, lang=English (AC3), 3cc=eng
bd: audio id=0x1103, lang=English (AC3), 3cc=eng
bd: audio id=0x1104, lang=English (AC3), 3cc=eng
bd: audio id=0x1105, lang=English (AC3), 3cc=eng

Can anybody help me get the right command line arguments?

HandBrake version (e.g., 1.0.0):

HandBrakeCLI --version
Cannot load libnvidia-encode.so.1
[22:37:01] hb_init: starting libhb thread
[22:37:01] thread 7fd629e82700 started ("libhb")
HandBrake 1.3.3

I have installed HandbrakeCLI using this repo:

Code: Select all

deb http://ppa.launchpad.net/stebbins/handbrake-releases/ubuntu focal main
Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):

Ubuntu 20.04.1 LTS

HandBrake Activity Log ***required***

Code: Select all

I followed the instructions on the link above to get the activity log, but the folder ghb didn't contain any activity.log file.
All i could find was
ghb.pid.xxxxx
preferences.json
presets.json
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Which command line args do i need for my specific audio selection?

Post by mduell »

Really can't answer this without the stderr output from HBCLI for your attempted encode.
rollin_eng
Veteran User
Posts: 4840
Joined: Wed May 04, 2011 11:06 pm

Re: Which command line args do i need for my specific audio selection?

Post by rollin_eng »

Activity Logs on the command line

HandBrake’s command line interface outputs to the standard streams stdout and stderr, with encode progress information routed to the former and log messages routed to the latter.

To capture HandBrake’s log messages to a file, simply redirect stderr:

HandBrakeCLI ... 2> my-activity-log.txt
Deleted User 11865

Re: Which command line args do i need for my specific audio selection?

Post by Deleted User 11865 »

If you have an audio lang list, you only specify one list of encoders (ca_aac,copy) which then gets applied to all tracks. Also, there are two behaviors with a language list: first track matching selected languages (--first-audio) or all tracks matching selected languages (--all-audio), it's possible the former is default.

Also, IIRC, HandBrake will include both the DTS and DTS-HD so you'll have to manually remove the tracks encoded from the DTS.
Post Reply