Alright, I've updated the patch with the ticket number. Should I apply this fix to the WebM muxer as well? The WebM spec is not clear on what to do in this case.
On Sat, 6 Feb 2021 at 22:02, Carl Eugen Hoyos <ceffm...@gmail.com> wrote: > > Am So., 7. Feb. 2021 um 03:50 Uhr schrieb Walter Wong <wwong5...@gmail.com>: > > > > Added the codec id S_TEXT/WEBVTT in order to bring ffmpeg generated files > > closer to the matroska spec. The list of matroska codec ids was also > > rearranged to push the old codec id (D_WEBVTT/SUBTITLES) to the bottom of > > the list so that S_TEXT/WEBVTT is the default codec id for new mkv files > > with webvtt subtitles. > > Please mention ticket #5641 if the patch fixes decoding the file > attached there. > > Carl Eugen > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
From b468930802a888679a48bdb60d85a1f5dfad8694 Mon Sep 17 00:00:00 2001 From: Walter Wong <wwong5...@gmail.com> Date: Sat, 6 Feb 2021 20:18:04 -0500 Subject: [PATCH] Add matroska codec id S_TEXT/WEBVTT for WebVTT streams. Added the codec id S_TEXT/WEBVTT in order to bring ffmpeg generated files closer to the matroska spec. The list of matroska codec ids was also rearranged to push the old codec id (D_WEBVTT/SUBTITLES) to the bottom of the list so that S_TEXT/WEBVTT is the default codec id for new mkv files with webvtt subtitles. Fixes ticket #5641: http://trac.ffmpeg.org/ticket/5641 --- libavformat/matroska.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/libavformat/matroska.c b/libavformat/matroska.c index 7c56aba403..1128c96451 100644 --- a/libavformat/matroska.c +++ b/libavformat/matroska.c @@ -60,16 +60,12 @@ const CodecTags ff_mkv_codec_tags[]={ {"A_VORBIS" , AV_CODEC_ID_VORBIS}, {"A_WAVPACK4" , AV_CODEC_ID_WAVPACK}, - {"D_WEBVTT/SUBTITLES" , AV_CODEC_ID_WEBVTT}, - {"D_WEBVTT/CAPTIONS" , AV_CODEC_ID_WEBVTT}, - {"D_WEBVTT/DESCRIPTIONS", AV_CODEC_ID_WEBVTT}, - {"D_WEBVTT/METADATA" , AV_CODEC_ID_WEBVTT}, - {"S_TEXT/UTF8" , AV_CODEC_ID_SUBRIP}, {"S_TEXT/UTF8" , AV_CODEC_ID_TEXT}, {"S_TEXT/ASCII" , AV_CODEC_ID_TEXT}, {"S_TEXT/ASS" , AV_CODEC_ID_ASS}, {"S_TEXT/SSA" , AV_CODEC_ID_ASS}, + {"S_TEXT/WEBVTT" , AV_CODEC_ID_WEBVTT}, {"S_ASS" , AV_CODEC_ID_ASS}, {"S_SSA" , AV_CODEC_ID_ASS}, {"S_VOBSUB" , AV_CODEC_ID_DVD_SUBTITLE}, @@ -100,6 +96,14 @@ const CodecTags ff_mkv_codec_tags[]={ {"V_VP8" , AV_CODEC_ID_VP8}, {"V_VP9" , AV_CODEC_ID_VP9}, + /* These codec strings for webvtt seem to be depreciated from the Matroska + spec, but it might be useful to keep them for compatibility for older + files. These are at the bottom so they get matched after S_TEXT/WEBVTT. */ + {"D_WEBVTT/SUBTITLES" , AV_CODEC_ID_WEBVTT}, + {"D_WEBVTT/CAPTIONS" , AV_CODEC_ID_WEBVTT}, + {"D_WEBVTT/DESCRIPTIONS", AV_CODEC_ID_WEBVTT}, + {"D_WEBVTT/METADATA" , AV_CODEC_ID_WEBVTT}, + {"" , AV_CODEC_ID_NONE} }; -- 2.30.0
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".