[FFmpeg-devel] [PATCH] avformat/webvttdec: improve WebVTT parsing
Tomas Härdin
git at haerdin.se
Fri Jun 6 22:43:58 EEST 2025
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
/Tomas
More information about the ffmpeg-devel
mailing list