X-Git-Url: http://git.pippins.net/embedvideo/.git/?a=blobdiff_plain;f=mkv_extract_chapter;h=273484b82c7ed0cb299e39d8f3ff5303e5fe36bd;hb=HEAD;hp=d8825ae2b7ed0f4f015e65840784730d4215a037;hpb=d0bb8d7ba0914fb2e31422aa1207ba6eaf490deb;p=videoscripts%2F.git diff --git a/mkv_extract_chapter b/mkv_extract_chapter index d8825ae..273484b 100755 --- a/mkv_extract_chapter +++ b/mkv_extract_chapter @@ -39,7 +39,7 @@ use Getopt::Std; #################################################################################################### # Configuration parameters - CHANGE THESE TO SUITE YOUR NEEDS my $ffmpeg=`which ffmpeg`; chomp($ffmpeg); -my $tmpfile = `tempfile`; chomp($tmpfile); +my $tmpfile = `mktemp`; chomp($tmpfile); #################################################################################################### #################################################################################################### @@ -129,7 +129,7 @@ if(!$progressive) { # For each chapter specified on the command line, use ffmpeg to extract a video clip from that chapter my @ffmpeg_info = `$ffmpeg -i $opt_i 2>&1`; foreach $line (@ffmpeg_info) { - if($line =~ /Chapter #\d+\.(\d+): start (\S+), end (\S+)/) { + if($line =~ /Chapter #\d+\:(\d+): start (\S+), end (\S+)/) { $chapter = $1; $start = $2; if($start > 0) { $start += 1; } # Add some margin to prevent taking a piece of the previous clip