# 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