PR #25845 opened by 06needhamt
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25845
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25845.patch

# Summary of changes

Twelve FOURCCs that the AVI demuxer does not map to a codec, one per patch. 
Each maps to an existing codec ID that has a decoder.

How they were found: 
A clip of each codec FFmpeg can encode was written to AVI and the stream and 
FOURCC checked with ffprobe (n6.1.1); the included FOURCCs came out as an 
unknown codec. The mappings come from LAV Filters' own FOURCC table 
(decoder/LAVVideo/Media.cpp and demuxer/Demuxers/LAVFVideoHelper.h), which
each commit message cites.

main table (next to the existing family, as the muxer's first tag is
unchanged): RV10, RV20, RV30, 3IVX, 3IV1.

ff_codec_bmp_tags_unofficial (demuxer only, the muxer does not write them): 
2VMW, CCV1, HM10, BMP, WEBP, RoQV, vcrd

Not included: VP8X (maps to AV_CODEC_ID_WEBP_ANIM, which has no decoder), and 
tags FFmpeg already maps by another route.


>From ba47cc77023993f53b81b2e4025dde1fc766e8bd Mon Sep 17 00:00:00 2001
From: Tom Needham <[email protected]>
Date: Sat, 7 Nov 2026 19:55:34 +0000
Subject: [PATCH 01/12] avformat/riff: add RV10 codec tag

RealVideo 1.0 is identified by the FOURCC RV10, in the same way as
RV40 and RV60 already are.

Without an entry the AVI demuxer leaves the codec_id of such a stream
unset, so it cannot be decoded although the rv10 decoder exists. LAV
Filters maps the same FOURCC to AV_CODEC_ID_RV10 (decoder/LAVVideo/
Media.cpp).

As the codec had no tag in this table at all, this also gives the AVI
muxer a tag to write for it.

Signed-off-by: Tom Needham <[email protected]>
---
 libavformat/riff.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/riff.c b/libavformat/riff.c
