|
|
@@ -18,6 +18,7 @@ my $WIDTH = undef();
|
|
|
my $AUDIO_EXCLUDE_REGEX = '\b(?:Chinese|Espanol|Francais|Japanese|Korean|Portugues|Thai)\b';
|
|
|
my $SUB_INCLUDE_REGEX = '\b(?:English|Unknown|Closed\s+Captions)\b';
|
|
|
my $FORCE_MP4 = 0;
|
|
|
+my $OUT_DIR = undef();
|
|
|
|
|
|
# Applicaton configuration
|
|
|
my $HD_WIDTH = 1350;
|
|
|
@@ -83,6 +84,11 @@ if ($ENV{'AUDIO_BITRATE'}) {
|
|
|
$AUDIO_BITRATE = $ENV{'AUDIO_BITRATE'};
|
|
|
}
|
|
|
|
|
|
+# Use an alternate output directory, if specified
|
|
|
+if ($ENV{'OUT_DIR'}) {
|
|
|
+ $OUT_DIR = $ENV{'OUT_DIR'};
|
|
|
+}
|
|
|
+
|
|
|
# Allow overrides for video height and width. The default is "same as source".
|
|
|
if ($ENV{'HEIGHT'}) {
|
|
|
push(@video_params, '--maxHeight', $ENV{'HEIGHT'});
|
|
|
@@ -176,6 +182,11 @@ if (!defined($out_file) || length($out_file) < 1) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+# Override the output directory, if requested
|
|
|
+if ($OUT_DIR) {
|
|
|
+ $out_file = $OUT_DIR . basename($out_file);
|
|
|
+}
|
|
|
+
|
|
|
# Keep copies of our defaults so we can reset between tracks
|
|
|
my $format_default = $FORMAT;
|
|
|
|