From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 53B1648BF0 for ; Tue, 28 Jan 2025 14:10:31 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CB0C068B6F8; Tue, 28 Jan 2025 16:10:27 +0200 (EET) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 931F468B4AB for ; Tue, 28 Jan 2025 16:10:21 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id EDFCA43190 for ; Tue, 28 Jan 2025 14:10:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1738073421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=sSZHU6Addi6LRvZlVxBeMy2QRFC06J8fLxBQzOcgv3g=; b=IDb1ObhSzL518u+r/tMfcIurBvCtIDG4qV5NlQXYB2UzTIpjmJe+qwfhp+YkoY/1Kr3OaL giR+d2/m1GBKYiCJhO4TeSOKn9uYCFWrcYX7le11I62WizzomIW+Fv+GK16YzLCeoQEcPF kC6+tjvp2SG/pReVjYGJDcrj83ttsZl2IjJwr81cxGJyN5UfIVHg0l+ZIw4VkDEC3OUuBe b1RX14mmuKkLP4e75K08bQU8AKtQqGGxzT2ybfy5FGDN0wJTAqYMvadyPwoZus3W9hfQjf wudfDuanWkjwFSLkiIGAZ1sFp6czwnn5Edj/qj4atlWmwhxUimK9JkRzLZNSWw== Date: Tue, 28 Jan 2025 15:10:19 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20250128141019.GW4991@pb2> References: <20250127090930.52101-1-ingo@datarhei.com> MIME-Version: 1.0 In-Reply-To: <20250127090930.52101-1-ingo@datarhei.com> X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeftdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdludehmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnhepieegkedtjeduffejhfetgeejtdegteetgfegtdfhjefgvefhteegkeejtddvhfevnecukfhppeeguddrieeirdeijedruddufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeguddrieeirdeijedruddufedphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhepmhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtpdhnsggprhgtphhtthhopedupdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrgh X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH v2] avformat/hlsenc: fix hls_time not respected 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 Content-Type: multipart/mixed; boundary="===============6492898426990622083==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============6492898426990622083== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ezPNsAewe1QDj68E" Content-Disposition: inline --ezPNsAewe1QDj68E Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 27, 2025 at 10:09:30AM +0100, Ingo Oppermann wrote: > This fixes the criterion when to split the segments based on the > elapsed time for the current segment instead of using the theoretical > elapsed time since start based on hls_time and the number of written > segments. >=20 > hls_time is used to define the minimum length of a segment, however > this is not respected in all cases when a stream has variable GOP > sizes. >=20 > Imagine a stream starts with a key frame every 10 seconds for > e.g. 30 seconds. After that, key frames will come every second. This > will result in segments that are first 10 seconds (as expected), then > 1 second for some time (not as expected) and later 2 seconds (as > expected). >=20 > How to reproduce: > ffmpeg -t 30 -f lavfi -i testsrc2 -codec:v libx264 -g 250 part1.mp4 > ffmpeg -t 30 -f lavfi -i testsrc2 -codec:v libx264 -g 25 part2.mp4 > echo "file part1.mp4\nfile part2.mp4" > list.txt > ffmpeg -f concat -i list.txt -codec copy \ > -f hls -hls_time 2 -hls_list_size 0 parts.m3u8 > cat parts.m3u8 >=20 > Signed-off-by: Ingo Oppermann > --- > libavformat/hlsenc.c | 12 +++--------- > 1 file changed, 3 insertions(+), 9 deletions(-) this breaks / needs to update fate-hls-init-time --- ./tests/ref/fate/hls-init-time 2025-01-28 13:58:16.733614814 +0100 +++ tests/data/fate/hls-init-time 2025-01-28 15:09:03.869138579 +0100 @@ -3,310 +3,308 @@ #codec_id 0: pcm_s16le #sample_rate 0: 44100 #channel_layout_name 0: mono -0, 0, 0, 1152, 2304, 0x28123557 -0, 1152, 1152, 1152, 2304, 0x838c7e81 -0, 2304, 2304, 1152, 2304, 0x4fb8704c -0, 3456, 3456, 1152, 2304, 0x5f787f9e =2E.. [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The misfortune of the wise is better than the prosperity of the fool. -- Epicurus --ezPNsAewe1QDj68E Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZ5jlRgAKCRBhHseHBAsP qxncAJ96s3SlT6JgAJ7b4h3wUH2mkaBB8QCbB4c6jpmSaAClgNIFjRwcO2ypn2E= =7tF6 -----END PGP SIGNATURE----- --ezPNsAewe1QDj68E-- --===============6492898426990622083== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". --===============6492898426990622083==--