* [FFmpeg-devel] [PATCH 1/2] lavf/webvttenc: avio_flush() output
@ 2025-06-09 20:59 Tomas Härdin
2025-06-09 21:00 ` [FFmpeg-devel] [PATCH 2/2] lavf/srtenc: " Tomas Härdin
2025-06-09 22:17 ` [FFmpeg-devel] [PATCH 1/2] lavf/webvttenc: " Andreas Rheinhardt
0 siblings, 2 replies; 5+ messages in thread
From: Tomas Härdin @ 2025-06-09 20:59 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1: Type: text/plain, Size: 113 bytes --]
Hi
These two patches are a bit of a warmup for another pass at streamable
subtitles. FATE passes.
/Tomas
[-- Attachment #2: 0001-lavf-webvttenc-avio_flush-output.patch --]
[-- Type: text/x-patch, Size: 698 bytes --]
From c5b1e1774e5d4e720295e6cb589eb7699e0ddaa3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= <git@haerdin.se>
Date: Fri, 16 May 2025 14:07:00 +0200
Subject: [PATCH 1/2] lavf/webvttenc: avio_flush() output
This makes streaming webvtt possible
---
libavformat/webvttenc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavformat/webvttenc.c b/libavformat/webvttenc.c
index e71a6224ae..69f0477a3d 100644
--- a/libavformat/webvttenc.c
+++ b/libavformat/webvttenc.c
@@ -93,6 +93,7 @@ static int webvtt_write_packet(AVFormatContext *ctx, AVPacket *pkt)
avio_write(pb, pkt->data, pkt->size);
avio_printf(pb, "\n");
+ avio_flush(pb);
return 0;
}
--
2.47.2
[-- Attachment #3: 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".
^ permalink raw reply [flat|nested] 5+ messages in thread
* [FFmpeg-devel] [PATCH 2/2] lavf/srtenc: avio_flush() output
2025-06-09 20:59 [FFmpeg-devel] [PATCH 1/2] lavf/webvttenc: avio_flush() output Tomas Härdin
@ 2025-06-09 21:00 ` Tomas Härdin
2025-06-09 22:17 ` [FFmpeg-devel] [PATCH 1/2] lavf/webvttenc: " Andreas Rheinhardt
1 sibling, 0 replies; 5+ messages in thread
From: Tomas Härdin @ 2025-06-09 21:00 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: 0002-lavf-srtenc-avio_flush-output.patch --]
[-- Type: text/x-patch, Size: 708 bytes --]
From c879c0b8a810a53e1d424edb129a1aba2df1b9d1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= <git@haerdin.se>
Date: Mon, 9 Jun 2025 22:03:12 +0200
Subject: [PATCH 2/2] lavf/srtenc: avio_flush() output
This make streaming srt possible
---
libavformat/srtenc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavformat/srtenc.c b/libavformat/srtenc.c
index a8a16a7f50..172fdc9194 100644
--- a/libavformat/srtenc.c
+++ b/libavformat/srtenc.c
@@ -87,6 +87,7 @@ static int srt_write_packet(AVFormatContext *avf, AVPacket *pkt)
avio_write(avf->pb, pkt->data, pkt->size);
avio_write(avf->pb, "\n\n", 2);
+ avio_flush(avf->pb);
srt->index++;
return 0;
}
--
2.47.2
[-- Attachment #3: 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".
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/2] lavf/webvttenc: avio_flush() output
2025-06-09 20:59 [FFmpeg-devel] [PATCH 1/2] lavf/webvttenc: avio_flush() output Tomas Härdin
2025-06-09 21:00 ` [FFmpeg-devel] [PATCH 2/2] lavf/srtenc: " Tomas Härdin
@ 2025-06-09 22:17 ` Andreas Rheinhardt
2025-06-10 21:08 ` Marton Balint
2025-06-13 11:02 ` Tomas Härdin
1 sibling, 2 replies; 5+ messages in thread
From: Andreas Rheinhardt @ 2025-06-09 22:17 UTC (permalink / raw)
To: ffmpeg-devel
Tomas Härdin:
> Hi
>
> These two patches are a bit of a warmup for another pass at streamable
> subtitles. FATE passes.
>
> /Tomas
>
Users who want this should set the generic flush_packets options
appropriately.
- Andreas
_______________________________________________
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".
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/2] lavf/webvttenc: avio_flush() output
2025-06-09 22:17 ` [FFmpeg-devel] [PATCH 1/2] lavf/webvttenc: " Andreas Rheinhardt
@ 2025-06-10 21:08 ` Marton Balint
2025-06-13 11:02 ` Tomas Härdin
1 sibling, 0 replies; 5+ messages in thread
From: Marton Balint @ 2025-06-10 21:08 UTC (permalink / raw)
To: FFmpeg development discussions and patches
On Tue, 10 Jun 2025, Andreas Rheinhardt wrote:
> Tomas Härdin:
>> Hi
>>
>> These two patches are a bit of a warmup for another pass at streamable
>> subtitles. FATE passes.
>>
>> /Tomas
>>
> Users who want this should set the generic flush_packets options
> appropriately.
Agreed, explicit avio_flush() in packet writer functions is a bad idea
because it flushes IO even on not latency critical outputs.
There is some magic in the flush_if_needed() function of mux.c, which by
default uses avio_write_marker() to flush after every packet for streaming
outputs only.
Regards,
Marton
_______________________________________________
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".
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/2] lavf/webvttenc: avio_flush() output
2025-06-09 22:17 ` [FFmpeg-devel] [PATCH 1/2] lavf/webvttenc: " Andreas Rheinhardt
2025-06-10 21:08 ` Marton Balint
@ 2025-06-13 11:02 ` Tomas Härdin
1 sibling, 0 replies; 5+ messages in thread
From: Tomas Härdin @ 2025-06-13 11:02 UTC (permalink / raw)
To: FFmpeg development discussions and patches
tis 2025-06-10 klockan 00:17 +0200 skrev Andreas Rheinhardt:
> Tomas Härdin:
> > Hi
> >
> > These two patches are a bit of a warmup for another pass at
> > streamable
> > subtitles. FATE passes.
> >
> > /Tomas
> >
> Users who want this should set the generic flush_packets options
> appropriately.
D'oh! Well in that case I retract this patchset :]
/Tomas
_______________________________________________
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".
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-06-13 11:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-09 20:59 [FFmpeg-devel] [PATCH 1/2] lavf/webvttenc: avio_flush() output Tomas Härdin
2025-06-09 21:00 ` [FFmpeg-devel] [PATCH 2/2] lavf/srtenc: " Tomas Härdin
2025-06-09 22:17 ` [FFmpeg-devel] [PATCH 1/2] lavf/webvttenc: " Andreas Rheinhardt
2025-06-10 21:08 ` Marton Balint
2025-06-13 11:02 ` Tomas Härdin
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