From patchwork Tue Aug 31 18:07:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas George X-Patchwork-Id: 29926 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp5155676iov; Tue, 31 Aug 2021 11:09:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzb7wYi65QOu26loF9D9F2jxGhpM0EUEvP2sYvxbW95N6ubyid5Oi+5ci/boyNeNw6bTd0P X-Received: by 2002:a17:907:174b:: with SMTP id lf11mr32287709ejc.35.1630433377045; Tue, 31 Aug 2021 11:09:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630433377; cv=none; d=google.com; s=arc-20160816; b=OSwCpZtbv58hZAxPHEO9E3aZOljHPV4EwOKdpbSx1Gou9tS/daXfJrmD3v5CuMj7u4 qYtmLjaNMTI+JEc3RlZSr8PaMTG5lFn+tk1OSglKyJhw/iAe6/9ktLMA+ghHvDPYHcSC /pRzLriMb9V+sYcyF4U1b/dV3h9NZ92/wJJKZmHvKEBk6nyMHQ44ZCgX3YBd+V9vnnvN hko1oPGCgY4BprHe8jvN7Hz3ViUiTik/B5oPvTr9w+jZa4GGE6y7dpxp+MhHyjvOXy9j X8I0Gd3TPQ+1mzQc7jukTtifLiLoibDvFuwRZelvfC6SIhKwkibIPIqxxUOtbF8+2BQ4 KYVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=45+IjOK1HSK1+CNX0YE7c0lX8sdJAqRlQM1BwwgzNN4=; b=sqXprZlBRM/hoyFkABkOsTZCw/EuwsE2zG/kLmgB5Bm4UlogfERkyDbn74BrOdpHVk xHMAqV/vFnouGu1HKlogLug+g+0uZIVPmGlySOOEyUn7o/A8UxvNGlKqXdPpP4qtdkMg jcqRv6q7pKSrQzMiRnx2oJuGm3X+OB/LVYSWnt2MEeEKhZdNdIgXUrGbUjgYRo0/C1WM s0r6v1FQA9JcYvWu+niXLm7KEg10oyAe8B/XODTJOopB6BSPEa+Wop3HnIHS/SqcHWLE TAYIVBnYhE1zVWklEWMYlocs1/e0TNSH61v/onP6hqJXGsPJk5VUwzWZbH0rK6RMaesi u25w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id dg17si16925120edb.308.2021.08.31.11.09.36; Tue, 31 Aug 2021 11:09:37 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5BA5368A581; Tue, 31 Aug 2021 21:07:59 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from nef.ens.fr (nef2.ens.fr [129.199.96.40]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 306F968A1BB for ; Tue, 31 Aug 2021 21:07:46 +0300 (EEST) X-ENS-nef-client: 129.199.129.80 ( name = phare.normalesup.org ) Received: from phare.normalesup.org (phare.normalesup.org [129.199.129.80]) by nef.ens.fr (8.14.4/1.01.28121999) with ESMTP id 17VI7jNS030780 for ; Tue, 31 Aug 2021 20:07:45 +0200 Received: by phare.normalesup.org (Postfix, from userid 1001) id 5FAA8EB5BD; Tue, 31 Aug 2021 20:07:45 +0200 (CEST) From: Nicolas George To: ffmpeg-devel@ffmpeg.org Date: Tue, 31 Aug 2021 20:07:37 +0200 Message-Id: <20210831180739.873390-10-george@nsup.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210831180739.873390-1-george@nsup.org> References: <20210831180739.873390-1-george@nsup.org> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (nef.ens.fr [129.199.96.32]); Tue, 31 Aug 2021 20:07:45 +0200 (CEST) Subject: [FFmpeg-devel] [PATCH 10/12] tools/dvd2concat: add support for chapters X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: c++YGv8hbkWM Signed-off-by: Nicolas George --- tools/dvd2concat | 6 ++++++ 1 file changed, 6 insertions(+) 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"