This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit b64d0c6db6fe747ee995f403a23f0fb6bec74246 Author: Tau Gärtli <[email protected]> AuthorDate: Sun Apr 26 16:48:32 2026 +0200 Commit: Tau Gärtli <[email protected]> CommitDate: Sat May 23 16:07:18 2026 +0200 tests/fate: Add tests for generic metadata tags --- tests/Makefile | 1 + tests/fate-run.sh | 12 +++++ tests/fate/generic-tags.mak | 31 +++++++++++ tests/generic-tags.ffmeta | 22 ++++++++ tests/ref/fate/generic-tags-remux-asf | 49 ++++++++++++++++++ tests/ref/fate/generic-tags-remux-mov | 69 +++++++++++++++++++++++++ tests/ref/fate/generic-tags-remux-mp3 | 34 ++++++++++++ tests/ref/fate/generic-tags-remux-riff | 19 +++++++ tests/ref/fate/generic-tags-remux-vorbiscomment | 27 ++++++++++ 9 files changed, 264 insertions(+) diff --git a/tests/Makefile b/tests/Makefile index 3e119979d1..26b29c72d2 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -195,6 +195,7 @@ include $(SRC_PATH)/tests/fate/fits.mak include $(SRC_PATH)/tests/fate/flac.mak include $(SRC_PATH)/tests/fate/flvenc.mak include $(SRC_PATH)/tests/fate/gapless.mak +include $(SRC_PATH)/tests/fate/generic-tags.mak include $(SRC_PATH)/tests/fate/gif.mak include $(SRC_PATH)/tests/fate/h264.mak include $(SRC_PATH)/tests/fate/hap.mak diff --git a/tests/fate-run.sh b/tests/fate-run.sh index cd66cd059c..029f41bf6b 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -689,6 +689,18 @@ venc_data(){ run tools/venc_data_dump${EXECSUF} ${file} ${stream} ${frames} ${threads} ${thread_type} } +generic_tags(){ + src_fmt="$1" + srcfile="$2" + enc_fmt="$3" + enc_codec="$4" + extra_args="${5:-}" + transcode "$src_fmt" "$srcfile" "$enc_fmt" \ + "-c:a $enc_codec $extra_args" \ + "-c copy" \ + "-show_entries format_tags" +} + null(){ : } diff --git a/tests/fate/generic-tags.mak b/tests/fate/generic-tags.mak new file mode 100644 index 0000000000..e32e57fd06 --- /dev/null +++ b/tests/fate/generic-tags.mak @@ -0,0 +1,31 @@ +tests/data/generic-tags.mp3: TAG = GEN +tests/data/generic-tags.mp3: ffmpeg$(PROGSSUF)$(EXESUF) tests/generic-tags.ffmeta | tests/data + $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< -nostdin \ + -i $(TARGET_SAMPLES)/audiomatch/square3.mp3 \ + -f ffmetadata -i $(TARGET_PATH)/tests/generic-tags.ffmeta \ + -c:a copy -map_metadata 1 $(TARGET_PATH)/$@ -y 2>/dev/null + +ID3V2_TESTBIN = libavformat/tests/id3v2$(EXESUF) + +FATE_GENERIC_TAGS-$(call REMUX, MP3) += fate-generic-tags-remux-mp3 +fate-generic-tags-remux-mp3: tests/data/generic-tags.mp3 $(ID3V2_TESTBIN) +fate-generic-tags-remux-mp3: CMD = run_with_temp "$(FFMPEG) -nostdin -hide_banner -loglevel error -i $(TARGET_PATH)/tests/data/generic-tags.mp3 -c copy -fflags +bitexact -f mp3 -y" "$(ID3V2_TESTBIN)" mp3 + +FATE_GENERIC_TAGS-$(call REMUX, MP3, FLAC_MUXER FLAC_DEMUXER FLAC_ENCODER FLAC_DECODER) += fate-generic-tags-remux-vorbiscomment +fate-generic-tags-remux-vorbiscomment: tests/data/generic-tags.mp3 +fate-generic-tags-remux-vorbiscomment: CMD = generic_tags mp3 $(TARGET_PATH)/tests/data/generic-tags.mp3 flac flac "-t 0 -af aresample -strict experimental" + +FATE_GENERIC_TAGS-$(call REMUX, MP3, ASF_MUXER ASF_DEMUXER WMAV1_ENCODER WMAV1_DECODER) += fate-generic-tags-remux-asf +fate-generic-tags-remux-asf: tests/data/generic-tags.mp3 +fate-generic-tags-remux-asf: CMD = generic_tags mp3 $(TARGET_PATH)/tests/data/generic-tags.mp3 asf wmav1 + +FATE_GENERIC_TAGS-$(call REMUX, MP3, WAV_MUXER WAV_DEMUXER PCM_S16LE_ENCODER PCM_S16LE_DECODER) += fate-generic-tags-remux-riff +fate-generic-tags-remux-riff: tests/data/generic-tags.mp3 +fate-generic-tags-remux-riff: CMD = generic_tags mp3 $(TARGET_PATH)/tests/data/generic-tags.mp3 wav pcm_s16le "-t 0 -af aresample" + +FATE_GENERIC_TAGS-$(call REMUX, MP3, MOV_MUXER MOV_DEMUXER AAC_ENCODER AAC_DECODER) += fate-generic-tags-remux-mov +fate-generic-tags-remux-mov: tests/data/generic-tags.mp3 +fate-generic-tags-remux-mov: CMD = generic_tags mp3 $(TARGET_PATH)/tests/data/generic-tags.mp3 mp4 aac + +FATE_SAMPLES_FFMPEG_FFPROBE += $(FATE_GENERIC_TAGS-yes) +fate-generic-tags: $(FATE_GENERIC_TAGS-yes) diff --git a/tests/generic-tags.ffmeta b/tests/generic-tags.ffmeta new file mode 100644 index 0000000000..30b7ccb59e --- /dev/null +++ b/tests/generic-tags.ffmeta @@ -0,0 +1,22 @@ +;FFMETADATA1 +album=Hurry Up, We're Dreaming +album_artist=M83 +artist=M83 +comment=I love M83 +composer=Anthony Gonzalez +copyright=2011 M83 Recording Inc +; creation time is set automatically +; creation_time= +date=2011-10-17 +disc=1 +disc_subtitle=Hurry Up +; encoder is set automatically +; encoder= +encoded_by=Tau +filename=Intro.mp3 +genre=Electronic +language=eng +performer=Anthony Gonzalez +publisher=M83 Recording Inc +title=Intro +track=1/11 diff --git a/tests/ref/fate/generic-tags-remux-asf b/tests/ref/fate/generic-tags-remux-asf new file mode 100644 index 0000000000..1112df2afb --- /dev/null +++ b/tests/ref/fate/generic-tags-remux-asf @@ -0,0 +1,49 @@ +1470acbb2e928d916f58a725a8d2ecd0 *tests/data/fate/generic-tags-remux-asf.asf +20594 tests/data/fate/generic-tags-remux-asf.asf +#extradata 0: 4, 0x00020001 +#tb 0: 1/1000 +#media_type 0: audio +#codec_id 0: wmav1 +#sample_rate 0: 44100 +#channel_layout_name 0: mono +0, 0, 0, 46, 743, 0xe9ea3f8d +0, 46, 46, 46, 743, 0xc5e238af +0, 92, 92, 46, 743, 0xec461f39 +0, 139, 139, 46, 743, 0x303817f2 +0, 185, 185, 46, 743, 0x2fa031c8 +0, 232, 232, 46, 743, 0x7c1e0db6 +0, 278, 278, 46, 743, 0xabfa162f +0, 325, 325, 46, 743, 0x59311cf2 +0, 371, 371, 46, 743, 0x25734264 +0, 418, 418, 46, 743, 0xa47419ef +0, 464, 464, 46, 743, 0xdd8e3194 +0, 510, 510, 46, 743, 0x89b62039 +0, 557, 557, 46, 743, 0x7a933b49 +0, 603, 603, 46, 743, 0x350215bf +0, 650, 650, 46, 743, 0xe4a238e3 +0, 696, 696, 46, 743, 0x667e399c +0, 743, 743, 46, 743, 0x3e11365d +0, 789, 789, 46, 743, 0x203f3295 +0, 835, 835, 46, 743, 0x49d92bf3 +0, 882, 882, 46, 743, 0x5dd71eea +0, 928, 928, 46, 743, 0xdf740eee +0, 975, 975, 46, 743, 0x41c84afe +[FORMAT] +TAG:publisher=M83 Recording Inc +TAG:album_artist=M83 +TAG:composer=Anthony Gonzalez +TAG:album=Hurry Up, We're Dreaming +TAG:artist=M83 +TAG:comment=I love M83 +TAG:copyright=2011 M83 Recording Inc +TAG:date=2011-10-17 +TAG:disc=1 +TAG:disc_subtitle=Hurry Up +TAG:encoded_by=Tau +TAG:filename=Intro.mp3 +TAG:genre=Electronic +TAG:language=eng +TAG:performer=Anthony Gonzalez +TAG:title=Intro +TAG:track=1/11 +[/FORMAT] diff --git a/tests/ref/fate/generic-tags-remux-mov b/tests/ref/fate/generic-tags-remux-mov new file mode 100644 index 0000000000..eb8c8f4e42 --- /dev/null +++ b/tests/ref/fate/generic-tags-remux-mov @@ -0,0 +1,69 @@ +7b4885e9116562745df4c6bdc03b3bce *tests/data/fate/generic-tags-remux-mov.mp4 +10325 tests/data/fate/generic-tags-remux-mov.mp4 +#extradata 0: 5, 0x03460155 +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: aac +#sample_rate 0: 44100 +#channel_layout_name 0: mono +0, -1024, -1024, 1024, 301, 0x55f88fe9, F=0x5, S=1, Skip Samples, 10, 0x00240004 +0, 0, 0, 1024, 256, 0xc3a5940e +0, 1024, 1024, 1024, 176, 0xd3815b71 +0, 2048, 2048, 1024, 177, 0x62f966c5 +0, 3072, 3072, 1024, 193, 0x7c7163e8 +0, 4096, 4096, 1024, 191, 0xe85963af +0, 5120, 5120, 1024, 206, 0x1d176e1b +0, 6144, 6144, 1024, 202, 0xfc0c7397 +0, 7168, 7168, 1024, 193, 0xcdaa6231 +0, 8192, 8192, 1024, 199, 0xd6996f2c +0, 9216, 9216, 1024, 169, 0x9fe25801 +0, 10240, 10240, 1024, 221, 0xbd647673 +0, 11264, 11264, 1024, 213, 0x7a226df8 +0, 12288, 12288, 1024, 209, 0x0b3c66e8 +0, 13312, 13312, 1024, 210, 0xb6486940 +0, 14336, 14336, 1024, 193, 0x696b6712 +0, 15360, 15360, 1024, 190, 0x4a0e699c +0, 16384, 16384, 1024, 204, 0x3ee5711e +0, 17408, 17408, 1024, 202, 0x07b86d33 +0, 18432, 18432, 1024, 208, 0x34177110 +0, 19456, 19456, 1024, 197, 0xb3246a57 +0, 20480, 20480, 1024, 193, 0x21226896 +0, 21504, 21504, 1024, 204, 0x83336b0c +0, 22528, 22528, 1024, 191, 0xa9826133 +0, 23552, 23552, 1024, 199, 0xc7ee6600 +0, 24576, 24576, 1024, 209, 0xf5bc6eec +0, 25600, 25600, 1024, 201, 0x66d67077 +0, 26624, 26624, 1024, 214, 0x850e6e3b +0, 27648, 27648, 1024, 194, 0x64a563d9 +0, 28672, 28672, 1024, 198, 0xa37b62f4 +0, 29696, 29696, 1024, 200, 0x6b966513 +0, 30720, 30720, 1024, 199, 0x818968ab +0, 31744, 31744, 1024, 210, 0xf718669f +0, 32768, 32768, 1024, 197, 0x4ca96421 +0, 33792, 33792, 1024, 204, 0x62a66996 +0, 34816, 34816, 1024, 200, 0x01756658 +0, 35840, 35840, 1024, 190, 0xff44672d +0, 36864, 36864, 1024, 188, 0x20626595 +0, 37888, 37888, 1024, 207, 0xd7f66ccb +0, 38912, 38912, 1024, 205, 0xb4b2685b +0, 39936, 39936, 1024, 206, 0x0bf26df6 +0, 40960, 40960, 1024, 192, 0x72736037 +0, 41984, 41984, 1024, 204, 0xb1c26c14 +0, 43008, 43008, 1024, 252, 0x2b818d52 +0, 44032, 44032, 68, 5, 0x03c001be +[FORMAT] +TAG:major_brand=isom +TAG:minor_version=512 +TAG:compatible_brands=isomiso2mp41 +TAG:title=Intro +TAG:artist=M83 +TAG:album_artist=M83 +TAG:composer=Anthony Gonzalez +TAG:album=Hurry Up, We're Dreaming +TAG:date=2011-10-17 +TAG:comment=I love M83 +TAG:genre=Electronic +TAG:copyright=2011 M83 Recording Inc +TAG:track=1/11 +TAG:disc=1 +[/FORMAT] diff --git a/tests/ref/fate/generic-tags-remux-mp3 b/tests/ref/fate/generic-tags-remux-mp3 new file mode 100644 index 0000000000..b9db1b3102 --- /dev/null +++ b/tests/ref/fate/generic-tags-remux-mp3 @@ -0,0 +1,34 @@ +ID3v2 frame TALB (26 bytes):|.Hurry Up, We're Dreaming.| +ID3v2 frame TPE2 (5 bytes):|.M83.| +ID3v2 frame TPE1 (5 bytes):|.M83.| +ID3v2 frame TXXX (20 bytes):|.comment.I love M83.| +ID3v2 frame TCOM (18 bytes):|.Anthony Gonzalez.| +ID3v2 frame TCOP (24 bytes):|.2011 M83 Recording Inc.| +ID3v2 frame TDRC (12 bytes):|.2011-10-17.| +ID3v2 frame TPOS (3 bytes):|.1.| +ID3v2 frame TXXX (24 bytes):|.disc_subtitle.Hurry Up.| +ID3v2 frame TENC (5 bytes):|.Tau.| +ID3v2 frame TXXX (20 bytes):|.filename.Intro.mp3.| +ID3v2 frame TCON (12 bytes):|.Electronic.| +ID3v2 frame TLAN (5 bytes):|.eng.| +ID3v2 frame TPE3 (18 bytes):|.Anthony Gonzalez.| +ID3v2 frame TPUB (19 bytes):|.M83 Recording Inc.| +ID3v2 frame TIT2 (7 bytes):|.Intro.| +ID3v2 frame TRCK (6 bytes):|.1/11.| +album=Hurry Up, We're Dreaming +album_artist=M83 +artist=M83 +comment=I love M83 +composer=Anthony Gonzalez +copyright=2011 M83 Recording Inc +date=2011-10-17 +disc=1 +disc_subtitle=Hurry Up +encoded_by=Tau +filename=Intro.mp3 +genre=Electronic +language=eng +performer=Anthony Gonzalez +publisher=M83 Recording Inc +title=Intro +track=1/11 diff --git a/tests/ref/fate/generic-tags-remux-riff b/tests/ref/fate/generic-tags-remux-riff new file mode 100644 index 0000000000..c25c3c12dd --- /dev/null +++ b/tests/ref/fate/generic-tags-remux-riff @@ -0,0 +1,19 @@ +9571b4873186aae56de614a2aada6150 *tests/data/fate/generic-tags-remux-riff.wav +246 tests/data/fate/generic-tags-remux-riff.wav +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 44100 +#channel_layout_name 0: mono +[FORMAT] +TAG:artist=M83 +TAG:comment=I love M83 +TAG:copyright=2011 M83 Recording Inc +TAG:date=2011-10-17 +TAG:genre=Electronic +TAG:language=eng +TAG:title=Intro +TAG:album=Hurry Up, We're Dreaming +TAG:track=1/11 +TAG:encoded_by=Tau +[/FORMAT] diff --git a/tests/ref/fate/generic-tags-remux-vorbiscomment b/tests/ref/fate/generic-tags-remux-vorbiscomment new file mode 100644 index 0000000000..7da556e8c5 --- /dev/null +++ b/tests/ref/fate/generic-tags-remux-vorbiscomment @@ -0,0 +1,27 @@ +1d3dcf6e56ee623bcee8bc2d87098a9d *tests/data/fate/generic-tags-remux-vorbiscomment.flac +8647 tests/data/fate/generic-tags-remux-vorbiscomment.flac +#extradata 0: 34, 0x93a20b79 +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: flac +#sample_rate 0: 44100 +#channel_layout_name 0: mono +[FORMAT] +TAG:album=Hurry Up, We're Dreaming +TAG:album_artist=M83 +TAG:artist=M83 +TAG:comment=I love M83 +TAG:composer=Anthony Gonzalez +TAG:copyright=2011 M83 Recording Inc +TAG:date=2011-10-17 +TAG:disc=1 +TAG:disc_subtitle=Hurry Up +TAG:encoded_by=Tau +TAG:filename=Intro.mp3 +TAG:genre=Electronic +TAG:language=eng +TAG:performer=Anthony Gonzalez +TAG:publisher=M83 Recording Inc +TAG:title=Intro +TAG:track=1/11 +[/FORMAT] _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
