Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas George <george@nsup.org>2021-08-31 16:58:02 +0300
committerNicolas George <george@nsup.org>2021-09-16 11:17:59 +0300
commit5b052c4bcbf711b418ca6991799764dfe7ae6163 (patch)
treeb6ed0bd9c965343c4bd9c389b50be8a2ae16e812 /tools/dvd2concat
parent2263ff505c986f03005674072c1d46f0723143ea (diff)
tools/dvd2concat: add support for chapters
Diffstat (limited to 'tools/dvd2concat')
-rwxr-xr-xtools/dvd2concat6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/dvd2concat b/tools/dvd2concat
index ea8b7ba8c9..ccc021c4cc 100755
--- a/tools/dvd2concat
+++ b/tools/dvd2concat
@@ -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"