Using first audiotrack ONLY as a fallback?

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
Plumperquatsch
Posts: 6
Joined: Mon Nov 18, 2019 9:55 am

Using first audiotrack ONLY as a fallback?

Post by Plumperquatsch »

I am looking for an option to tell HandbRakeCLI, that is should use audiotrack 1 ONLY as a fallback in case no other audiotrack matches the given language-list.

Background: I have lots of videos, where the audiotrack-language is shown as "unknown" and there is no other audiotrack.
In such a scenario, I want to keep the audio, of course.

But I also have other videos, which have multiple audiotracks and the targeted language is e.g. on audiotrack no. 2 (other than just track 1)

How can I use a global command-syntax to handle all above scenarios without checking each and every video manualla first?

Plumperquatsch
Posts: 6
Joined: Mon Nov 18, 2019 9:55 am

Re: Using first audiotrack ONLY as a fallback?

Post by Plumperquatsch »

I tested this combination of parameters, but if the only audiotrack-language is "unknown" then the video is without audio:
--audio-lang-list "deu" --first-audio

Plumperquatsch
Posts: 6
Joined: Mon Nov 18, 2019 9:55 am

Re: Using first audiotrack ONLY as a fallback?

Post by Plumperquatsch »

currently it looks I need to run a scan on each file first and then I need to parse the output like so:
"HandBrakeCLI.exe" -i "video1.mkv" --scan --previews 1:0 --no-dvdnav --json

but this means I need to switch from pure Batch to Powershell or so. I would be happy, if there is an option to skip that.

Post Reply