|
|
@@ -22,6 +22,7 @@ my %LANG_INCLUDE_ISO = ('639-1' => 1);
|
|
|
my $HB_EXEC = $ENV{'HOME'} . '/bin/video/HandBrakeCLI';
|
|
|
my $DEBUG = 0;
|
|
|
my $FORCE_MKV = 0;
|
|
|
+my $AUDIO_COPY = 0;
|
|
|
|
|
|
# Runtime debug mode
|
|
|
if (defined($ENV{'DEBUG'}) && $ENV{'DEBUG'}) {
|
|
|
@@ -45,6 +46,11 @@ if ($ENV{'SUB_INCLUDE_REGEX'}) {
|
|
|
$SUB_INCLUDE_REGEX = $ENV{'SUB_INCLUDE_REGEX'};
|
|
|
}
|
|
|
|
|
|
+# Allow copy-only audio transfers (for use in re-encoding)
|
|
|
+if ($ENV{'AUDIO_COPY'}) {
|
|
|
+ $AUDIO_COPY = 1;
|
|
|
+}
|
|
|
+
|
|
|
# Command-line parameters
|
|
|
my ($in_file, $out_file, $title) = @ARGV;
|
|
|
if (!defined($in_file) || length($in_file) < 1 || !-r $in_file) {
|
|
|
@@ -381,6 +387,11 @@ sub audioOptions($) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ # Clear the mixdown selection if we're copying audio
|
|
|
+ if ($AUDIO_COPY) {
|
|
|
+ $mixdown = undef();
|
|
|
+ }
|
|
|
+
|
|
|
# Mixdown track first
|
|
|
my @audio_tracks = ();
|
|
|
if (defined($mixdown) && $mixdown > 0) {
|