tools/dvd2concat: add support for chapters

This commit is contained in:
Nicolas George 2021-08-31 15:58:02 +02:00
parent 2263ff505c
commit 5b052c4bcb
1 changed files with 6 additions and 0 deletions

View File

@ -95,6 +95,12 @@ for my $subp (@{$track->{subp}}) {
$concat .= "stream_codec dvd_subtitle\n";
$concat .= "stream_meta language " . $subp->{langcode} . "\n" if $subp->{langcode};
}
my $chap_time = 0;
for my $chap (@{$track->{chapter}}) {
$concat .= sprintf "\nchapter %d %.3f %.3f\n",
$chap->{ix}, $chap_time, $chap_time + $chap->{length};
$chap_time += $chap->{length};
}
for my $cell (@{$track->{cell}}) {
my $off = $cell->{first_sector};
die "Your lsdvd version does not print cell sectors.\n$lsdvd_message"