fate/ffmpeg: Fix requirements of shortest tests
[ffmpeg.git] / tests / fate / ffmpeg.mak
1 FATE_MAPCHAN-$(CONFIG_CHANNELMAP_FILTER) += fate-mapchan-6ch-extract-2
2 fate-mapchan-6ch-extract-2: tests/data/asynth-22050-6.wav
3 fate-mapchan-6ch-extract-2: CMD = ffmpeg -i $(TARGET_PATH)/tests/data/asynth-22050-6.wav -map_channel 0.0.0 -fflags +bitexact -f wav md5: -map_channel 0.0.1 -fflags +bitexact -f wav md5:
4
5 FATE_MAPCHAN-$(CONFIG_CHANNELMAP_FILTER) += fate-mapchan-6ch-extract-2-downmix-mono
6 fate-mapchan-6ch-extract-2-downmix-mono: tests/data/asynth-22050-6.wav
7 fate-mapchan-6ch-extract-2-downmix-mono: CMD = md5 -auto_conversion_filters -i $(TARGET_PATH)/tests/data/asynth-22050-6.wav -map_channel 0.0.1 -map_channel 0.0.0 -ac 1 -fflags +bitexact -f wav
8
9 FATE_MAPCHAN-$(CONFIG_CHANNELMAP_FILTER) += fate-mapchan-silent-mono
10 fate-mapchan-silent-mono: tests/data/asynth-22050-1.wav
11 fate-mapchan-silent-mono: CMD = md5 -i $(TARGET_PATH)/tests/data/asynth-22050-1.wav -map_channel -1 -map_channel 0.0.0 -fflags +bitexact -f wav
12
13 FATE_MAPCHAN-$(CONFIG_CHANNELMAP_FILTER) += fate-mapchan-2ch-extract-ch0-ch2-trailing
14 fate-mapchan-2ch-extract-ch0-ch2-trailing: tests/data/asynth-44100-2.wav
15 fate-mapchan-2ch-extract-ch0-ch2-trailing: CMD = md5 -i $(TARGET_PATH)/tests/data/asynth-44100-2.wav -map_channel 0.0.0 -map_channel 0.0.2? -fflags +bitexact -f wav
16
17 FATE_MAPCHAN-$(CONFIG_CHANNELMAP_FILTER) += fate-mapchan-3ch-extract-ch0-ch2-trailing
18 fate-mapchan-3ch-extract-ch0-ch2-trailing: tests/data/asynth-44100-3.wav
19 fate-mapchan-3ch-extract-ch0-ch2-trailing: CMD = md5 -i $(TARGET_PATH)/tests/data/asynth-44100-3.wav -map_channel 0.0.0 -map_channel 0.0.2? -fflags +bitexact -f wav
20
21 FATE_MAPCHAN = $(FATE_MAPCHAN-yes)
22
23 FATE_FFMPEG += $(FATE_MAPCHAN)
24 fate-mapchan: $(FATE_MAPCHAN)
25
26 FATE_FFMPEG-$(CONFIG_COLOR_FILTER) += fate-ffmpeg-filter_complex
27 fate-ffmpeg-filter_complex: CMD = framecrc -filter_complex color=d=1:r=5 -fflags +bitexact
28
29 # Ticket 6603
30 FATE_FFMPEG-$(call ALLYES, AEVALSRC_FILTER ASETNSAMPLES_FILTER AC3_FIXED_ENCODER) += fate-ffmpeg-filter_complex_audio
31 fate-ffmpeg-filter_complex_audio: CMD = framecrc -auto_conversion_filters -filter_complex "aevalsrc=0:d=0.1,asetnsamples=1537" -c ac3_fixed
32
33 # Ticket 6375, use case of NoX
34 FATE_SAMPLES_FFMPEG-$(call ALLYES, MOV_DEMUXER PNG_DECODER ALAC_DECODER PCM_S16LE_ENCODER RAWVIDEO_ENCODER) += fate-ffmpeg-attached_pics
35 fate-ffmpeg-attached_pics: CMD = threads=2 framecrc -i $(TARGET_SAMPLES)/lossless-audio/inside.m4a -c:a pcm_s16le -max_muxing_queue_size 16 -af aresample
36
37 FATE_SAMPLES_FFMPEG-$(CONFIG_COLORKEY_FILTER) += fate-ffmpeg-filter_colorkey
38 fate-ffmpeg-filter_colorkey: tests/data/filtergraphs/colorkey
39 fate-ffmpeg-filter_colorkey: CMD = framecrc -auto_conversion_filters -idct simple -fflags +bitexact -flags +bitexact  -sws_flags +accurate_rnd+bitexact -i $(TARGET_SAMPLES)/cavs/cavs.mpg -fflags +bitexact -flags +bitexact -sws_flags +accurate_rnd+bitexact -i $(TARGET_SAMPLES)/lena.pnm -an -filter_complex_script $(TARGET_PATH)/tests/data/filtergraphs/colorkey -sws_flags +accurate_rnd+bitexact -fflags +bitexact -flags +bitexact -qscale 2 -frames:v 10
40
41 FATE_FFMPEG-$(CONFIG_COLOR_FILTER) += fate-ffmpeg-lavfi
42 fate-ffmpeg-lavfi: CMD = framecrc -lavfi color=d=1:r=5 -fflags +bitexact
43
44 FATE_SAMPLES_FFMPEG-$(CONFIG_RAWVIDEO_DEMUXER) += fate-force_key_frames
45 fate-force_key_frames: tests/data/vsynth_lena.yuv
46 fate-force_key_frames: CMD = enc_dec \
47   "rawvideo -s 352x288 -pix_fmt yuv420p" tests/data/vsynth_lena.yuv \
48   avi "-c mpeg4 -g 240 -qscale 10 -force_key_frames 0.5,0:00:01.5" \
49   framecrc "" "" "-skip_frame nokey"
50
51 FATE_SAMPLES_FFMPEG-$(call ALLYES, VOBSUB_DEMUXER DVDSUB_DECODER AVFILTER OVERLAY_FILTER DVDSUB_ENCODER) += fate-sub2video
52 fate-sub2video: tests/data/vsynth_lena.yuv
53 fate-sub2video: CMD = framecrc -auto_conversion_filters \
54   -f rawvideo -r 5 -s 352x288 -pix_fmt yuv420p -i $(TARGET_PATH)/tests/data/vsynth_lena.yuv \
55   -ss 132 -i $(TARGET_SAMPLES)/sub/vobsub.idx \
56   -filter_complex "sws_flags=+accurate_rnd+bitexact\;[0:0]scale=720:480[v]\;[v][1:0]overlay[v2]" \
57   -map "[v2]" -c:v rawvideo -map 1:s -c:s dvdsub
58
59 # Very basic sub2video example, decode and convert to AVFrame with sub2video.
60 # Attempt to not touch timestamps.
61 FATE_SAMPLES_FFMPEG-$(call ALLYES, VOBSUB_DEMUXER DVDSUB_DECODER AVFILTER) += fate-sub2video_basic
62 fate-sub2video_basic: CMD = framecrc -auto_conversion_filters \
63   -i $(TARGET_SAMPLES)/sub/vobsub.idx \
64   -vsync passthrough -copyts \
65   -filter_complex "sws_flags=+accurate_rnd+bitexact\;[0:s:0]scale" \
66   -c:v rawvideo
67
68 # Time-limited run with a sample that doesn't require seeking and
69 # contains samples within the initial period.
70 FATE_SAMPLES_FFMPEG-$(call ALLYES, SUP_DEMUXER PGSSUB_DECODER AVFILTER) += fate-sub2video_time_limited
71 fate-sub2video_time_limited: CMD = framecrc -auto_conversion_filters \
72   -i $(TARGET_SAMPLES)/sub/pgs_sub.sup \
73   -vsync passthrough -copyts \
74   -t 15 \
75   -filter_complex "sws_flags=+accurate_rnd+bitexact\;[0:s:0]scale" \
76   -c:v rawvideo
77
78 FATE_FFMPEG-$(call ALLYES, PCM_S16LE_DEMUXER PCM_S16LE_MUXER PCM_S16LE_DECODER PCM_S16LE_ENCODER) += fate-unknown_layout-pcm
79 fate-unknown_layout-pcm: $(AREF)
80 fate-unknown_layout-pcm: CMD = md5 \
81   -guess_layout_max 0 -f s16le -ac 1 -ar 44100 -i $(TARGET_PATH)/$(AREF) -f s16le
82
83 FATE_FFMPEG-$(call ALLYES, PCM_S16LE_DEMUXER AC3_MUXER PCM_S16LE_DECODER AC3_FIXED_ENCODER) += fate-unknown_layout-ac3
84 fate-unknown_layout-ac3: $(AREF)
85 fate-unknown_layout-ac3: CMD = md5 -auto_conversion_filters \
86   -guess_layout_max 0 -f s32le -ac 1 -ar 44100 -i $(TARGET_PATH)/$(AREF) \
87   -f ac3 -flags +bitexact -c ac3_fixed
88
89 FATE_FFMPEG-$(call ALLYES, FILE_PROTOCOL LAVFI_INDEV RAWVIDEO_DEMUXER      \
90                            SINE_FILTER PCM_S16LE_DECODER RAWVIDEO_DECODER  \
91                            ARESAMPLE_FILTER AMIX_FILTER MPEG4_ENCODER      \
92                            AC3_FIXED_ENCODER FRAMECRC_MUXER PIPE_PROTOCOL) \
93                            += fate-shortest
94 fate-shortest: tests/data/vsynth_lena.yuv
95 fate-shortest: CMD = framecrc -auto_conversion_filters -f lavfi -i "sine=3000:d=10" -f lavfi -i "sine=1000:d=1" -sws_flags +accurate_rnd+bitexact -fflags +bitexact -flags +bitexact -idct simple -f rawvideo -s 352x288 -pix_fmt yuv420p -i $(TARGET_PATH)/tests/data/vsynth_lena.yuv -filter_complex "[0:a:0][1:a:0]amix=inputs=2[audio]" -map 2:v:0 -map "[audio]" -sws_flags +accurate_rnd+bitexact -fflags +bitexact -flags +bitexact -idct simple -dct fastint -qscale 10 -threads 1 -c:v mpeg4 -c:a ac3_fixed -shortest
96
97 FATE_STREAMCOPY-$(call ALLYES, EAC3_DEMUXER MOV_MUXER) += fate-copy-trac3074
98 fate-copy-trac3074: $(SAMPLES)/eac3/csi_miami_stereo_128_spx.eac3
99 fate-copy-trac3074: CMD = transcode eac3 $(TARGET_SAMPLES)/eac3/csi_miami_stereo_128_spx.eac3\
100                      mp4 "-codec copy -map 0" "-codec copy"
101
102 FATE_STREAMCOPY-$(call ALLYES, MOV_DEMUXER MOV_MUXER) += fate-copy-trac236
103 fate-copy-trac236: $(SAMPLES)/mov/fcp_export8-236.mov
104 fate-copy-trac236: CMD = transcode mov $(TARGET_SAMPLES)/mov/fcp_export8-236.mov\
105                      mov "-codec copy -map 0"
106
107 FATE_STREAMCOPY-$(call ALLYES, MPEGTS_DEMUXER MXF_MUXER PCM_S16LE_ENCODER) += fate-copy-trac4914
108 fate-copy-trac4914: $(SAMPLES)/mpeg2/xdcam8mp2-1s_small.ts
109 fate-copy-trac4914: CMD = transcode mpegts $(TARGET_SAMPLES)/mpeg2/xdcam8mp2-1s_small.ts\
110                       mxf "-c:a pcm_s16le -af aresample -c:v copy"
111
112 FATE_STREAMCOPY-$(call ALLYES, MPEGTS_DEMUXER AVI_MUXER) += fate-copy-trac4914-avi
113 fate-copy-trac4914-avi: $(SAMPLES)/mpeg2/xdcam8mp2-1s_small.ts
114 fate-copy-trac4914-avi: CMD = transcode mpegts $(TARGET_SAMPLES)/mpeg2/xdcam8mp2-1s_small.ts\
115                           avi "-c:a copy -c:v copy" "-af aresample"
116
117 FATE_STREAMCOPY-$(call ALLYES, H264_DEMUXER AVI_MUXER) += fate-copy-trac2211-avi
118 fate-copy-trac2211-avi: $(SAMPLES)/h264/bbc2.sample.h264
119 fate-copy-trac2211-avi: CMD = transcode "h264 -r 14" $(TARGET_SAMPLES)/h264/bbc2.sample.h264\
120                           avi "-c:a copy -c:v copy"
121
122 FATE_STREAMCOPY-$(call ENCDEC, APNG, APNG) += fate-copy-apng
123 fate-copy-apng: fate-lavf-apng
124 fate-copy-apng: CMD = transcode apng tests/data/lavf/lavf.apng apng "-c:v copy"
125
126 FATE_STREAMCOPY-$(call DEMMUX, OGG, OGG) += fate-limited_input_seek fate-limited_input_seek-copyts
127 fate-limited_input_seek: $(SAMPLES)/vorbis/moog_small.ogg
128 fate-limited_input_seek: CMD = md5 -ss 1.5 -t 1.3 -i $(TARGET_SAMPLES)/vorbis/moog_small.ogg -c:a copy -fflags +bitexact -f ogg
129 fate-limited_input_seek-copyts: $(SAMPLES)/vorbis/moog_small.ogg
130 fate-limited_input_seek-copyts: CMD = md5 -ss 1.5 -t 1.3 -i $(TARGET_SAMPLES)/vorbis/moog_small.ogg -c:a copy -copyts -fflags +bitexact -f ogg
131
132 FATE_STREAMCOPY-$(call ALLYES, MOV_DEMUXER MOV_MUXER) += fate-copy-psp
133 fate-copy-psp: $(SAMPLES)/h264/wwwq_cut.mp4
134 fate-copy-psp: CMD = transcode "mov" $(TARGET_SAMPLES)/h264/wwwq_cut.mp4\
135                       psp "-c copy" "-codec copy"
136
137 FATE_STREAMCOPY-$(CONFIG_FLV_DEMUXER) += fate-ffmpeg-streamloop
138 fate-ffmpeg-streamloop: $(SAMPLES)/flv/streamloop.flv
139 fate-ffmpeg-streamloop: CMD = framemd5 -stream_loop 2 -i $(TARGET_SAMPLES)/flv/streamloop.flv -c copy
140
141 tests/data/audio_shorter_than_video.nut: TAG = GEN
142 tests/data/audio_shorter_than_video.nut: tests/data/vsynth_lena.yuv
143 tests/data/audio_shorter_than_video.nut: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data
144         $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \
145         -sws_flags +accurate_rnd+bitexact -fflags +bitexact -flags +bitexact -idct simple -f rawvideo -s 352x288 -pix_fmt yuv420p -i $(TARGET_PATH)/tests/data/vsynth_lena.yuv \
146         -f lavfi -i "sine=1000:d=1" \
147         -sws_flags +accurate_rnd+bitexact -fflags +bitexact -flags +bitexact -idct simple -dct fastint -qscale 10 -c:v mpeg4 -threads 1 -c:a pcm_s16le -bitexact \
148         -y $(TARGET_PATH)/tests/data/audio_shorter_than_video.nut 2>/dev/null
149
150 FATE_STREAMCOPY-$(call ALLYES, FILE_PROTOCOL RAWVIDEO_DEMUXER LAVFI_INDEV \
151                                RAWVIDEO_DECODER PCM_S16LE_DECODER MPEG4_ENCODER \
152                                PCM_S16LE_ENCODER SINE_FILTER NUT_DEMUXER  \
153                                MPEG4_DECODER ARESAMPLE_FILTER AMIX_FILTER \
154                                NUT_MUXER AC3_FIXED_ENCODER PIPE_PROTOCOL) \
155                                += fate-copy-shortest1
156 fate-copy-shortest1: tests/data/audio_shorter_than_video.nut
157 fate-copy-shortest1: CMD = framemd5 -auto_conversion_filters -fflags +bitexact -flags +bitexact -f lavfi -i "sine=3000:d=10" -f lavfi -i "sine=1000:d=1" -i $(TARGET_PATH)/tests/data/audio_shorter_than_video.nut -filter_complex "[0:a:0][1:a:0]amix=inputs=2[audio]" -map 2:v:0 -map "[audio]" -fflags +bitexact -flags +bitexact -c:v copy -c:a ac3_fixed -shortest
158
159 FATE_STREAMCOPY-$(call ALLYES, FILE_PROTOCOL RAWVIDEO_DEMUXER LAVFI_INDEV \
160                                RAWVIDEO_DECODER PCM_S16LE_DECODER MPEG4_ENCODER \
161                                PCM_S16LE_ENCODER SINE_FILTER NUT_DEMUXER  \
162                                MPEG4_DECODER ARESAMPLE_FILTER AMIX_FILTER \
163                                NUT_MUXER AC3_FIXED_ENCODER PIPE_PROTOCOL) \
164                                += fate-copy-shortest2
165 fate-copy-shortest2: tests/data/audio_shorter_than_video.nut
166 fate-copy-shortest2: CMD = framemd5 -auto_conversion_filters -fflags +bitexact -flags +bitexact -f lavfi -i "sine=3000:d=10" -i $(TARGET_PATH)/tests/data/audio_shorter_than_video.nut -filter_complex "[0:a:0][1:a:0]amix=inputs=2[audio]" -map 1:v:0 -map "[audio]" -fflags +bitexact -flags +bitexact -c:v copy -c:a ac3_fixed -shortest
167
168 fate-streamcopy: $(FATE_STREAMCOPY-yes)
169
170 FATE_SAMPLES_FFMPEG-$(call ALLYES, MOV_DEMUXER MATROSKA_MUXER) += fate-rgb24-mkv
171 fate-rgb24-mkv: $(SAMPLES)/qtrle/aletrek-rle.mov
172 fate-rgb24-mkv: CMD = transcode "mov" $(TARGET_SAMPLES)/qtrle/aletrek-rle.mov\
173                       matroska "-c:v rawvideo -pix_fmt rgb24 -allow_raw_vfw 1 -frames:v 1"
174
175 FATE_SAMPLES_FFMPEG-$(call ALLYES, AAC_DEMUXER MOV_MUXER) += fate-adtstoasc_ticket3715
176 fate-adtstoasc_ticket3715: $(SAMPLES)/aac/foo.aac
177 fate-adtstoasc_ticket3715: CMD = transcode "aac" $(TARGET_SAMPLES)/aac/foo.aac\
178                       mov "-c copy -bsf:a aac_adtstoasc" "-codec copy"
179
180 FATE_SAMPLES_FFMPEG-$(call ALLYES, MOV_DEMUXER H264_MUXER H264_MP4TOANNEXB_BSF) += fate-h264_mp4toannexb_ticket2991
181 fate-h264_mp4toannexb_ticket2991: $(SAMPLES)/h264/wwwq_cut.mp4
182 fate-h264_mp4toannexb_ticket2991: CMD = transcode "mp4" $(TARGET_SAMPLES)/h264/wwwq_cut.mp4\
183                                   h264 "-c:v copy -bsf:v h264_mp4toannexb" "-codec copy"
184
185 FATE_SAMPLES_FFMPEG-$(call ALLYES, MOV_DEMUXER H264_MUXER H264_MP4TOANNEXB_BSF) += fate-h264_mp4toannexb_ticket5927 fate-h264_mp4toannexb_ticket5927_2
186 fate-h264_mp4toannexb_ticket5927:   CMD = transcode "mp4" $(TARGET_SAMPLES)/h264/thezerotheorem-cut.mp4 \
187                                           h264 "-c:v copy -bsf:v h264_mp4toannexb -an" "-c:v copy"
188 fate-h264_mp4toannexb_ticket5927_2: CMD = transcode "mp4" $(TARGET_SAMPLES)/h264/thezerotheorem-cut.mp4 \
189                                           h264 "-c:v copy -an" "-c:v copy"
190
191 FATE_SAMPLES_FFMPEG-$(call ALLYES, MPEGPS_DEMUXER AVI_MUXER REMOVE_EXTRADATA_BSF) += fate-ffmpeg-bsf-remove-k fate-ffmpeg-bsf-remove-r fate-ffmpeg-bsf-remove-e
192 fate-ffmpeg-bsf-remove-k: $(SAMPLES)/mpeg2/matrixbench_mpeg2.lq1.mpg
193 fate-ffmpeg-bsf-remove-k: CMD = transcode "mpeg" $(TARGET_SAMPLES)/mpeg2/matrixbench_mpeg2.lq1.mpg\
194                           avi "-vbsf remove_extra=k" "-codec copy"
195 fate-ffmpeg-bsf-remove-r: $(SAMPLES)/mpeg2/matrixbench_mpeg2.lq1.mpg
196 fate-ffmpeg-bsf-remove-r: CMD = transcode "mpeg" $(TARGET_SAMPLES)/mpeg2/matrixbench_mpeg2.lq1.mpg\
197                           avi "-vbsf remove_extra=keyframe" "-codec copy"
198 fate-ffmpeg-bsf-remove-e: $(SAMPLES)/mpeg2/matrixbench_mpeg2.lq1.mpg
199 fate-ffmpeg-bsf-remove-e: CMD = transcode "mpeg" $(TARGET_SAMPLES)/mpeg2/matrixbench_mpeg2.lq1.mpg\
200                           avi "-vbsf remove_extra=e" "-codec copy"
201
202
203 FATE_SAMPLES_FFMPEG-yes += $(FATE_STREAMCOPY-yes)
204
205 FATE_TIME_BASE-$(call ALLYES, MPEGPS_DEMUXER MXF_MUXER) += fate-time_base
206 fate-time_base: $(SAMPLES)/mpeg2/dvd_single_frame.vob
207 fate-time_base: CMD = md5 -i $(TARGET_SAMPLES)/mpeg2/dvd_single_frame.vob -an -sn -c:v copy -r 25 -time_base 1001:30000 -fflags +bitexact -f mxf
208
209 FATE_SAMPLES_FFMPEG-yes += $(FATE_TIME_BASE-yes)