Jelajahi Sumber

Merge branch 'master' of github.com:profplump/UberZach-Video

Zachary Kotlarek 6 tahun lalu
induk
melakukan
1111cd4d37
1 mengubah file dengan 8 tambahan dan 4 penghapusan
  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
-# 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) {
 	$out_file = $in_file;
-}
-if ($FORCE_MP4) {
-	$FORMAT = 'av_mp4';
 } else {
 	my ($format) = $out_file =~ /\.(\w{2,4})$/;
 	if (defined($format)) {
 		$FORMAT = 'av_' . lc($format);
 	}
 }
+if ($FORCE_MP4) {
+	$FORMAT = 'av_mp4';
+}
+if (!$FORMAT) {
+	$FORMAT = 'av_mkv';
+}
 
 # Override the output directory, if requested
 if ($OUT_DIR) {