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 C0AAF48E40 for ; Tue, 28 Jan 2025 14:37:28 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0A30B68B7AB; Tue, 28 Jan 2025 16:37:24 +0200 (EET) Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C1E9A68B559 for ; Tue, 28 Jan 2025 16:37:17 +0200 (EET) Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-3862d16b4f5so3542536f8f.0 for ; Tue, 28 Jan 2025 06:37:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=datarhei.com; s=google; t=1738075036; x=1738679836; darn=ffmpeg.org; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=6/N+3XKcaEsrta6xPPoCgniQLaoELU0+ZLGcUsjkeJw=; b=Vgj5MrAWXJSO1HPJfFpdDmJOwqF9vElyEZVr0FZ6yo0PN5axBYhI6IolD3lYI05vXw loU9xIdn3XhdHHs20QCGqyvcdXJxZEg7VoESUfcHLedfVaVIw7jzsW+wQq+7gPDk9eeA VnIYLKpstwrryLKcqg9YEV7jn8QQRi0wKmIMYbYgsDwyxSXF8J7Gck5mJc3gg4W6ausb UlJHqnigGObFG192lZNd+bBfpbNPgPPSo17tbp99n/BxYCzo0NFp2Y0MFYn9EKhB7ciG 5w2+cOoA40yPGq86r3fYyfVYs4RC+3tZBARGL8mzgn3PYrqgBP3TcU9lRVyPboSRT1bB k0DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738075036; x=1738679836; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6/N+3XKcaEsrta6xPPoCgniQLaoELU0+ZLGcUsjkeJw=; b=POVXUDGi7jvbNd5AkhuxFOd6MjqzreQeWuUbMmu2R9N2k/jFlCN1d63u8B+Y/jqlZQ hY3KBR+CgZH0lGom/Ul/2cAWwLbII5oS50qPL6rWF3YgCn7crj2tMcA+rI07srqRFzVG zi0Y7OU344Feqe7ltp6xRxPcC5sZc2KYzwKMCryawQzXa793uKI6oWrhP9hFDdXPiqHr cKPOQyAl276hI5Nl/QiuqNGyTVcCtHLq+tRIHmsj8d0mpEc4hY6zbWgVawiBh7ezresh aWKI72R4afY9Z0Bn9ZJCPTAOMpUtoAMWpheNOOrIdcahChoxUak5yermcW/sPmYdvpHq N27w== X-Gm-Message-State: AOJu0YwU8ljmfdlxE6qSFthVm4nm6FinJIypDqPjvwEeI/NyOTwXPv/y cUqg9Fz9/lKnQ5pYQICq6QkHABk7C+FESrE3HP776K077G89KskwSy/W8tjaichRnXsrq3T2r8A = X-Gm-Gg: ASbGncuQrdU5NJOnJImXQIxN6PV7wu2dYuWg8w3hS5gGurcIAwf3nh52OKA6tpAFZxB jUdxS6aXsFwYdJ1fN016MZZgOdQ2QqQNh2inELMFTY4eOQplfFDi5yYZr8oUjdB31tlesjH8yL1 wBl7rZbkqtvxtJJ7bKKM5xq9TSEgbZJAmYWWqlHVwSJs9Kl4m6U8uKH0ACiiU4q2XHnOFKsaMrs UzoDPEmEv+gwQkY545cWotNSjv0CsRdO1oGgAtjRAQOVOQmtMcQd0xj5xOI+l77rspArYZPgcZb c2ceslDXflAPzcYy8NoiBp5RhDZKrdBi23g= X-Google-Smtp-Source: AGHT+IHK4XV0P5LqQWtPLPBby/h6KAIF/ndNgtbW8CWPbVk9lN78PRyT9BODN1F2DAT0RtysvFClNQ== X-Received: by 2002:a05:6000:156e:b0:38b:f4dc:44ad with SMTP id ffacd0b85a97d-38c49a050aamr3036769f8f.5.1738075035850; Tue, 28 Jan 2025 06:37:15 -0800 (PST) Received: from smtpclient.apple ([2a04:ee41:4:b3b0:49c0:cd01:9cb2:8ed6]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38c2a1c3fedsm13987368f8f.85.2025.01.28.06.37.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Jan 2025 06:37:15 -0800 (PST) From: Ingo Oppermann Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3818.100.11.1.3\)) Date: Tue, 28 Jan 2025 15:37:04 +0100 References: <20250127090930.52101-1-ingo@datarhei.com> <20250128141019.GW4991@pb2> To: FFmpeg development discussions and patches In-Reply-To: <20250128141019.GW4991@pb2> Message-Id: X-Mailer: Apple Mail (2.3818.100.11.1.3) 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: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: > On 28 Jan 2025, at 15:10, Michael Niedermayer wrote: > > 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. >> >> 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. >> >> 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). >> >> 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 >> >> 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 > ... > As suggested by Gyan, I'll rework the patch in order to not change the default behaviour. Currently it overrules hls_init_time as well. > [...] > > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > The misfortune of the wise is better than the prosperity of the fool. > -- Epicurus > _______________________________________________ > 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". _______________________________________________ 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".