From: toots via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: toots <code@ffmpeg.org>
Subject: [FFmpeg-devel] [PR] libavformat/matroskadec.c: export profile container metadata to (PR #21787)
Date: Wed, 18 Feb 2026 17:42:22 -0000
Message-ID: <177143654327.25.15092494625359613680@29965ddac10e> (raw)
PR #21787 opened by toots
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21787
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21787.patch
>From 518aaeb592a43dddc27f4d89d32639d277ad8bfe Mon Sep 17 00:00:00 2001
From: Romain Beauxis <romain.beauxis@gmail.com>
Date: Wed, 18 Feb 2026 11:40:50 -0600
Subject: [PATCH] libavformat/matroskadec.c: export profile container metadata
to distinguish between matroska and webm at runtime.
---
doc/APIchanges | 3 +++
libavformat/matroskadec.c | 1 +
tests/fate/matroska.mak | 7 +++++++
tests/ref/fate/matroska-profile-mkv | 3 +++
tests/ref/fate/matroska-profile-webm | 3 +++
5 files changed, 17 insertions(+)
create mode 100644 tests/ref/fate/matroska-profile-mkv
create mode 100644 tests/ref/fate/matroska-profile-webm
diff --git a/doc/APIchanges b/doc/APIchanges
index 2b43139b48..52aec6cce6 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2025-03-28
API changes, most recent first:
+2026-02-18 - xxxxxxxxxx - lavf 62.9.100 - matroskadec.c
+ Export profile metadata to distinguish between matroska and webm at runtime.
+
2026-02-13 - xxxxxxxxxx - lavu 60.25.100 - avassert.h
Deprecate av_assert0_fpu() and av_assert2_fpu() without replacement.
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 503b99b286..417b3f458c 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -3390,6 +3390,7 @@ static int matroska_read_header(AVFormatContext *s)
1000 / AV_TIME_BASE;
av_dict_set(&s->metadata, "title", matroska->title, 0);
av_dict_set(&s->metadata, "encoder", matroska->muxingapp, 0);
+ av_dict_set(&s->metadata, "profile", matroska->is_webm ? "webm" : "matroska", 0);
if (matroska->date_utc.size == 8)
matroska_metadata_creation_time(&s->metadata, AV_RB64(matroska->date_utc.data));
diff --git a/tests/fate/matroska.mak b/tests/fate/matroska.mak
index 90e3db3217..79787c8c89 100644
--- a/tests/fate/matroska.mak
+++ b/tests/fate/matroska.mak
@@ -281,6 +281,13 @@ fate-matroska-side-data-pref-packet: CMD = run ffprobe$(PROGSSUF)$(EXESUF) $(TAR
-select_streams v:0 -show_streams -show_frames -show_entries stream=stream_side_data:frame=frame_side_data_list -side_data_prefer_packet mastering_display_metadata,content_light_level
FATE_MATROSKA_FFPROBE-$(call ALLYES, MATROSKA_DEMUXER HEVC_DECODER) += fate-matroska-side-data-pref-codec fate-matroska-side-data-pref-packet
+# Test that the matroska demuxer correctly exports the EBML DocType as profile metadata
+FATE_MATROSKA_FFPROBE-$(call DEMDEC, MATROSKA, PRORES) += fate-matroska-profile-mkv
+fate-matroska-profile-mkv: CMD = run ffprobe$(PROGSSUF)$(EXESUF) -show_entries format_tags=profile -v 0 $(TARGET_SAMPLES)/mkv/prores_zlib.mkv
+
+FATE_MATROSKA_FFPROBE-$(call DEMDEC, MATROSKA, VP9) += fate-matroska-profile-webm
+fate-matroska-profile-webm: CMD = run ffprobe$(PROGSSUF)$(EXESUF) -show_entries format_tags=profile -v 0 $(TARGET_SAMPLES)/vp9-test-vectors/vp90-2-2pass-akiyo.webm
+
FATE_SAMPLES_AVCONV += $(FATE_MATROSKA-yes)
FATE_SAMPLES_FFPROBE += $(FATE_MATROSKA_FFPROBE-yes)
FATE_SAMPLES_FFMPEG_FFPROBE += $(FATE_MATROSKA_FFMPEG_FFPROBE-yes)
diff --git a/tests/ref/fate/matroska-profile-mkv b/tests/ref/fate/matroska-profile-mkv
new file mode 100644
index 0000000000..58ded133b8
--- /dev/null
+++ b/tests/ref/fate/matroska-profile-mkv
@@ -0,0 +1,3 @@
+[FORMAT]
+TAG:profile=matroska
+[/FORMAT]
diff --git a/tests/ref/fate/matroska-profile-webm b/tests/ref/fate/matroska-profile-webm
new file mode 100644
index 0000000000..0f428c8d97
--- /dev/null
+++ b/tests/ref/fate/matroska-profile-webm
@@ -0,0 +1,3 @@
+[FORMAT]
+TAG:profile=webm
+[/FORMAT]
--
2.52.0
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org
reply other threads:[~2026-02-18 17:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=177143654327.25.15092494625359613680@29965ddac10e \
--to=ffmpeg-devel@ffmpeg.org \
--cc=code@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