CLI audio Auto Passthru

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
littlejeem
Posts: 3
Joined: Wed Dec 28, 2016 8:48 am

CLI audio Auto Passthru

Post by littlejeem »

Please detail your question or problem in as much detail as possible:

Hello Folks

I've been trying to create a HandBrakeCLI equivalent of a preset I made in HandBrakeGUI. What I want to achieve is to have a command that will take an input file (bluray backup) and convert it to a mkv with the highest quality available sound and very high quality video as well as extrating and including any forced subtitles or short english subtitles (for foreign language sections).

I was using the following CLI command:

Code: Select all

HandBrakeCLI -i ~/Movies/TESTFILES/DualAudio-test-Track1-AC3-Track2-DTS.mkv -o CONVERTED-DualAudio-test-Track1-AC3-Track2-DTS.mkv -m -E copy:truehd,dtshd,dts,ac3 –audio-copy-mask truehd,dtshd,dts,ac3 –audio-fallback ffac3 -q 20 -F --audio-lang-list eng > CONVERTED-DualAudio-test-Track1-AC3-Track2-DTS.log 2>&1
but I couldn't get tracks like DTS-HD or TrueHD to pass through if they weren't on track one. I spent a few weeks on google and on this forum and came across a post response from John Stebbins stating that the GUI had an option called AutoPassthru so thought I'd play with that as I'd already found another post that said you could save your own presents and then export these and use them in the command line. So I came up with this:

Code: Select all

HandBrakeCLI -i $TRACKIN -o $TRACKOUT -v --preset-import-file ~/TESTFILES/Test10.txt > $TRACKOUT.log 2>&1
which give the log

Code: Select all

http://pastebin.com/UAuTDv0M
the same preset via the MacGui give this log

Code: Select all

http://pastebin.com/eB904MJK
I'm now really confused and need some help to untangle my thinking, research. Any help would be much appreciated. Tanks

Tell us about your environment. What version of HandBrake? What operating system are you running. etc.
Running HandbrakeCLI on Linux (Ubuntu base)
Handbrake-cli=Version: 7412svnppa1~trusty1
Handbrake=Version: 0.9.9+dfsg-2~2.gbpa4c3e9build1
Ubuntu=Ubuntu 14.04.5 LTS(Trusty)

Running HandbrakeGUI on MacBook, OSX Sierra
HandbrakeGUI=Version 1.0.1 (2016122900)

If there was any exception or error displayed, please copy it and paste it here:
I have had no error logs, I suspect this is because the audio fallback option is picking up any error

Please include the scan or encode log:
Please find links here

Code: Select all

http://pastebin.com/eB904MJK

Code: Select all

http://pastebin.com/UAuTDv0M

Code: Select all

 Paste a log of the scan or encode between these code brackets, or use a pastebin website and provide us with the URL it gives you. Logs are required for all support requests.
User avatar
s55
HandBrake Team
Posts: 10358
Joined: Sun Dec 24, 2006 1:05 pm

Re: CLI audio Auto Passthru

Post by s55 »

Handbrake-cli=Version: 7412svnppa1~trusty1
Handbrake=Version: 0.9.9+dfsg-2~2.gbpa4c3e9build1
These are very old and unsupported builds. You'll want to get the offical 1.0.1 from the website. pre 1.0 don't support truehd passthru for example.
littlejeem
Posts: 3
Joined: Wed Dec 28, 2016 8:48 am

Re: CLI audio Auto Passthru

Post by littlejeem »

Hello s55

Thanks for the quick reply on this, I'll update and check back in when I have.

Littlejeem
littlejeem
Posts: 3
Joined: Wed Dec 28, 2016 8:48 am

Re: CLI audio Auto Passthru

Post by littlejeem »

Hello Folks

I updated CLI on ubuntu and now my version reads:

Code: Select all

Version: 1.0.1-zhb-1ppa1~trusty1
, thanks for the pointer s55

I've re-read the help file and constructed the following command which seems to be working for me. Could anyone pass their eye over it and suggest any improvements.

Code: Select all

HandBrakeCLI -i $TRACKIN -o $TRACKOUT -v -e x264 --encoder-preset fast --encoder-tune film --encoder-profile high --encoder-level 4.0 -q 20 --rate 23.976 --pfr -a 1,2,3 -E copy --audio-copy-mask truehd,dtshd,dts,ac3,eac3 --audio-fallback ac3 --mixdown 5point1 --subtitle-lang-list eng --subtitle scan --subtitle-forced 1,2,3 --native-language eng --native-dub
Littlejeem
Post Reply