[FFmpeg-devel] [PATCH] avformat/webvttdec: improve WebVTT parsing

Michael Niedermayer michael at niedermayer.cc
Fri Jul 18 16:08:38 EEST 2025


Hi Tomas

On Fri, Jun 06, 2025 at 09:43:58PM +0200, Tomas Härdin wrote:
> tis 2025-05-27 klockan 10:40 +0000 skrev Marcos Del Sol via ffmpeg-
> devel:
> > A note on this change: I found some .vtt files while using yt-dlp
> > that follow
> > a draft version of the WebVTT standard (probably
> > https://www.w3.org/2013/07/webvtt.html) that use "Region:" for
> > regions instead
> > of "REGION", and that was causing the conversion to .srt to fail
> > completely.
> 
> Sounds like the demuxer correctly rejected some broken files
> 
> > +        res = webvtt_parse_cue(webvtt, &cue, pos);
> > +        if (res < 0) {
> > +            if (res != AVERROR_INVALIDDATA)
> > +                goto end;
> > +            av_log(s, AV_LOG_DEBUG, "Ignoring non-cue block at
> > 0x%"PRIx64"\n", pos);
> >          }
> 
> This kind of change will cause broken files to proliferate, which is
> bad for the WebVTT ecosystem, bringing it closer to the mess that is
> the SubRip ecosystem

at the risk of not getting the joke across

but you are mixing up germanic, french and latin. Should we really
be proliferating that mess ? ;)

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250718/e0b80ec7/attachment.sig>


More information about the ffmpeg-devel mailing list