my $tmpfile = `tempfile`; chomp($tmpfile);
my $chapter_file = $tmpfile;
my $input_file_options = "-S";
-my $output_file_options = "--chapters $chapter_file";
+my $output_file_options = "--chapters $chapter_file --compression -1:none";
my $timezone = `cat /etc/timezone`; chomp($timezone);
####################################################################################################
print "$cmd\n";
if(! defined $opt_s) {
my $errno = system("$cmd");
- if($errno > 0) { $errno = $errno - 255; }
- if($errno > 1) { die "-E- mkvmerge encountered some errors with exit code $errno\n"; }
+ $errno = $errno >> 8;
+ if($errno > 1) {
+ unlink "$opt_o";
+ die "-E- mkvmerge encountered some errors with exit code $errno\n";
+ }
}
# Remove the temporary file used for the chapter generation