From: Michael Niedermayer <michael@niedermayer.cc>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH v2] avformat/hlsenc: fix hls_time not respected
Date: Tue, 28 Jan 2025 15:10:19 +0100
Message-ID: <20250128141019.GW4991@pb2> (raw)
In-Reply-To: <20250127090930.52101-1-ingo@datarhei.com>
[-- Attachment #1.1: Type: text/plain, Size: 1955 bytes --]
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 <ingo@datarhei.com>
> ---
> 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
...
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
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".
next prev parent reply other threads:[~2025-01-28 14:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-27 9:09 Ingo Oppermann
2025-01-28 14:10 ` Michael Niedermayer [this message]
2025-01-28 14:37 ` Ingo Oppermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250128141019.GW4991@pb2 \
--to=michael@niedermayer.cc \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git