diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index 309ab85134..11e063693c 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -257,6 +257,8 @@ transcode(){
     additional_input=$7
     final_decode=$8
     enc_opt_in=$9
+    shift
+    no_file_checksums=$9
     test -z "$additional_input" || additional_input="$DEC_OPTS $additional_input"
     encfile="${outdir}/${test}.${enc_fmt}"
     test $keep -ge 1 || cleanfiles="$cleanfiles $encfile"
@@ -264,8 +266,10 @@ transcode(){
     tencfile=$(target_path $encfile)
     ffmpeg -f $src_fmt $DEC_OPTS $enc_opt_in -i $tsrcfile $additional_input \
            $ENC_OPTS $enc_opt $FLAGS -f $enc_fmt -y $tencfile || return
-    do_md5sum $encfile
-    echo $(wc -c $encfile)
+    if [ -z "$no_file_checksums" ]; then
+        do_md5sum $encfile
+        echo $(wc -c $encfile)
+    fi
     ffmpeg $DEC_OPTS $final_decode -i $tencfile $ENC_OPTS $FLAGS $final_encode \
         -f framecrc - || return
     test -z "$ffprobe_opts" || \
@@ -439,12 +443,18 @@ lavf_image2pipe(){
 }
 
 lavf_video(){
+    no_file_checksums="$3"
     t="${test#lavf-}"
     outdir="tests/data/lavf"
+    mkdir -p "$outdir"
     file=${outdir}/lavf.$t
     test "$keep" -ge 1 || cleanfiles="$cleanfiles $file"
-    do_avconv $file -auto_conversion_filters $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src \
-              "$ENC_OPTS -metadata title=lavftest" -t 1 -qscale 10 $1 $2 || return
+    run_avconv -auto_conversion_filters $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src \
+              "$ENC_OPTS -metadata title=lavftest" -t 1 -qscale 10 $1 $2 $target_path/$file || return
+    if [ -z "$no_file_checksums" ]; then
+        do_md5sum $file
+        echo $(wc -c $file)
+    fi
     do_avconv_crc $file -auto_conversion_filters $DEC_OPTS -i $target_path/$file $1
 }
 
diff --git a/tests/fate/image.mak b/tests/fate/image.mak
index 042cf6438f..11bb058826 100644
--- a/tests/fate/image.mak
+++ b/tests/fate/image.mak
@@ -410,7 +410,7 @@ fate-png-side-data: CMD = run ffprobe$(PROGSSUF)$(EXESUF) -show_frames \
     -i $(TARGET_SAMPLES)/png1/lena-int_rgb24.png
 
 FATE_PNG_TRANSCODE-$(call TRANSCODE, PNG, IMAGE2 IMAGE_PNG_PIPE) += fate-png-icc
-fate-png-icc: CMD = transcode png_pipe $(TARGET_SAMPLES)/png1/lena-int_rgb24.png image2 "-c png" "" "-show_frames"
+fate-png-icc: CMD = transcode png_pipe $(TARGET_SAMPLES)/png1/lena-int_rgb24.png image2 "-c png" "" "-show_frames" "" "" "" "no_file_checksums"
 
 FATE_PNG_PROBE-$(call ALLYES, LCMS2) += fate-png-icc-parse
 fate-png-icc-parse: CMD = run ffprobe$(PROGSSUF)$(EXESUF) -show_frames \
@@ -420,7 +420,7 @@ FATE_PNG_TRANSCODE-$(call TRANSCODE, PNG HEVC, IMAGE2PIPE HEVC, \
     IMAGE_PNG_PIPE_DEMUXER HEVC_PARSER PNG_DECODER SCALE_FILTER) += fate-png-mdcv
 fate-png-mdcv: CMD = transcode hevc $(TARGET_SAMPLES)/hevc/hdr10_plus_h265_sample.hevc image2pipe \
     "-pix_fmt rgb24 -vf scale -c png" "" \
-    "-show_frames -show_entries frame=side_data_list -of flat"
+    "-show_frames -show_entries frame=side_data_list -of flat" "" "" "" "no_file_checksums"
 
 FATE_PNG-$(call DEMDEC, IMAGE2, PNG) += $(FATE_PNG)
 FATE_PNG_PROBE-$(call DEMDEC, IMAGE2, PNG) += $(FATE_PNG_PROBE)
diff --git a/tests/fate/lavf-image.mak b/tests/fate/lavf-image.mak
index 4177e091b3..236bbcf513 100644
--- a/tests/fate/lavf-image.mak
+++ b/tests/fate/lavf-image.mak
@@ -88,8 +88,9 @@ fate-lavf-grayf32le.pfm:   CMD = lavf_image "-pix_fmt grayf32le" "-pix_fmt grayf
 fate-lavf-grayf32be.pfm:   CMD = lavf_image "-pix_fmt grayf32be" "-pix_fmt grayf32be"
 fate-lavf-gbrpf32le.pfm:   CMD = lavf_image "-pix_fmt gbrpf32le" "-pix_fmt gbrpf32le"
 fate-lavf-gbrpf32be.pfm:   CMD = lavf_image "-pix_fmt gbrpf32be" "-pix_fmt gbrpf32be"
-fate-lavf-gray16be.png: CMD = lavf_image "-pix_fmt gray16be"
-fate-lavf-rgb48be.png: CMD = lavf_image "-pix_fmt rgb48be"
+fate-lavf-png: CMD = lavf_image "-pix_fmt rgb24" "" "no_file_checksums"
+fate-lavf-gray16be.png: CMD = lavf_image "-pix_fmt gray16be" "" "no_file_checksums"
+fate-lavf-rgb48be.png: CMD = lavf_image "-pix_fmt rgb48be" "" "no_file_checksums"
 fate-lavf-rgba.xwd: CMD = lavf_image "-pix_fmt rgba"
 fate-lavf-rgb565be.xwd: CMD = lavf_image "-pix_fmt rgb565be"
 fate-lavf-rgb555be.xwd: CMD = lavf_image "-pix_fmt rgb555be"
diff --git a/tests/fate/lavf-video.mak b/tests/fate/lavf-video.mak
index da3b114bc8..b7970a9e1f 100644
--- a/tests/fate/lavf-video.mak
+++ b/tests/fate/lavf-video.mak
@@ -19,8 +19,8 @@ $(FATE_LAVF_VIDEO): CMD = lavf_video
 $(FATE_LAVF_VIDEO): REF = $(SRC_PATH)/tests/ref/lavf/$(@:fate-lavf-%=%)
 $(FATE_LAVF_VIDEO): $(VREF)
 
-fate-lavf-apng: CMD = lavf_video "-pix_fmt rgb24"
-fate-lavf-apng.png: CMD = lavf_video "-pix_fmt rgb24" "-frames:v 1 -f apng"
+fate-lavf-apng: CMD = lavf_video "-pix_fmt rgb24" "" "no_file_checksums"
+fate-lavf-apng.png: CMD = lavf_video "-pix_fmt rgb24" "-frames:v 1 -f apng" "no_file_checksums"
 fate-lavf-gray.fits: CMD = lavf_video "-pix_fmt gray"
 fate-lavf-gray16be.fits: CMD = lavf_video "-pix_fmt gray16be"
 fate-lavf-gbrp.fits: CMD = lavf_video "-pix_fmt gbrp"
diff --git a/tests/fate/mov.mak b/tests/fate/mov.mak
index ca13ebfd44..845d577bcf 100644
--- a/tests/fate/mov.mak
+++ b/tests/fate/mov.mak
@@ -138,7 +138,7 @@ fate-mov-mp4-chapters: CMD = transcode ogg $(TARGET_SAMPLES)/vorbis/vorbis_chapt
 
 FATE_MOV_FFMPEG_FFPROBE_SAMPLES-$(call TRANSCODE, PNG, MP4 MOV, MJPEG_DECODER SCALE_FILTER) \
                           += fate-mov-cover-image
-fate-mov-cover-image: CMD = transcode mov $(TARGET_SAMPLES)/cover_art/Owner-iTunes_9.0.3.15.m4a mp4 "-map 0 -map 0:v -c:a copy -c:v:0 copy -filter:v:1 scale -c:v:1 png" "-map 0 -t 0.1 -c copy" "-show_entries stream_disposition=attached_pic:stream=index,codec_name"
+fate-mov-cover-image: CMD = transcode mov $(TARGET_SAMPLES)/cover_art/Owner-iTunes_9.0.3.15.m4a mp4 "-map 0 -map 0:v -c:a copy -c:v:0 copy -filter:v:1 scale -c:v:1 png" "-map 0 -t 0.1 -c copy" "-show_entries stream_disposition=attached_pic:stream=index,codec_name" "" "" "" "no_file_checksums"
 
 FATE_MOV_FFMPEG_FFPROBE_SAMPLES-$(call TRANSCODE, TTML SUBRIP, MP4 MOV, SRT_DEMUXER TTML_MUXER) += fate-mov-mp4-ttml-stpp fate-mov-mp4-ttml-dfxp
 fate-mov-mp4-ttml-stpp: CMD = transcode srt $(TARGET_SAMPLES)/sub/SubRip_capability_tester.srt mp4 "-map 0:s -c:s ttml -time_base:s 1:1000" "-map 0 -c copy" "-of json -show_entries packet:stream=index,codec_type,codec_tag_string,codec_tag,codec_name,time_base,start_time,duration_ts,duration,nb_frames,nb_read_packets:stream_tags"
diff --git a/tests/ref/fate/mov-cover-image b/tests/ref/fate/mov-cover-image
index 5f65c630ea..6348df073a 100644
--- a/tests/ref/fate/mov-cover-image
+++ b/tests/ref/fate/mov-cover-image
@@ -1,5 +1,3 @@
-54a8870d5d1e6cc4da28ae422aa70898 *tests/data/fate/mov-cover-image.mp4
-1011919 tests/data/fate/mov-cover-image.mp4
 #extradata 0:        2, 0x00340022
 #tb 0: 1/44100
 #media_type 0: audio
diff --git a/tests/ref/fate/png-icc b/tests/ref/fate/png-icc
index 19f8c0a752..ddd5502bec 100644
--- a/tests/ref/fate/png-icc
+++ b/tests/ref/fate/png-icc
@@ -1,5 +1,3 @@
-c460cd06a88ace94d7c76a6309aa8fb8 *tests/data/fate/png-icc.image2
-49441 tests/data/fate/png-icc.image2
 #tb 0: 1/25
 #media_type 0: video
 #codec_id 0: rawvideo
diff --git a/tests/ref/fate/png-mdcv b/tests/ref/fate/png-mdcv
index c524a94ded..eb88c53601 100644
--- a/tests/ref/fate/png-mdcv
+++ b/tests/ref/fate/png-mdcv
@@ -1,5 +1,3 @@
-fc68fe6c8c72343b96d2695f6913995b *tests/data/fate/png-mdcv.image2pipe
-439248 tests/data/fate/png-mdcv.image2pipe
 #tb 0: 1/25
 #media_type 0: video
 #codec_id 0: rawvideo
diff --git a/tests/ref/lavf/apng b/tests/ref/lavf/apng
index 95f1fbee6f..b52460b8af 100644
--- a/tests/ref/lavf/apng
+++ b/tests/ref/lavf/apng
@@ -1,3 +1 @@
-a4c46fad7716ad094eb3c78b74ca0244 *tests/data/lavf/lavf.apng
-6209864 tests/data/lavf/lavf.apng
 tests/data/lavf/lavf.apng CRC=0x87b3c15f
diff --git a/tests/ref/lavf/apng.png b/tests/ref/lavf/apng.png
index b42f5a8db8..f23f6ccb23 100644
--- a/tests/ref/lavf/apng.png
+++ b/tests/ref/lavf/apng.png
@@ -1,3 +1 @@
-c5900fdd1b2fc30b985793f5226fd0c4 *tests/data/lavf/lavf.apng.png
-248854 tests/data/lavf/lavf.apng.png
 tests/data/lavf/lavf.apng.png CRC=0xd8c7b7a1
diff --git a/tests/ref/lavf/gray16be.png b/tests/ref/lavf/gray16be.png
index 4f4ce179d2..cd759993c1 100644
--- a/tests/ref/lavf/gray16be.png
+++ b/tests/ref/lavf/gray16be.png
@@ -1,3 +1 @@
-6cf54c13aa407b77547cf6dfe23ecba3 *tests/data/images/gray16be.png/02.gray16be.png
-47365 tests/data/images/gray16be.png/02.gray16be.png
 tests/data/images/gray16be.png/%02d.gray16be.png CRC=0x893f10ef
diff --git a/tests/ref/lavf/rgb48be.png b/tests/ref/lavf/rgb48be.png
index b893401a8f..9e1e50c2ee 100644
--- a/tests/ref/lavf/rgb48be.png
+++ b/tests/ref/lavf/rgb48be.png
@@ -1,3 +1 @@
-b4e38244c97debe3f528e7d1adb283ef *tests/data/images/rgb48be.png/02.rgb48be.png
-511900 tests/data/images/rgb48be.png/02.rgb48be.png
 tests/data/images/rgb48be.png/%02d.rgb48be.png CRC=0x5984c023
