ons 2024-12-11 klockan 15:41 +0100 skrev Tomas Härdin:
> ons 2024-12-11 klockan 15:24 +0100 skrev Tomas Härdin:
> > Hi
> > 
> > This patchset addresses the issues Spotify has been having reading
> > fragmented MP4 over HTTP. The issue is that mov.c does hundreds of
> > seeks unless -use_mfra_for is set to something other than auto.
> > However, defaulting -use_mfra_for to either pts or dts breaks FATE.
> > I'm
> > not sure what to do there, so this patch always reads mfra if the
> > file
> > is fragmented, which stops the entire file being parsed when
> > probing.
> 
> Oh and this of course also needs a FATE test. I didn't bother writing
> that yet before I get some feedback. But the idea I have is to check
> the number of seeks performed and require that it not be more than 4
> in
> this case. I assume we have access to sed on all systems FATE runs on

Here's a FATE test checking the number of seeks performed

/Tomas
From 7e7e2bd646b468ec63623e6c6026a2c3c2815726 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= <g...@haerdin.se>
Date: Fri, 13 Dec 2024 12:58:25 +0100
Subject: [PATCH] Add FATE test for the number of seeks performed when probing
 fragmented MP4

---
 tests/fate/mov.mak       | 4 ++++
 tests/ref/fate/mov-frags | 1 +
 2 files changed, 5 insertions(+)
 create mode 100644 tests/ref/fate/mov-frags

diff --git a/tests/fate/mov.mak b/tests/fate/mov.mak
index ca13ebfd44..af9b01deb8 100644
--- a/tests/fate/mov.mak
+++ b/tests/fate/mov.mak
@@ -284,6 +284,10 @@ fate-mov-mp4-iamf-ambisonic_1: CMD = transcode wav $(SRC) mp4 "-auto_conversion_
   -streamid 0:0 -streamid 1:1 -streamid 2:2 -streamid 3:3 -map [MONO0] -map [MONO1] -map [MONO2] -map [MONO3] -c:a flac -t 1" "-c:a copy -map 0" \
   "-show_entries stream_group=index,id,nb_streams,type:stream_group_components:stream_group_disposition:stream_group_tags:stream_group_stream=index,id:stream_group_stream_disposition"
 
+FATE_MOV_FFPROBE-$(call ALLYES, MOV_DEMUXER FILE_PROTOCOL) += fate-mov-frags
+fate-mov-frags: SRC = $(TARGET_SAMPLES)/mov/frags.mp4
+fate-mov-frags: CMD = run ffprobe -loglevel debug -i $(SRC) 2>&1 | grep Statistics | sed -e "s/.*bytes read, //"
+
 FATE_FFMPEG += $(FATE_MOV_FFMPEG-yes)
 FATE_FFMPEG_FFPROBE += $(FATE_MOV_FFMPEG_FFPROBE-yes)
 
diff --git a/tests/ref/fate/mov-frags b/tests/ref/fate/mov-frags
new file mode 100644
index 0000000000..d24055e37b
--- /dev/null
+++ b/tests/ref/fate/mov-frags
@@ -0,0 +1 @@
+3 seeks
-- 
2.39.2

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to