[FFmpeg-devel] [PATCH 07/27] fate/caf: Add remux tests

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Mon Sep 27 08:25:49 EEST 2021


Andreas Rheinhardt:
> These test both the muxer as well as the demuxer.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> ---
>  tests/fate/caf.mak                 | 30 +++++++++++++++++++++++++++++-
>  tests/ref/fate/caf-alac-remux      | 28 ++++++++++++++++++++++++++++
>  tests/ref/fate/caf-amr_nb-remux    | 19 +++++++++++++++++++
>  tests/ref/fate/caf-mace6-remux     | 20 ++++++++++++++++++++
>  tests/ref/fate/caf-pcm_s24-remux   | 23 +++++++++++++++++++++++
>  tests/ref/fate/caf-pcm_s24le-remux | 23 +++++++++++++++++++++++
>  tests/ref/fate/caf-qdm2-remux      | 12 ++++++++++++
>  7 files changed, 154 insertions(+), 1 deletion(-)
>  create mode 100644 tests/ref/fate/caf-alac-remux
>  create mode 100644 tests/ref/fate/caf-amr_nb-remux
>  create mode 100644 tests/ref/fate/caf-mace6-remux
>  create mode 100644 tests/ref/fate/caf-pcm_s24-remux
>  create mode 100644 tests/ref/fate/caf-pcm_s24le-remux
>  create mode 100644 tests/ref/fate/caf-qdm2-remux
> 
> diff --git a/tests/fate/caf.mak b/tests/fate/caf.mak
> index e921fcc297..581128c670 100644
> --- a/tests/fate/caf.mak
> +++ b/tests/fate/caf.mak
> @@ -1,5 +1,33 @@
>  FATE_CAF_FFMPEG-$(call ALLYES, CAF_DEMUXER CRC_MUXER) += fate-caf-demux
>  fate-caf-demux: CMD = crc -i $(TARGET_SAMPLES)/caf/caf-pcm16.caf -c copy
>  
> +FATE_CAF_REMUX_FFPROBE-$(CONFIG_MOV_DEMUXER) += fate-caf-alac-remux
> +fate-caf-alac-remux: CMD = transcode m4a $(TARGET_SAMPLES)/lossless-audio/inside.m4a caf "-map 0:a -c copy" "-c copy -t 0.2" "" "-show_entries format_tags"
> +
> +FATE_CAF_REMUX-$(CONFIG_AMR_DEMUXER) += fate-caf-amr_nb-remux
> +fate-caf-amr_nb-remux: CMD = transcode amr $(TARGET_SAMPLES)/amrnb/4.75k.amr caf "-c copy" "-c copy -t 0.2"
> +
> +FATE_CAF_REMUX-$(CONFIG_MOV_DEMUXER) += fate-caf-qdm2-remux
> +fate-caf-qdm2-remux: CMD = transcode mov $(TARGET_SAMPLES)/qt-surge-suite/surge-2-16-B-QDM2.mov caf "-c copy" "-c copy -t 0.2"
> +
> +FATE_CAF_REMUX-$(CONFIG_WAV_DEMUXER) += fate-caf-pcm_s24le-remux
> +fate-caf-pcm_s24le-remux: CMD = transcode wav $(TARGET_SAMPLES)/audio-reference/divertimenti_2ch_96kHz_s24.wav caf "-c copy" "-c copy -t 0.05"
> +
> +FATE_CAF_REMUX-$(call ALLYES, WAV_DEMUXER PCM_S24LE_DECODER \
> +                              PCM_S24BE_ENCODER)            \
> +                              += fate-caf-pcm_s24-remux
> +fate-caf-pcm_s24-remux: CMD = transcode wav $(TARGET_SAMPLES)/audio-reference/divertimenti_2ch_96kHz_s24.wav caf "-c pcm_s24be" "-c copy -t 0.05"
> +
> +FATE_CAF_REMUX-$(CONFIG_MOV_DEMUXER) += fate-caf-mace6-remux
> +fate-caf-mace6-remux: CMD = transcode mov $(TARGET_SAMPLES)/qtrle/Animation-16Greys.mov caf "-map 0:a -c copy" "-c copy -t 0.003"
> +
> +FATE_CAF_FFMPEG-$(call ALLYES, FILE_PROTOCOL CAF_MUXER CAF_DEMUXER \
> +                               FRAMECRC_MUXER PIPE_PROTOCOL)       \
> +                               += $(FATE_CAF_REMUX-yes)
> +FATE_CAF_FFMPEG_FFPROBE-$(call ALLYES, FILE_PROTOCOL CAF_MUXER    \
> +                                       CAF_DEMUXER FRAMECRC_MUXER \
> +                                       PIPE_PROTOCOL)             \
> +                                      += $(FATE_CAF_REMUX_FFPROBE-yes)
>  FATE_SAMPLES_FFMPEG         += $(FATE_CAF_FFMPEG-yes)
> -fate-caf: $(FATE_CAF_FFMPEG-yes)
> +FATE_SAMPLES_FFMPEG_FFPROBE += $(FATE_CAF_FFMPEG_FFPROBE-yes)
> +fate-caf: $(FATE_CAF_FFMPEG-yes) $(FATE_CAF_FFMPEG_FFPROBE-yes)
> diff --git a/tests/ref/fate/caf-alac-remux b/tests/ref/fate/caf-alac-remux
> new file mode 100644
> index 0000000000..5c1b2d1eee
> --- /dev/null
> +++ b/tests/ref/fate/caf-alac-remux
> @@ -0,0 +1,28 @@
> +e0a94c78e9680398adce2ac72d682f48 *tests/data/fate/caf-alac-remux.caf
> +1292701 tests/data/fate/caf-alac-remux.caf
> +#extradata 0:       36, 0x562b05d8
> +#tb 0: 1/44100
> +#media_type 0: audio
> +#codec_id 0: alac
> +#sample_rate 0: 44100
> +#channel_layout 0: 3
> +#channel_layout_name 0: stereo
> +0,          0,          0,        0,       32, 0xa0af0dfe
> +0,       4096,       4096,        0,     6701, 0xa9ddc14e
> +0,       8192,       8192,        0,     6639, 0x3ccda8d6
> +[FORMAT]
> +TAG:major_brand=M4A 

The commit hocks did not like the trailing whitespace in the above line.
I have therefore adapted the test to remove the major_brand metadata
completely, thereby also providing coverage for removing metadata on the
command line. This was previously uncovered.

> +TAG:minor_version=0
> +TAG:compatible_brands=M4A mp42isom
> +TAG:disc=1
> +TAG:title=Inside
> +TAG:compilation=1
> +TAG:gapless_playback=0
> +TAG:track=5/13
> +TAG:Encoding Params=vers
> +TAG:iTunNORM= 000004DF 000004C2 00001E64 00001AB3 00000FB9 00000FB9 00006480 00006480 00000FB9 00000B52
> +TAG:artist=Maxwell Strait
> +TAG:album_artist=Maxwell Strait
> +TAG:album=OpenMusic
> +TAG:genre=Rock
> +[/FORMAT]


More information about the ffmpeg-devel mailing list