This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new 5242bdae82 avformat/id3v2: add image/jxl for JPEG XL image attachments
5242bdae82 is described below

commit 5242bdae823cec4455be21404ddc21f58c37a787
Author:     jade <[email protected]>
AuthorDate: Sun Apr 19 08:45:40 2026 -0400
Commit:     toots <[email protected]>
CommitDate: Wed Apr 22 13:28:17 2026 +0000

    avformat/id3v2: add image/jxl for JPEG XL image attachments
    
    This allows JPEG XL images to be recognized as valid attachments.
    Since JPEG is already widely used for cover art, JXL's support for
    lossless JPEG transcodes can decrease the total size of music collections.
    This fixes JXL cover art rendering in applications like mpv which rely
    on FFmpeg for demuxing.
    
    Signed-off-by: jade <[email protected]>
---
 libavformat/id3v2.c                    | 21 +++++++++++----------
 tests/fate/cover-art.mak               |  5 +++++
 tests/ref/fate/cover-art-mp3-jxl-remux |  2 ++
 3 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
index c196549e00..1b481d302c 100644
--- a/libavformat/id3v2.c
+++ b/libavformat/id3v2.c
@@ -132,16 +132,17 @@ const char * const ff_id3v2_picture_types[21] = {
 };
 
 const CodecMime ff_id3v2_mime_tags[] = {
-    { "image/gif",  AV_CODEC_ID_GIF   },
-    { "image/jpeg", AV_CODEC_ID_MJPEG },
-    { "image/jpg",  AV_CODEC_ID_MJPEG },
-    { "image/png",  AV_CODEC_ID_PNG   },
-    { "image/tiff", AV_CODEC_ID_TIFF  },
-    { "image/bmp",  AV_CODEC_ID_BMP   },
-    { "image/webp", AV_CODEC_ID_WEBP  },
-    { "JPG",        AV_CODEC_ID_MJPEG }, /* ID3v2.2  */
-    { "PNG",        AV_CODEC_ID_PNG   }, /* ID3v2.2  */
-    { "",           AV_CODEC_ID_NONE  },
+    { "image/gif",  AV_CODEC_ID_GIF    },
+    { "image/jpeg", AV_CODEC_ID_MJPEG  },
+    { "image/jpg",  AV_CODEC_ID_MJPEG  },
+    { "image/jxl",  AV_CODEC_ID_JPEGXL },
+    { "image/png",  AV_CODEC_ID_PNG    },
+    { "image/tiff", AV_CODEC_ID_TIFF   },
+    { "image/bmp",  AV_CODEC_ID_BMP    },
+    { "image/webp", AV_CODEC_ID_WEBP   },
+    { "JPG",        AV_CODEC_ID_MJPEG  }, /* ID3v2.2  */
+    { "PNG",        AV_CODEC_ID_PNG    }, /* ID3v2.2  */
+    { "",           AV_CODEC_ID_NONE   },
 };
 
 int ff_id3v2_match(const uint8_t *buf, const char *magic)
diff --git a/tests/fate/cover-art.mak b/tests/fate/cover-art.mak
index 9e93a7e183..b56d254bdd 100644
--- a/tests/fate/cover-art.mak
+++ b/tests/fate/cover-art.mak
@@ -57,6 +57,11 @@ FATE_COVER_ART_REMUX-$(call ALLYES, MOV_DEMUXER OGG_DEMUXER  
 \
                        += fate-cover-art-flac-remux
 fate-cover-art-flac-remux: CMD = transcode mov 
$(TARGET_SAMPLES)/lossless-audio/inside.m4a flac "-map 0 -map 1:v -map 1:v -af 
channelmap=channel_layout=FL+FC,aresample -c:a flac -multi_dim_quant 1 -c:v:0 
copy -metadata:s:v:0 comment=Illustration -metadata:s:v:0 title=OpenMusic  
-filter:v:1 scale -c:v:1 png -metadata:s:v:1 title=landscape -c:v:2 copy 
-filter:v:3 scale -metadata:s:v:2 title=portrait -c:v:3 bmp  -metadata:s:v:3 
comment=Conductor -c:v:4 copy -t 0.4" "-map 0 -map 0:a -c:a:0 c [...]
 
+FATE_COVER_ART_REMUX-$(call ALLYES, MP3_DEMUXER MP3_MUXER \
+                                    JPEGXL_ANIM_DEMUXER PIPE_PROTOCOL)     \
+                       += fate-cover-art-mp3-jxl-remux
+fate-cover-art-mp3-jxl-remux: CMD = run_with_temp "$(FFMPEG) -nostdin 
-hide_banner -loglevel error -i $(TARGET_SAMPLES)/audiomatch/square3.mp3 -i 
$(TARGET_SAMPLES)/jxl/lenna-256.jxl -map 0:a -map 1:v -c copy -disposition:v:0 
attached_pic -id3v2_version 3 -f mp3 -y" "ffprobe$(PROGSSUF)$(EXESUF) -bitexact 
-show_entries stream=codec_name,codec_type -show_entries 
stream_disposition=attached_pic -of compact=p=0:nk=1" mp3
+
 FCA_TEMP-$(call ALLYES, RAWVIDEO_MUXER) = $(FATE_COVER_ART-yes)
 FATE_COVER_ART = $(FCA_TEMP-yes)
 $(FATE_COVER_ART): CMP = oneline
diff --git a/tests/ref/fate/cover-art-mp3-jxl-remux 
b/tests/ref/fate/cover-art-mp3-jxl-remux
new file mode 100644
index 0000000000..16b554c7ca
--- /dev/null
+++ b/tests/ref/fate/cover-art-mp3-jxl-remux
@@ -0,0 +1,2 @@
+mp3|audio|0
+jpegxl|video|1

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

Reply via email to