Darksoul71
23rd October 2013, 13:54
Hi all,
I hope here is the right place to ask this since I want to use Handbrake CLI rather than using the GUI version.
I am currently hacking together a crude script which shall encode / shrink multiple MKV files with Handbrake CLI. I have used Handbrake CLI for shrinking the video with h264 in CRF so far with sucess. Audio encoding is currently done via ffmpeg and remux of the external AC3 tracks is done via mkvmerge. Now I would like to do audio encoding as part of the Handbrake encoding step.
Unfortunately the Handbrake CLI help does not elaborate things when you have multiple audio streams in different formats.
Handbrake CLI is controlled via those parameters:
-a 1,2,3 = Audiotracks to process
-E <string> = Audio encoder used
--audio-copy-mask <string> = which codecs are allowed to be copied
My educated guess for a MKV with three audio streams and the wish to encode all "non-AC3" tracks to AC3 would look like this:
-a 1,2,3 -E copy:AC3,ffac3
..but I am not shure. It would be great if someone could shed some light into my darkness and keep me from experimenting with those tons of options.
:thanks:
Background: Source MKVs are either from satellite (AC3 plus MP2 audio) or BD Rips (AC3 plus DTS / DTS-HD audio).
Targeted audio format is always AC3. So raw AC3 tracks should be copied over and any non-AC3 audio tracks should be converted to AC3.
Funny enough I have not found any related posting / script snipplet for this even after some serious Google Kung-Fu :(
TIA,
D$
I hope here is the right place to ask this since I want to use Handbrake CLI rather than using the GUI version.
I am currently hacking together a crude script which shall encode / shrink multiple MKV files with Handbrake CLI. I have used Handbrake CLI for shrinking the video with h264 in CRF so far with sucess. Audio encoding is currently done via ffmpeg and remux of the external AC3 tracks is done via mkvmerge. Now I would like to do audio encoding as part of the Handbrake encoding step.
Unfortunately the Handbrake CLI help does not elaborate things when you have multiple audio streams in different formats.
Handbrake CLI is controlled via those parameters:
-a 1,2,3 = Audiotracks to process
-E <string> = Audio encoder used
--audio-copy-mask <string> = which codecs are allowed to be copied
My educated guess for a MKV with three audio streams and the wish to encode all "non-AC3" tracks to AC3 would look like this:
-a 1,2,3 -E copy:AC3,ffac3
..but I am not shure. It would be great if someone could shed some light into my darkness and keep me from experimenting with those tons of options.
:thanks:
Background: Source MKVs are either from satellite (AC3 plus MP2 audio) or BD Rips (AC3 plus DTS / DTS-HD audio).
Targeted audio format is always AC3. So raw AC3 tracks should be copied over and any non-AC3 audio tracks should be converted to AC3.
Funny enough I have not found any related posting / script snipplet for this even after some serious Google Kung-Fu :(
TIA,
D$