index 50c14ecb661..31acf07bc65 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -445,6 +445,7 @@ const AVCodecTag ff_codec_bmp_tags[] = {
     { AV_CODEC_ID_HQX,          MKTAG('C', 'H', 'Q', 'X') },
     { AV_CODEC_ID_TDSC,         MKTAG('T', 'D', 'S', 'C') },
     { AV_CODEC_ID_HQ_HQA,       MKTAG('C', 'U', 'V', 'C') },
+    { AV_CODEC_ID_RV10,         MKTAG('R', 'V', '1', '0') },
     { AV_CODEC_ID_RV40,         MKTAG('R', 'V', '4', '0') },
     { AV_CODEC_ID_SCREENPRESSO, MKTAG('S', 'P', 'V', '1') },
     { AV_CODEC_ID_RSCC,         MKTAG('R', 'S', 'C', 'C') },
-- 
2.54.0


>From 4e046e3a67a23100e71ac626f227dab2275e11de Mon Sep 17 00:00:00 2001
From: Tom Needham <[email protected]>
Date: Sat, 7 Nov 2026 19:55:40 +0000
Subject: [PATCH 02/12] avformat/riff: add RV20 codec tag

RealVideo 2.0 is identified by the FOURCC RV20, in the same way as
RV40 and RV60 already are.

Without an entry the AVI demuxer leaves the codec_id of such a stream
unset, so it cannot be decoded although the rv20 decoder exists. LAV
Filters maps the same FOURCC to AV_CODEC_ID_RV20 (decoder/LAVVideo/
Media.cpp).

As the codec had no tag in this table at all, this also gives the AVI
muxer a tag to write for it.

Signed-off-by: Tom Needham <[email protected]>
---
 libavformat/riff.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/riff.c b/libavformat/riff.c
index 31acf07bc65..2e4128fde13 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -446,6 +446,7 @@ const AVCodecTag ff_codec_bmp_tags[] = {
     { AV_CODEC_ID_TDSC,         MKTAG('T', 'D', 'S', 'C') },
     { AV_CODEC_ID_HQ_HQA,       MKTAG('C', 'U', 'V', 'C') },
     { AV_CODEC_ID_RV10,         MKTAG('R', 'V', '1', '0') },
+    { AV_CODEC_ID_RV20,         MKTAG('R', 'V', '2', '0') },
     { AV_CODEC_ID_RV40,         MKTAG('R', 'V', '4', '0') },
     { AV_CODEC_ID_SCREENPRESSO, MKTAG('S', 'P', 'V', '1') },
     { AV_CODEC_ID_RSCC,         MKTAG('R', 'S', 'C', 'C') },
-- 
2.54.0


>From ee9e624bfc531cc9bc3d3a9c357e9fbe5096cca5 Mon Sep 17 00:00:00 2001
From: Tom Needham <[email protected]>
Date: Sat, 7 Nov 2026 19:55:44 +0000
Subject: [PATCH 03/12] avformat/riff: add RV30 codec tag

RealVideo 3.0 is identified by the FOURCC RV30, in the same way as
RV40 and RV60 already are.

Without an entry the AVI demuxer leaves the codec_id of such a stream
unset, so it cannot be decoded although the rv30 decoder exists. LAV
Filters maps the same FOURCC to AV_CODEC_ID_RV30 (decoder/LAVVideo/
Media.cpp).

As the codec had no tag in this table at all, this also gives the AVI
muxer a tag to write for it.

Signed-off-by: Tom Needham <[email protected]>
---
 libavformat/riff.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/riff.c b/libavformat/riff.c
index 2e4128fde13..b49b61eeb2c 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -447,6 +447,7 @@ const AVCodecTag ff_codec_bmp_tags[] = {
     { AV_CODEC_ID_HQ_HQA,       MKTAG('C', 'U', 'V', 'C') },
     { AV_CODEC_ID_RV10,         MKTAG('R', 'V', '1', '0') },
     { AV_CODEC_ID_RV20,         MKTAG('R', 'V', '2', '0') },
+    { AV_CODEC_ID_RV30,         MKTAG('R', 'V', '3', '0') },
     { AV_CODEC_ID_RV40,         MKTAG('R', 'V', '4', '0') },
     { AV_CODEC_ID_SCREENPRESSO, MKTAG('S', 'P', 'V', '1') },
     { AV_CODEC_ID_RSCC,         MKTAG('R', 'S', 'C', 'C') },
-- 
2.54.0


>From 748d3e767adb3b4930a97ce418b127985580b2d5 Mon Sep 17 00:00:00 2001
From: Tom Needham <[email protected]>
Date: Sat, 7 Nov 2026 19:56:01 +0000
Subject: [PATCH 04/12] avformat/riff: add 3IVX codec tag for MPEG-4

3ivx MPEG-4 Part 2 streams can use the FOURCC 3IVX as well as the
already mapped 3IV2. LAV Filters maps 3IVX to AV_CODEC_ID_MPEG4
(decoder/LAVVideo/Media.cpp).

The entry follows the existing 3IV2 one, so the tag the AVI muxer
writes for MPEG-4 is unchanged. Matching is case insensitive, so this
covers 3ivx too.

Signed-off-by: Tom Needham <[email protected]>
---
 libavformat/riff.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/riff.c b/libavformat/riff.c
index b49b61eeb2c..3d6bac0c90c 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -79,6 +79,7 @@ const AVCodecTag ff_codec_bmp_tags[] = {
     { AV_CODEC_ID_MPEG4,        MKTAG('S', 'E', 'D', 'G') },
     { AV_CODEC_ID_MPEG4,        MKTAG('R', 'M', 'P', '4') },
     { AV_CODEC_ID_MPEG4,        MKTAG('3', 'I', 'V', '2') },
+    { AV_CODEC_ID_MPEG4,        MKTAG('3', 'I', 'V', 'X') },
     /* WaWv MPEG-4 Video Codec */
     { AV_CODEC_ID_MPEG4,        MKTAG('W', 'A', 'W', 'V') },
     { AV_CODEC_ID_MPEG4,        MKTAG('F', 'F', 'D', 'S') },
-- 
2.54.0


>From 004ff75cd96fe65b9738aa1668c9f1228962e07b Mon Sep 17 00:00:00 2001
From: Tom Needham <[email protected]>
Date: Sat, 7 Nov 2026 19:56:04 +0000
Subject: [PATCH 05/12] avformat/riff: add 3IV1 codec tag for MPEG-4

3ivx MPEG-4 Part 2 streams can use the FOURCC 3IV1 as well as the
already mapped 3IV2. LAV Filters maps 3IV1 to AV_CODEC_ID_MPEG4
(decoder/LAVVideo/Media.cpp).

The entry follows the existing 3IV2 and 3IVX ones, so the tag the AVI
muxer writes for MPEG-4 is unchanged. Matching is case insensitive, so
this covers 3iv1 too.

Signed-off-by: Tom Needham <[email protected]>
---
 libavformat/riff.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/riff.c b/libavformat/riff.c
index 3d6bac0c90c..00347cdd83f 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -80,6 +80,7 @@ const AVCodecTag ff_codec_bmp_tags[] = {
     { AV_CODEC_ID_MPEG4,        MKTAG('R', 'M', 'P', '4') },
     { AV_CODEC_ID_MPEG4,        MKTAG('3', 'I', 'V', '2') },
     { AV_CODEC_ID_MPEG4,        MKTAG('3', 'I', 'V', 'X') },
+    { AV_CODEC_ID_MPEG4,        MKTAG('3', 'I', 'V', '1') },
     /* WaWv MPEG-4 Video Codec */
     { AV_CODEC_ID_MPEG4,        MKTAG('W', 'A', 'W', 'V') },
     { AV_CODEC_ID_MPEG4,        MKTAG('F', 'F', 'D', 'S') },
-- 
2.54.0


>From 963273236a912c6d4c01a7d9d5581d2dceeee048 Mon Sep 17 00:00:00 2001
From: Tom Needham <[email protected]>
Date: Sat, 7 Nov 2026 19:56:08 +0000
Subject: [PATCH 06/12] avformat/riff: add unofficial 2VMW codec tag for WMV2

2VMW is the FOURCC of WMV2 with its characters reversed. LAV Filters
accepts it as WMV2 (AV_CODEC_ID_WMV2 in decoder/LAVVideo/Media.cpp).

It is not a registered FOURCC, so it goes in the unofficial table:
the AVI demuxer then recognises such streams, and the muxer does not
start to write it.

Signed-off-by: Tom Needham <[email protected]>
---
 libavformat/riff.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/riff.c b/libavformat/riff.c
index 00347cdd83f..065dd2c68d7 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -525,6 +525,7 @@ const AVCodecTag ff_codec_bmp_tags[] = {
 const AVCodecTag ff_codec_bmp_tags_unofficial[] = {
     { AV_CODEC_ID_HEVC,         MKTAG('H', 'E', 'V', 'C') },
     { AV_CODEC_ID_HEVC,         MKTAG('H', '2', '6', '5') },
+    { AV_CODEC_ID_WMV2,         MKTAG('2', 'V', 'M', 'W') },
     { AV_CODEC_ID_NONE,         0 }
 };
 
-- 
2.54.0


>From 15cdfc6e088b48b3411e5e4e8623d2cf4d500f19 Mon Sep 17 00:00:00 2001
From: Tom Needham <[email protected]>
Date: Sat, 7 Nov 2026 19:56:11 +0000
Subject: [PATCH 07/12] avformat/riff: add unofficial CCV1 codec tag for H.264

CCV1 is a FOURCC for H.264 that LAV Filters accepts (AV_CODEC_ID_H264
in decoder/LAVVideo/Media.cpp, where it is commented as used by Haali
Splitter).

It is not a registered FOURCC, so it goes in the unofficial table:
the AVI demuxer then recognises such streams, and the muxer does not
start to write it.

Signed-off-by: Tom Needham <[email protected]>
---
 libavformat/riff.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/riff.c b/libavformat/riff.c
index 065dd2c68d7..dc9c1736528 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -526,6 +526,7 @@ const AVCodecTag ff_codec_bmp_tags_unofficial[] = {
     { AV_CODEC_ID_HEVC,         MKTAG('H', 'E', 'V', 'C') },
     { AV_CODEC_ID_HEVC,         MKTAG('H', '2', '6', '5') },
     { AV_CODEC_ID_WMV2,         MKTAG('2', 'V', 'M', 'W') },
+    { AV_CODEC_ID_H264,         MKTAG('C', 'C', 'V', '1') },
     { AV_CODEC_ID_NONE,         0 }
 };
 
-- 
2.54.0


>From f34f7c26a1947770b4608ed61639769fe190f2fd Mon Sep 17 00:00:00 2001
From: Tom Needham <[email protected]>
Date: Sat, 7 Nov 2026 19:56:14 +0000
Subject: [PATCH 08/12] avformat/riff: add unofficial HM10 codec tag for HEVC

HM10 is a FOURCC for HEVC that LAV Filters accepts (AV_CODEC_ID_HEVC
in decoder/LAVVideo/Media.cpp). The name refers to the HEVC test model
(HM).

It is not a registered FOURCC, so it goes in the unofficial table,
beside the HEVC and H265 entries: the AVI demuxer then recognises such
streams, and the muxer does not start to write it.

Signed-off-by: Tom Needham <[email protected]>
---
 libavformat/riff.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/riff.c b/libavformat/riff.c
index dc9c1736528..46e19569678 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -527,6 +527,7 @@ const AVCodecTag ff_codec_bmp_tags_unofficial[] = {
     { AV_CODEC_ID_HEVC,         MKTAG('H', '2', '6', '5') },
     { AV_CODEC_ID_WMV2,         MKTAG('2', 'V', 'M', 'W') },
     { AV_CODEC_ID_H264,         MKTAG('C', 'C', 'V', '1') },
+    { AV_CODEC_ID_HEVC,         MKTAG('H', 'M', '1', '0') },
     { AV_CODEC_ID_NONE,         0 }
 };
 
-- 
2.54.0


>From 9c4a884d2cfeb9372155ac980d905c8a25f06e41 Mon Sep 17 00:00:00 2001
From: Tom Needham <[email protected]>
Date: Sat, 7 Nov 2026 19:56:17 +0000
Subject: [PATCH 09/12] avformat/riff: add unofficial 'BMP ' codec tag

Streams of pictures in BMP format, one per frame, can be tagged with
the FOURCC 'BMP '. LAV Filters maps it to AV_CODEC_ID_BMP
(decoder/LAVVideo/Media.cpp).

It is not a registered FOURCC, so it goes in the unofficial table:
the AVI demuxer then recognises such streams, and the muxer does not
start to write it.

Signed-off-by: Tom Needham <[email protected]>
---
 libavformat/riff.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/riff.c b/libavformat/riff.c
index 46e19569678..f7ab94145e4 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -528,6 +528,7 @@ const AVCodecTag ff_codec_bmp_tags_unofficial[] = {
     { AV_CODEC_ID_WMV2,         MKTAG('2', 'V', 'M', 'W') },
     { AV_CODEC_ID_H264,         MKTAG('C', 'C', 'V', '1') },
     { AV_CODEC_ID_HEVC,         MKTAG('H', 'M', '1', '0') },
+    { AV_CODEC_ID_BMP,          MKTAG('B', 'M', 'P', ' ') },
     { AV_CODEC_ID_NONE,         0 }
 };
 
-- 
2.54.0


>From d8ac149bab59705fb284fb2325b4613c740858a7 Mon Sep 17 00:00:00 2001
From: Tom Needham <[email protected]>
Date: Sat, 7 Nov 2026 19:56:20 +0000
Subject: [PATCH 10/12] avformat/riff: add unofficial WEBP codec tag

Streams of WebP pictures, one per frame, can be tagged with the FOURCC
WEBP. LAV Filters maps it to AV_CODEC_ID_WEBP (decoder/LAVVideo/
Media.cpp).

It is not a registered FOURCC, so it goes in the unofficial table:
the AVI demuxer then recognises such streams, and the muxer does not
start to write it.

Signed-off-by: Tom Needham <[email protected]>
---
 libavformat/riff.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/riff.c b/libavformat/riff.c
index f7ab94145e4..c55de70e2cb 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -529,6 +529,7 @@ const AVCodecTag ff_codec_bmp_tags_unofficial[] = {
     { AV_CODEC_ID_H264,         MKTAG('C', 'C', 'V', '1') },
     { AV_CODEC_ID_HEVC,         MKTAG('H', 'M', '1', '0') },
     { AV_CODEC_ID_BMP,          MKTAG('B', 'M', 'P', ' ') },
+    { AV_CODEC_ID_WEBP,         MKTAG('W', 'E', 'B', 'P') },
     { AV_CODEC_ID_NONE,         0 }
 };
 
-- 
2.54.0


>From 714267bdcd675b8b41ddb8fb089b35d8ae8bb4fc Mon Sep 17 00:00:00 2001
From: Tom Needham <[email protected]>
Date: Sat, 7 Nov 2026 19:56:23 +0000
Subject: [PATCH 11/12] avformat/riff: add unofficial RoQV codec tag

RoQV is the FOURCC used for the video of id Software's RoQ format.
LAV Filters maps it to AV_CODEC_ID_ROQ (decoder/LAVVideo/Media.cpp and
the table of extra tags in demuxer/Demuxers/LAVFVideoHelper.h).

It is not a registered FOURCC, so it goes in the unofficial table:
the AVI demuxer then recognises such streams, and the muxer does not
start to write it.

Signed-off-by: Tom Needham <[email protected]>
---
 libavformat/riff.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/riff.c b/libavformat/riff.c
index c55de70e2cb..4f643787767 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -530,6 +530,7 @@ const AVCodecTag ff_codec_bmp_tags_unofficial[] = {
     { AV_CODEC_ID_HEVC,         MKTAG('H', 'M', '1', '0') },
     { AV_CODEC_ID_BMP,          MKTAG('B', 'M', 'P', ' ') },
     { AV_CODEC_ID_WEBP,         MKTAG('W', 'E', 'B', 'P') },
+    { AV_CODEC_ID_ROQ,          MKTAG('R', 'o', 'Q', 'V') },
     { AV_CODEC_ID_NONE,         0 }
 };
 
-- 
2.54.0


>From de66312c495af770c913da8b56c31f884c729a03 Mon Sep 17 00:00:00 2001
From: Tom Needham <[email protected]>
Date: Sat, 7 Nov 2026 19:56:27 +0000
Subject: [PATCH 12/12] avformat/riff: add unofficial vcrd codec tag for Dirac

vcrd is the FOURCC of the DirectShow Dirac video subtype
(MEDIASUBTYPE_DiracVideo, {64726376-0000-0010-8000-00AA00389B71}).
LAV Filters maps it to AV_CODEC_ID_DIRAC (decoder/LAVVideo/Media.cpp);
drac is already mapped here.

It is not a registered FOURCC, so it goes in the unofficial table:
the AVI demuxer then recognises such streams, and the muxer does not
start to write it.

Signed-off-by: Tom Needham <[email protected]>
---
 libavformat/riff.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/riff.c b/libavformat/riff.c
index 4f643787767..edc23ba348d 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -531,6 +531,7 @@ const AVCodecTag ff_codec_bmp_tags_unofficial[] = {
     { AV_CODEC_ID_BMP,          MKTAG('B', 'M', 'P', ' ') },
     { AV_CODEC_ID_WEBP,         MKTAG('W', 'E', 'B', 'P') },
     { AV_CODEC_ID_ROQ,          MKTAG('R', 'o', 'Q', 'V') },
+    { AV_CODEC_ID_DIRAC,        MKTAG('v', 'c', 'r', 'd') },
     { AV_CODEC_ID_NONE,         0 }
 };
 
-- 
2.54.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to