Procházet zdrojové kódy

MKV by default, even from MP4 input

Zach Isbach před 6 roky
rodič
revize
156394a4f4
1 změnil soubory, kde provedl 8 přidání a 4 odebrání
  1. 8 4
      encode.pl

+ 8 - 4
encode.pl

@@ -242,18 +242,22 @@ if ($title) {
 }
 }
 
 
 # Ensure we have an output file name with a reasonable extension
 # Ensure we have an output file name with a reasonable extension
-# Force the output format by file name or flag, keeping the input format by default
+# Force the output format by file name or flag
+# Default to MKV if neither is specified
 if (!defined($out_file) || length($out_file) < 1) {
 if (!defined($out_file) || length($out_file) < 1) {
 	$out_file = $in_file;
 	$out_file = $in_file;
-}
-if ($FORCE_MP4) {
-	$FORMAT = 'av_mp4';
 } else {
 } else {
 	my ($format) = $out_file =~ /\.(\w{2,4})$/;
 	my ($format) = $out_file =~ /\.(\w{2,4})$/;
 	if (defined($format)) {
 	if (defined($format)) {
 		$FORMAT = 'av_' . lc($format);
 		$FORMAT = 'av_' . lc($format);
 	}
 	}
 }
 }
+if ($FORCE_MP4) {
+	$FORMAT = 'av_mp4';
+}
+if (!$FORMAT) {
+	$FORMAT = 'av_mkv';
+}
 
 
 # Override the output directory, if requested
 # Override the output directory, if requested
 if ($OUT_DIR) {
 if ($OUT_DIR) {