PR #22761 opened by i-Amogh
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22761
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22761.patch

Added FATE tests to cover libavformat/dash.c and libavformat/dashenc.c. 

The tests cover: Core muxing functionality, HLS playlist generation, 
Multi-stream adaptation sets, XML metadata escaping and adaptation set roles.

Coverage: 

1. 100% Line, 100% Function from 0% in libavutil/dash.c
2. 75.7% Line, 94.7% Function from 0% in libavutil/dashenc.c (maximum limit for 
FATE coverage for this).




>From 6fcad654dc2734e57a2627d823c1061fa32a2c4d Mon Sep 17 00:00:00 2001
From: i-Amogh <[email protected]>
Date: Tue, 7 Apr 2026 23:33:10 +0530
Subject: [PATCH 1/2] Added FATE test for dash template substitution

libavformat/dash.c exports ff_dash_fill_tmpl_params(). This function was 
previously untested.
Adds fate-dash-tmpl, a lightweight FATE test exercising all code paths in the 
function

Signed-off-by: i-Amogh <[email protected]>
---
 libavformat/Makefile          |   1 +
 libavformat/tests/dash_tmpl.c | 117 ++++++++++++++++++++++++++++++++++
 tests/fate/libavformat.mak    |   4 ++
 tests/ref/fate/dash-tmpl      |  24 +++++++
 4 files changed, 146 insertions(+)
 create mode 100644 libavformat/tests/dash_tmpl.c
 create mode 100644 tests/ref/fate/dash-tmpl

diff --git a/libavformat/Makefile b/libavformat/Makefile
index ec8aa551d7..b3566f4e5d 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -784,6 +784,7 @@ TESTPROGS-$(CONFIG_MOV_MUXER)            += movenc
 TESTPROGS-$(CONFIG_NETWORK)              += noproxy
 TESTPROGS-$(CONFIG_SRTP)                 += srtp
 TESTPROGS-$(CONFIG_IMF_DEMUXER)          += imf
+TESTPROGS-$(CONFIG_DASH_MUXER)           += dash_tmpl
 
 TOOLS     = aviocat                                                     \
             ismindex                                                    \
diff --git a/libavformat/tests/dash_tmpl.c b/libavformat/tests/dash_tmpl.c
new file mode 100644
index 0000000000..4c670a70b8
--- /dev/null
+++ b/libavformat/tests/dash_tmpl.c
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 2026 Amogh Kumar Sinha
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "libavformat/dash.h"
+#include <stdio.h>
+#include <string.h>
+
+#define CHECK(desc, expected, actual) do { \
+    if (strcmp(expected, actual) != 0) { \
+        printf("FAIL %s: expected \"%s\", got \"%s\"\n", desc, expected, 
actual); \
+        failures++; \
+    } else { \
+        printf("OK %s: \"%s\"\n", desc, actual); \
+    } \
+} while (0)
+
+int main(void)
+{
+    char buf[256];
+    int failures = 0;
+
+    ff_dash_fill_tmpl_params(buf, sizeof(buf), "stream$RepresentationID$.m4s", 
5, 10, 500000, 0);
+    CHECK("rep_id", "stream5.m4s", buf);
+
+    ff_dash_fill_tmpl_params(buf, sizeof(buf), "$RepresentationID$/init.mp4", 
0, 0, 0, 0);
+    CHECK("rep_id_start", "0/init.mp4", buf);
+
+    ff_dash_fill_tmpl_params(buf, sizeof(buf), 
"rep_$RepresentationID$_seg.m4s", 123, 1, 0, 0);
+    CHECK("rep_id_mid", "rep_123_seg.m4s", buf);
+
+    ff_dash_fill_tmpl_params(buf, sizeof(buf), "segment$Number$.m4s", 0, 42, 
0, 0);
+    CHECK("number", "segment42.m4s", buf);
+
+    ff_dash_fill_tmpl_params(buf, sizeof(buf), "chunk_$Number$.mp4", 0, 0, 0, 
0);
+    CHECK("number_zero", "chunk_0.mp4", buf);
+
+    ff_dash_fill_tmpl_params(buf, sizeof(buf), "$Number$.m4s", 0, 99999, 0, 0);
+    CHECK("number_large", "99999.m4s", buf);
+
+    ff_dash_fill_tmpl_params(buf, sizeof(buf), "seg_$Number%02d$.m4s", 0, 5, 
0, 0);
+    CHECK("number_width2", "seg_05.m4s", buf);
+
+    ff_dash_fill_tmpl_params(buf, sizeof(buf), "seg_$Number%03d$.m4s", 0, 42, 
0, 0);
+    CHECK("number_width3", "seg_042.m4s", buf);
+
+    ff_dash_fill_tmpl_params(buf, sizeof(buf), "seg_$Number%05d$.m4s", 0, 123, 
0, 0);
+    CHECK("number_width5", "seg_00123.m4s", buf);
+
+    ff_dash_fill_tmpl_params(buf, sizeof(buf), "video_$Bandwidth$.m4s", 0, 1, 
1000000, 0);
+    CHECK("bandwidth", "video_1000000.m4s", buf);
+
+    ff_dash_fill_tmpl_params(buf, sizeof(buf), "$Bandwidth$/seg.m4s", 0, 1, 
500000, 0);
+    CHECK("bandwidth_start", "500000/seg.m4s", buf);
+
+    ff_dash_fill_tmpl_params(buf, sizeof(buf), "seg_$Time$.m4s", 0, 1, 0, 
12345678);
+    CHECK("time", "seg_12345678.m4s", buf);
+
+    ff_dash_fill_tmpl_params(buf, sizeof(buf), "$Time$/init.m4s", 0, 0, 0, 0);
+    CHECK("time_zero", "0/init.m4s", buf);
+
+    ff_dash_fill_tmpl_params(buf, sizeof(buf), "time_$Time%05d$.m4s", 0, 1, 0, 
12345);
+    CHECK("time_width5", "time_12345.m4s", buf);
+
+    ff_dash_fill_tmpl_params(buf, sizeof(buf), "price$$100", 0, 0, 0, 0);
+    CHECK("escape", "price$100", buf);
+
+    ff_dash_fill_tmpl_params(buf, sizeof(buf), "$$$RepresentationID$$$", 5, 0, 
0, 0);
+    CHECK("escape_rep_escape", "$5$", buf);
+
+    ff_dash_fill_tmpl_params(buf, sizeof(buf), "$$$Number$$$", 0, 7, 0, 0);
+    CHECK("escape_num_escape", "$7$", buf);
+
+    ff_dash_fill_tmpl_params(buf, sizeof(buf), "$$$$", 0, 0, 0, 0);
+    CHECK("double_escape", "$$", buf);
+
+    ff_dash_fill_tmpl_params(buf, sizeof(buf),
+                             "rep$RepresentationID$_$Number%05d$_$Time$.m4s",
+                             3, 42, 0, 1234567);
+    CHECK("combined", "rep3_00042_1234567.m4s", buf);
+
+    ff_dash_fill_tmpl_params(buf, sizeof(buf), "init.mp4", 0, 0, 0, 0);
+    CHECK("plain", "init.mp4", buf);
+
+    ff_dash_fill_tmpl_params(buf, sizeof(buf), "$Invalid$.m4s", 0, 1, 0, 0);
+    CHECK("invalid", "$Invalid$.m4s", buf);
+
+    ff_dash_fill_tmpl_params(buf, sizeof(buf), "$Number.m4s", 0, 5, 0, 0);
+    CHECK("no_close", "$Number.m4s", buf);
+
+    ff_dash_fill_tmpl_params(buf, sizeof(buf), "$Number%025d$.m4s", 0, 5, 0, 
0);
+    CHECK("multi_width", "$Number%025d$.m4s", buf);
+
+    char small_buf[10];
+    ff_dash_fill_tmpl_params(small_buf, sizeof(small_buf),
+                             "very_long_segment_name_$Number$.m4s", 0, 
123456789, 0, 0);
+    small_buf[sizeof(small_buf) - 1] = '\0';
+    CHECK("trunc", "very_long", small_buf);
+
+    return failures;
+}
diff --git a/tests/fate/libavformat.mak b/tests/fate/libavformat.mak
index 3b3a8a1177..26655e4232 100644
--- a/tests/fate/libavformat.mak
+++ b/tests/fate/libavformat.mak
@@ -26,6 +26,10 @@ FATE_LIBAVFORMAT-$(CONFIG_IMF_DEMUXER) += fate-imf
 fate-imf: libavformat/tests/imf$(EXESUF)
 fate-imf: CMD = run libavformat/tests/imf$(EXESUF)
 
+FATE_LIBAVFORMAT-$(CONFIG_DASH_MUXER) += fate-dash-tmpl
+fate-dash-tmpl: libavformat/tests/dash_tmpl$(EXESUF)
+fate-dash-tmpl: CMD = run libavformat/tests/dash_tmpl$(EXESUF)
+
 FATE_LIBAVFORMAT += fate-seek_utils
 fate-seek_utils: libavformat/tests/seek_utils$(EXESUF)
 fate-seek_utils: CMD = run libavformat/tests/seek_utils$(EXESUF)
diff --git a/tests/ref/fate/dash-tmpl b/tests/ref/fate/dash-tmpl
new file mode 100644
index 0000000000..da88914b12
--- /dev/null
+++ b/tests/ref/fate/dash-tmpl
@@ -0,0 +1,24 @@
+OK rep_id: "stream5.m4s"
+OK rep_id_start: "0/init.mp4"
+OK rep_id_mid: "rep_123_seg.m4s"
+OK number: "segment42.m4s"
+OK number_zero: "chunk_0.mp4"
+OK number_large: "99999.m4s"
+OK number_width2: "seg_05.m4s"
+OK number_width3: "seg_042.m4s"
+OK number_width5: "seg_00123.m4s"
+OK bandwidth: "video_1000000.m4s"
+OK bandwidth_start: "500000/seg.m4s"
+OK time: "seg_12345678.m4s"
+OK time_zero: "0/init.m4s"
+OK time_width5: "time_12345.m4s"
+OK escape: "price$100"
+OK escape_rep_escape: "$5$"
+OK escape_num_escape: "$7$"
+OK double_escape: "$$"
+OK combined: "rep3_00042_1234567.m4s"
+OK plain: "init.mp4"
+OK invalid: "$Invalid$.m4s"
+OK no_close: "$Number.m4s"
+OK multi_width: "$Number%025d$.m4s"
+OK trunc: "very_long"
-- 
2.52.0


>From 03cec382a8b9d3c90ff1d4c247d4720662a15658 Mon Sep 17 00:00:00 2001
From: i-Amogh <[email protected]>
Date: Thu, 9 Apr 2026 00:19:41 +0530
Subject: [PATCH 2/2] Added tests for dash muxer (libavformat/dashenc.c)

FATE tests to cover various code paths in the DASH muxer.

The tests cover:

     - Core muxing functionality
     - HLS playlist generation
     - Multi-stream adaptation sets
     - XML metadata escaping and adaptation set roles

Signed-off-by: i-Amogh <[email protected]>
---
 tests/Makefile                            |   1 +
 tests/fate/dashenc.mak                    | 104 ++++++++++++++++++++++
 tests/ref/fate/dash-availability-time     |  24 +++++
 tests/ref/fate/dash-default-sets          |  27 ++++++
 tests/ref/fate/dash-frag-duration-missing |  27 ++++++
 tests/ref/fate/dash-frag-every-frame      |  27 ++++++
 tests/ref/fate/dash-global-sidx           |  27 ++++++
 tests/ref/fate/dash-hls                   |  27 ++++++
 tests/ref/fate/dash-hls-multi             |  29 ++++++
 tests/ref/fate/dash-hls-va                |   6 ++
 tests/ref/fate/dash-index-correct         |  23 +++++
 tests/ref/fate/dash-metadata              |  28 ++++++
 tests/ref/fate/dash-mpd                   |  27 ++++++
 tests/ref/fate/dash-opus                  |  28 ++++++
 tests/ref/fate/dash-playback-rate         |  28 ++++++
 tests/ref/fate/dash-playback-rate-swap    |  27 ++++++
 tests/ref/fate/dash-prft-no-streaming     |  28 ++++++
 tests/ref/fate/dash-prft-no-utc           |  27 ++++++
 tests/ref/fate/dash-single                |  49 ++++++++++
 tests/ref/fate/dash-streams-va            |  36 ++++++++
 tests/ref/fate/dash-timeline-off          |  24 +++++
 tests/ref/fate/dash-video-audio           |  36 ++++++++
 tests/ref/fate/dash-xml-meta              |  28 ++++++
 23 files changed, 688 insertions(+)
 create mode 100644 tests/fate/dashenc.mak
 create mode 100644 tests/ref/fate/dash-availability-time
 create mode 100644 tests/ref/fate/dash-default-sets
 create mode 100644 tests/ref/fate/dash-frag-duration-missing
 create mode 100644 tests/ref/fate/dash-frag-every-frame
 create mode 100644 tests/ref/fate/dash-global-sidx
 create mode 100644 tests/ref/fate/dash-hls
 create mode 100644 tests/ref/fate/dash-hls-multi
 create mode 100644 tests/ref/fate/dash-hls-va
 create mode 100644 tests/ref/fate/dash-index-correct
 create mode 100644 tests/ref/fate/dash-metadata
 create mode 100644 tests/ref/fate/dash-mpd
 create mode 100644 tests/ref/fate/dash-opus
 create mode 100644 tests/ref/fate/dash-playback-rate
 create mode 100644 tests/ref/fate/dash-playback-rate-swap
 create mode 100644 tests/ref/fate/dash-prft-no-streaming
 create mode 100644 tests/ref/fate/dash-prft-no-utc
 create mode 100644 tests/ref/fate/dash-single
 create mode 100644 tests/ref/fate/dash-streams-va
 create mode 100644 tests/ref/fate/dash-timeline-off
 create mode 100644 tests/ref/fate/dash-video-audio
 create mode 100644 tests/ref/fate/dash-xml-meta

diff --git a/tests/Makefile b/tests/Makefile
index 3e119979d1..6a9591ba67 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -200,6 +200,7 @@ include $(SRC_PATH)/tests/fate/h264.mak
 include $(SRC_PATH)/tests/fate/hap.mak
 include $(SRC_PATH)/tests/fate/hevc.mak
 include $(SRC_PATH)/tests/fate/hlsenc.mak
+include $(SRC_PATH)/tests/fate/dashenc.mak
 include $(SRC_PATH)/tests/fate/hw.mak
 include $(SRC_PATH)/tests/fate/iamf.mak
 include $(SRC_PATH)/tests/fate/id3v2.mak
diff --git a/tests/fate/dashenc.mak b/tests/fate/dashenc.mak
new file mode 100644
index 0000000000..a911f22390
--- /dev/null
+++ b/tests/fate/dashenc.mak
@@ -0,0 +1,104 @@
+tests/data/dash-single.mpd: TAG = GEN
+tests/data/dash-single.mpd: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data
+       $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< -nostdin -f lavfi -i 
"aevalsrc=0:s=44100:d=1" -c:a pcm_s16le -f dash -seg_duration 1 -window_size 0 
-single_file 1 -single_file_name "dash-single" -adaptation_sets 
"id=0,streams=0" -y $(TARGET_PATH)/tests/data/dash-single.mpd 2>/dev/null
+
+FATE_DASHENC-$(call ALLYES, PCM_S16LE_ENCODER PCM_S16LE_DECODER DASH_MUXER 
MOV_DEMUXER LAVFI_INDEV AEVALSRC_FILTER FILE_PROTOCOL PIPE_PROTOCOL 
FRAMECRC_MUXER) += fate-dash-single
+fate-dash-single: tests/data/dash-single.mpd
+fate-dash-single: SRC = $(TARGET_PATH)/tests/data/dash-single
+fate-dash-single: CMD = framecrc -flags +bitexact -i $(SRC) -c copy
+fate-dash-single: REF = $(SRC_PATH)/tests/ref/fate/dash-single
+
+fate-dash-mpd: CMD = run $(FFMPEG) -nostdin -flags +bitexact -f lavfi -i 
"aevalsrc=0:s=44100:d=1" -c:a pcm_s16le -f dash -seg_duration 1 -window_size 0 
-single_file 1 -single_file_name "dash-audio" -adaptation_sets "id=0,streams=0" 
-y -
+fate-dash-mpd: REF = $(SRC_PATH)/tests/ref/fate/dash-mpd
+FATE_DASHENC-$(call ALLYES, PCM_S16LE_ENCODER PCM_S16LE_DECODER DASH_MUXER 
MOV_DEMUXER LAVFI_INDEV AEVALSRC_FILTER FILE_PROTOCOL PIPE_PROTOCOL 
FRAMECRC_MUXER) += fate-dash-mpd
+
+fate-dash-frag-every-frame: CMD = run $(FFMPEG) -nostdin -flags +bitexact -f 
lavfi -i "aevalsrc=0:s=44100:d=1" -c:a pcm_s16le -f dash -seg_duration 1 
-frag_type every_frame -adaptation_sets "id=0,streams=0" -y -
+fate-dash-frag-every-frame: REF = 
$(SRC_PATH)/tests/ref/fate/dash-frag-every-frame
+FATE_DASHENC-$(call ALLYES, PCM_S16LE_ENCODER PCM_S16LE_DECODER DASH_MUXER 
MOV_DEMUXER LAVFI_INDEV AEVALSRC_FILTER FILE_PROTOCOL PIPE_PROTOCOL 
FRAMECRC_MUXER) += fate-dash-frag-every-frame
+
+fate-dash-hls: CMD = run $(FFMPEG) -nostdin -flags +bitexact -f lavfi -i 
"aevalsrc=0:s=44100:d=1" -c:a pcm_s16le -f dash -seg_duration 1 -hls_playlist 1 
-single_file 1 -single_file_name "dash-hls" -adaptation_sets "id=0,streams=0" 
-y -
+fate-dash-hls: REF = $(SRC_PATH)/tests/ref/fate/dash-hls
+FATE_DASHENC-$(call ALLYES, PCM_S16LE_ENCODER PCM_S16LE_DECODER DASH_MUXER 
MOV_DEMUXER LAVFI_INDEV AEVALSRC_FILTER FILE_PROTOCOL PIPE_PROTOCOL 
FRAMECRC_MUXER) += fate-dash-hls
+
+fate-dash-xml-meta: CMD = run $(FFMPEG) -nostdin -flags +bitexact -f lavfi -i 
"aevalsrc=0:s=44100:d=1" -c:a pcm_s16le -f dash -seg_duration 1 -metadata 
title="Test & <Special> \"Chars\"" -adaptation_sets "id=0,streams=0" -y -
+fate-dash-xml-meta: REF = $(SRC_PATH)/tests/ref/fate/dash-xml-meta
+FATE_DASHENC-$(call ALLYES, PCM_S16LE_ENCODER PCM_S16LE_DECODER DASH_MUXER 
MOV_DEMUXER LAVFI_INDEV AEVALSRC_FILTER FILE_PROTOCOL PIPE_PROTOCOL 
FRAMECRC_MUXER) += fate-dash-xml-meta
+
+fate-dash-timeline-off: CMD = run $(FFMPEG) -nostdin -flags +bitexact -f lavfi 
-i "aevalsrc=0:s=44100:d=1" -c:a pcm_s16le -f dash -seg_duration 1 
-use_template 1 -use_timeline 0 -index_correction 1 -adaptation_sets 
"id=0,streams=0" -y -
+fate-dash-timeline-off: REF = $(SRC_PATH)/tests/ref/fate/dash-timeline-off
+FATE_DASHENC-$(call ALLYES, PCM_S16LE_ENCODER PCM_S16LE_DECODER DASH_MUXER 
MOV_DEMUXER LAVFI_INDEV AEVALSRC_FILTER FILE_PROTOCOL PIPE_PROTOCOL 
FRAMECRC_MUXER) += fate-dash-timeline-off
+
+fate-dash-index-correct: CMD = run $(FFMPEG) -nostdin -flags +bitexact -f 
lavfi -i "testsrc=duration=3:size=320x240:rate=25" -c:v mpeg4 -g 25 -f dash 
-seg_duration 1 -use_template 1 -use_timeline 0 -index_correction 1 
-adaptation_sets "id=0,streams=0" -y 
$(TARGET_PATH)/tests/data/dash-index-correct.mpd 2>/dev/null && cat 
$(TARGET_PATH)/tests/data/dash-index-correct.mpd
+fate-dash-index-correct: REF = $(SRC_PATH)/tests/ref/fate/dash-index-correct
+FATE_DASHENC-$(call ALLYES, MPEG4_ENCODER TESTSRC_FILTER DASH_MUXER 
MOV_DEMUXER LAVFI_INDEV FILE_PROTOCOL PIPE_PROTOCOL FRAMECRC_MUXER) += 
fate-dash-index-correct
+
+fate-dash-availability-time: CMD = run $(FFMPEG) -nostdin -flags +bitexact -f 
lavfi -i "aevalsrc=0:s=44100:d=3" -c:a pcm_s16le -f dash -seg_duration 1 
-use_template 1 -use_timeline 0 -streaming 1 -adaptation_sets "id=0,streams=0" 
-y $(TARGET_PATH)/tests/data/dash-availability-time.mpd 2>/dev/null && cat 
$(TARGET_PATH)/tests/data/dash-availability-time.mpd
+fate-dash-availability-time: REF = 
$(SRC_PATH)/tests/ref/fate/dash-availability-time
+FATE_DASHENC-$(call ALLYES, PCM_S16LE_ENCODER PCM_S16LE_DECODER DASH_MUXER 
MOV_DEMUXER LAVFI_INDEV AEVALSRC_FILTER FILE_PROTOCOL PIPE_PROTOCOL 
FRAMECRC_MUXER) += fate-dash-availability-time
+
+fate-dash-video-audio: CMD = run $(FFMPEG) -nostdin -flags +bitexact -f lavfi 
-i "testsrc=duration=1:size=320x240:rate=25" -f lavfi -i 
"aevalsrc=0:s=44100:d=1" -c:v mpeg4 -c:a pcm_s16le -f dash -seg_duration 1 
-adaptation_sets "id=0,streams=0 id=1,streams=1" -y -
+fate-dash-video-audio: REF = $(SRC_PATH)/tests/ref/fate/dash-video-audio
+FATE_DASHENC-$(call ALLYES, PCM_S16LE_ENCODER PCM_S16LE_DECODER DASH_MUXER 
MOV_DEMUXER LAVFI_INDEV TESTSRC_FILTER AEVALSRC_FILTER FILE_PROTOCOL 
PIPE_PROTOCOL MPEG4_ENCODER FRAMECRC_MUXER) += fate-dash-video-audio
+
+fate-dash-metadata: CMD = run $(FFMPEG) -nostdin -flags +bitexact -f lavfi -i 
"aevalsrc=0:s=44100:d=1" -c:a pcm_s16le -f dash -seg_duration 1 
-adaptation_sets "id=0,streams=0" -metadata:s:a:0 language=eng -metadata:s:a:0 
role=main -y -
+fate-dash-metadata: REF = $(SRC_PATH)/tests/ref/fate/dash-metadata
+FATE_DASHENC-$(call ALLYES, PCM_S16LE_ENCODER PCM_S16LE_DECODER DASH_MUXER 
MOV_DEMUXER LAVFI_INDEV AEVALSRC_FILTER FILE_PROTOCOL PIPE_PROTOCOL 
FRAMECRC_MUXER) += fate-dash-metadata
+
+fate-dash-default-sets: CMD = run $(FFMPEG) -nostdin -flags +bitexact -f lavfi 
-i "aevalsrc=0:s=44100:d=1" -c:a pcm_s16le -f dash -seg_duration 1 -y -
+fate-dash-default-sets: REF = $(SRC_PATH)/tests/ref/fate/dash-default-sets
+FATE_DASHENC-$(call ALLYES, PCM_S16LE_ENCODER PCM_S16LE_DECODER DASH_MUXER 
MOV_DEMUXER LAVFI_INDEV AEVALSRC_FILTER FILE_PROTOCOL PIPE_PROTOCOL 
FRAMECRC_MUXER) += fate-dash-default-sets
+
+fate-dash-streams-va: CMD = run $(FFMPEG) -nostdin -flags +bitexact -f lavfi 
-i "testsrc=duration=1:size=320x240:rate=25" -f lavfi -i 
"aevalsrc=0:s=44100:d=1" -c:v mpeg4 -c:a pcm_s16le -f dash -seg_duration 1 
-adaptation_sets "id=0,streams=v id=1,streams=a" -y -
+fate-dash-streams-va: REF = $(SRC_PATH)/tests/ref/fate/dash-streams-va
+FATE_DASHENC-$(call ALLYES, PCM_S16LE_ENCODER PCM_S16LE_DECODER DASH_MUXER 
MOV_DEMUXER LAVFI_INDEV TESTSRC_FILTER AEVALSRC_FILTER FILE_PROTOCOL 
PIPE_PROTOCOL MPEG4_ENCODER FRAMECRC_MUXER) += fate-dash-streams-va
+
+fate-dash-playback-rate: CMD = run $(FFMPEG) -nostdin -flags +bitexact -f 
lavfi -i "aevalsrc=0:s=44100:d=1" -c:a pcm_s16le -f dash -seg_duration 1 
-min_playback_rate 0.8 -max_playback_rate 1.5 -adaptation_sets "id=0,streams=0" 
-y -
+fate-dash-playback-rate: REF = $(SRC_PATH)/tests/ref/fate/dash-playback-rate
+FATE_DASHENC-$(call ALLYES, PCM_S16LE_ENCODER PCM_S16LE_DECODER DASH_MUXER 
MOV_DEMUXER LAVFI_INDEV AEVALSRC_FILTER FILE_PROTOCOL PIPE_PROTOCOL 
FRAMECRC_MUXER) += fate-dash-playback-rate
+
+fate-dash-playback-rate-swap: CMD = run $(FFMPEG) -nostdin -flags +bitexact -f 
lavfi -i "aevalsrc=0:s=44100:d=1" -c:a pcm_s16le -f dash -seg_duration 1 
-min_playback_rate 1.2 -max_playback_rate 1.0 -adaptation_sets "id=0,streams=0" 
-y -
+fate-dash-playback-rate-swap: REF = 
$(SRC_PATH)/tests/ref/fate/dash-playback-rate-swap
+FATE_DASHENC-$(call ALLYES, PCM_S16LE_ENCODER PCM_S16LE_DECODER DASH_MUXER 
MOV_DEMUXER LAVFI_INDEV AEVALSRC_FILTER FILE_PROTOCOL PIPE_PROTOCOL 
FRAMECRC_MUXER) += fate-dash-playback-rate-swap
+
+fate-dash-global-sidx: CMD = run $(FFMPEG) -nostdin -flags +bitexact -f lavfi 
-i "aevalsrc=0:s=44100:d=1" -c:a pcm_s16le -f dash -seg_duration 1 -global_sidx 
1 -adaptation_sets "id=0,streams=0" -y -
+fate-dash-global-sidx: REF = $(SRC_PATH)/tests/ref/fate/dash-global-sidx
+FATE_DASHENC-$(call ALLYES, PCM_S16LE_ENCODER PCM_S16LE_DECODER DASH_MUXER 
MOV_DEMUXER LAVFI_INDEV AEVALSRC_FILTER FILE_PROTOCOL PIPE_PROTOCOL 
FRAMECRC_MUXER) += fate-dash-global-sidx
+
+fate-dash-prft-no-utc: CMD = run $(FFMPEG) -nostdin -flags +bitexact -f lavfi 
-i "aevalsrc=0:s=44100:d=1" -c:a pcm_s16le -f dash -seg_duration 1 -write_prft 
1 -adaptation_sets "id=0,streams=0" -y -
+fate-dash-prft-no-utc: REF = $(SRC_PATH)/tests/ref/fate/dash-prft-no-utc
+FATE_DASHENC-$(call ALLYES, PCM_S16LE_ENCODER PCM_S16LE_DECODER DASH_MUXER 
MOV_DEMUXER LAVFI_INDEV AEVALSRC_FILTER FILE_PROTOCOL PIPE_PROTOCOL 
FRAMECRC_MUXER) += fate-dash-prft-no-utc
+
+fate-dash-prft-no-streaming: CMD = run $(FFMPEG) -nostdin -flags +bitexact -f 
lavfi -i "aevalsrc=0:s=44100:d=1" -c:a pcm_s16le -f dash -seg_duration 1 
-write_prft 1 -utc_timing_url "http://example.com/utc"; -adaptation_sets 
"id=0,streams=0" -y -
+fate-dash-prft-no-streaming: REF = 
$(SRC_PATH)/tests/ref/fate/dash-prft-no-streaming
+FATE_DASHENC-$(call ALLYES, PCM_S16LE_ENCODER PCM_S16LE_DECODER DASH_MUXER 
MOV_DEMUXER LAVFI_INDEV AEVALSRC_FILTER FILE_PROTOCOL PIPE_PROTOCOL 
FRAMECRC_MUXER) += fate-dash-prft-no-streaming
+
+fate-dash-frag-duration-missing: CMD = run $(FFMPEG) -nostdin -flags +bitexact 
-f lavfi -i "aevalsrc=0:s=44100:d=1" -c:a pcm_s16le -f dash -seg_duration 1 
-adaptation_sets "id=0,frag_type=duration,streams=0" -y -
+fate-dash-frag-duration-missing: REF = 
$(SRC_PATH)/tests/ref/fate/dash-frag-duration-missing
+FATE_DASHENC-$(call ALLYES, PCM_S16LE_ENCODER PCM_S16LE_DECODER DASH_MUXER 
MOV_DEMUXER LAVFI_INDEV AEVALSRC_FILTER FILE_PROTOCOL PIPE_PROTOCOL 
FRAMECRC_MUXER) += fate-dash-frag-duration-missing
+
+fate-dash-opus: CMD = run $(FFMPEG) -nostdin -f lavfi -i 
"aevalsrc=0:s=44100:d=1" -c:a opus -strict -2 -f dash -seg_duration 1 
-adaptation_sets "id=0,streams=0" -y $(TARGET_PATH)/tests/data/dash-opus.mpd 
2>/dev/null && cat $(TARGET_PATH)/tests/data/dash-opus.mpd
+fate-dash-opus: REF = $(SRC_PATH)/tests/ref/fate/dash-opus
+FATE_DASHENC-$(call ALLYES, OPUS_ENCODER PCM_S16LE_DECODER DASH_MUXER 
MOV_DEMUXER LAVFI_INDEV AEVALSRC_FILTER FILE_PROTOCOL PIPE_PROTOCOL 
FRAMECRC_MUXER) += fate-dash-opus
+
+fate-dash-remove-at-exit: CMD = run $(FFMPEG) -nostdin -flags +bitexact -f 
lavfi -i "aevalsrc=0:s=44100:d=3" -c:a pcm_s16le -f dash -seg_duration 1 
-remove_at_exit 1 -adaptation_sets "id=0,streams=0" -y 
$(TARGET_PATH)/tests/data/dash-remove-at-exit.mpd 2>&1
+fate-dash-remove-at-exit: CMP = null
+FATE_DASHENC-$(call ALLYES, PCM_S16LE_ENCODER PCM_S16LE_DECODER DASH_MUXER 
MOV_DEMUXER LAVFI_INDEV AEVALSRC_FILTER FILE_PROTOCOL PIPE_PROTOCOL 
FRAMECRC_MUXER) += fate-dash-remove-at-exit
+
+fate-dash-window-cleanup: CMD = run $(FFMPEG) -nostdin -flags +bitexact -f 
lavfi -i "aevalsrc=0:s=44100:d=4" -c:a pcm_s16le -f dash -seg_duration 1 
-window_size 2 -extra_window_size 0 -use_template 0 -adaptation_sets 
"id=0,streams=0" -y -
+fate-dash-window-cleanup: CMP = null
+FATE_DASHENC-$(call ALLYES, PCM_S16LE_ENCODER PCM_S16LE_DECODER DASH_MUXER 
MOV_DEMUXER LAVFI_INDEV AEVALSRC_FILTER FILE_PROTOCOL PIPE_PROTOCOL 
FRAMECRC_MUXER) += fate-dash-window-cleanup
+
+fate-dash-http-opts: CMD = run $(FFMPEG) -nostdin -flags +bitexact -f lavfi -i 
"aevalsrc=0:s=44100:d=1" -c:a pcm_s16le -f dash -seg_duration 1 -single_file 1 
-single_file_name "dash-http" -method PUT -http_user_agent "FATE-Test" 
-http_persistent 1 -timeout 1s -adaptation_sets "id=0,streams=0" -y 
$(TARGET_PATH)/tests/data/dash-http-opts.mpd 2>&1
+fate-dash-http-opts: CMP = null
+FATE_DASHENC-$(call ALLYES, PCM_S16LE_ENCODER PCM_S16LE_DECODER DASH_MUXER 
MOV_DEMUXER LAVFI_INDEV AEVALSRC_FILTER FILE_PROTOCOL PIPE_PROTOCOL 
FRAMECRC_MUXER) += fate-dash-http-opts
+
+fate-dash-hls-multi: CMD = run $(FFMPEG) -nostdin -flags +bitexact -f lavfi -i 
"aevalsrc=0:s=44100:d=3" -c:a pcm_s16le -f dash -seg_duration 1 -hls_playlist 1 
-single_file 1 -single_file_name "dash-hls-multi" -adaptation_sets 
"id=0,streams=0" -y $(TARGET_PATH)/tests/data/dash-hls-multi.mpd 2>/dev/null && 
cat $(TARGET_PATH)/tests/data/dash-hls-multi.mpd
+fate-dash-hls-multi: REF = $(SRC_PATH)/tests/ref/fate/dash-hls-multi
+FATE_DASHENC-$(call ALLYES, PCM_S16LE_ENCODER PCM_S16LE_DECODER DASH_MUXER 
MOV_DEMUXER LAVFI_INDEV AEVALSRC_FILTER FILE_PROTOCOL PIPE_PROTOCOL 
FRAMECRC_MUXER) += fate-dash-hls-multi
+
+fate-dash-hls-va: CMD = run $(FFMPEG) -nostdin -flags +bitexact -f lavfi -i 
"testsrc=duration=1:size=320x240:rate=25" -f lavfi -i "aevalsrc=0:s=44100:d=1" 
-c:v mpeg4 -c:a pcm_s16le -f dash -seg_duration 1 -hls_playlist 1 -single_file 
1 -single_file_name "dash-hls-va" -adaptation_sets "id=0,streams=0 
id=1,streams=1" -y $(TARGET_PATH)/tests/data/dash-hls-va.mpd 2>/dev/null && cat 
$(TARGET_PATH)/tests/data/master.m3u8
+fate-dash-hls-va: REF = $(SRC_PATH)/tests/ref/fate/dash-hls-va
+FATE_DASHENC-$(call ALLYES, MPEG4_ENCODER PCM_S16LE_ENCODER DASH_MUXER 
MOV_DEMUXER LAVFI_INDEV TESTSRC_FILTER AEVALSRC_FILTER FILE_PROTOCOL 
PIPE_PROTOCOL FRAMECRC_MUXER) += fate-dash-hls-va
+
+FATE_SAMPLES_FFMPEG += $(FATE_DASHENC-yes)
+fate-dashenc: $(FATE_DASHENC-yes)
diff --git a/tests/ref/fate/dash-availability-time 
b/tests/ref/fate/dash-availability-time
new file mode 100644
index 0000000000..abe6fe337e
--- /dev/null
+++ b/tests/ref/fate/dash-availability-time
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xmlns="urn:mpeg:dash:schema:mpd:2011"
+       xmlns:xlink="http://www.w3.org/1999/xlink";
+       xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 
http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd";
+       profiles="urn:mpeg:dash:profile:isoff-live:2011"
+       type="static"
+       mediaPresentationDuration="PT3.0S"
+       maxSegmentDuration="PT1.0S"
+       minBufferTime="PT1.9S">
+       <ProgramInformation>
+       </ProgramInformation>
+       <ServiceDescription id="0">
+       </ServiceDescription>
+       <Period id="0" start="PT0.0S">
+               <AdaptationSet id="0" contentType="audio" startWithSAP="1" 
segmentAlignment="true" bitstreamSwitching="true">
+                       <Representation id="0" mimeType="audio/mp4" codecs="" 
bandwidth="705600" audioSamplingRate="44100">
+                               <AudioChannelConfiguration 
schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="1" 
/>
+                               <SegmentTemplate timescale="1000000" 
duration="1000000" availabilityTimeOffset="0.977" 
initialization="init-stream$RepresentationID$.m4s" 
media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startNumber="1">
+                               </SegmentTemplate>
+                       </Representation>
+               </AdaptationSet>
+       </Period>
+</MPD>
diff --git a/tests/ref/fate/dash-default-sets b/tests/ref/fate/dash-default-sets
new file mode 100644
index 0000000000..fab260de05
--- /dev/null
+++ b/tests/ref/fate/dash-default-sets
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xmlns="urn:mpeg:dash:schema:mpd:2011"
+       xmlns:xlink="http://www.w3.org/1999/xlink";
+       xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 
http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd";
+       profiles="urn:mpeg:dash:profile:isoff-live:2011"
+       type="static"
+       mediaPresentationDuration="PT1.0S"
+       maxSegmentDuration="PT1.0S"
+       minBufferTime="PT2.0S">
+       <ProgramInformation>
+       </ProgramInformation>
+       <ServiceDescription id="0">
+       </ServiceDescription>
+       <Period id="0" start="PT0.0S">
+               <AdaptationSet id="0" contentType="audio" startWithSAP="1" 
segmentAlignment="true" bitstreamSwitching="true">
+                       <Representation id="0" mimeType="audio/mp4" codecs="" 
bandwidth="705600" audioSamplingRate="44100">
+                               <AudioChannelConfiguration 
schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="1" 
/>
+                               <SegmentTemplate timescale="44100" 
initialization="init-stream$RepresentationID$.m4s" 
media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startNumber="1">
+                                       <SegmentTimeline>
+                                               <S t="0" d="44100" />
+                                       </SegmentTimeline>
+                               </SegmentTemplate>
+                       </Representation>
+               </AdaptationSet>
+       </Period>
+</MPD>
diff --git a/tests/ref/fate/dash-frag-duration-missing 
b/tests/ref/fate/dash-frag-duration-missing
new file mode 100644
index 0000000000..fab260de05
--- /dev/null
+++ b/tests/ref/fate/dash-frag-duration-missing
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xmlns="urn:mpeg:dash:schema:mpd:2011"
+       xmlns:xlink="http://www.w3.org/1999/xlink";
+       xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 
http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd";
+       profiles="urn:mpeg:dash:profile:isoff-live:2011"
+       type="static"
+       mediaPresentationDuration="PT1.0S"
+       maxSegmentDuration="PT1.0S"
+       minBufferTime="PT2.0S">
+       <ProgramInformation>
+       </ProgramInformation>
+       <ServiceDescription id="0">
+       </ServiceDescription>
+       <Period id="0" start="PT0.0S">
+               <AdaptationSet id="0" contentType="audio" startWithSAP="1" 
segmentAlignment="true" bitstreamSwitching="true">
+                       <Representation id="0" mimeType="audio/mp4" codecs="" 
bandwidth="705600" audioSamplingRate="44100">
+                               <AudioChannelConfiguration 
schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="1" 
/>
+                               <SegmentTemplate timescale="44100" 
initialization="init-stream$RepresentationID$.m4s" 
media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startNumber="1">
+                                       <SegmentTimeline>
+                                               <S t="0" d="44100" />
+                                       </SegmentTimeline>
+                               </SegmentTemplate>
+                       </Representation>
+               </AdaptationSet>
+       </Period>
+</MPD>
diff --git a/tests/ref/fate/dash-frag-every-frame 
b/tests/ref/fate/dash-frag-every-frame
new file mode 100644
index 0000000000..fab260de05
--- /dev/null
+++ b/tests/ref/fate/dash-frag-every-frame
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xmlns="urn:mpeg:dash:schema:mpd:2011"
+       xmlns:xlink="http://www.w3.org/1999/xlink";
+       xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 
http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd";
+       profiles="urn:mpeg:dash:profile:isoff-live:2011"
+       type="static"
+       mediaPresentationDuration="PT1.0S"
+       maxSegmentDuration="PT1.0S"
+       minBufferTime="PT2.0S">
+       <ProgramInformation>
+       </ProgramInformation>
+       <ServiceDescription id="0">
+       </ServiceDescription>
+       <Period id="0" start="PT0.0S">
+               <AdaptationSet id="0" contentType="audio" startWithSAP="1" 
segmentAlignment="true" bitstreamSwitching="true">
+                       <Representation id="0" mimeType="audio/mp4" codecs="" 
bandwidth="705600" audioSamplingRate="44100">
+                               <AudioChannelConfiguration 
schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="1" 
/>
+                               <SegmentTemplate timescale="44100" 
initialization="init-stream$RepresentationID$.m4s" 
media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startNumber="1">
+                                       <SegmentTimeline>
+                                               <S t="0" d="44100" />
+                                       </SegmentTimeline>
+                               </SegmentTemplate>
+                       </Representation>
+               </AdaptationSet>
+       </Period>
+</MPD>
diff --git a/tests/ref/fate/dash-global-sidx b/tests/ref/fate/dash-global-sidx
new file mode 100644
index 0000000000..fab260de05
--- /dev/null
+++ b/tests/ref/fate/dash-global-sidx
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xmlns="urn:mpeg:dash:schema:mpd:2011"
+       xmlns:xlink="http://www.w3.org/1999/xlink";
+       xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 
http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd";
+       profiles="urn:mpeg:dash:profile:isoff-live:2011"
+       type="static"
+       mediaPresentationDuration="PT1.0S"
+       maxSegmentDuration="PT1.0S"
+       minBufferTime="PT2.0S">
+       <ProgramInformation>
+       </ProgramInformation>
+       <ServiceDescription id="0">
+       </ServiceDescription>
+       <Period id="0" start="PT0.0S">
+               <AdaptationSet id="0" contentType="audio" startWithSAP="1" 
segmentAlignment="true" bitstreamSwitching="true">
+                       <Representation id="0" mimeType="audio/mp4" codecs="" 
bandwidth="705600" audioSamplingRate="44100">
+                               <AudioChannelConfiguration 
schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="1" 
/>
+                               <SegmentTemplate timescale="44100" 
initialization="init-stream$RepresentationID$.m4s" 
media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startNumber="1">
+                                       <SegmentTimeline>
+                                               <S t="0" d="44100" />
+                                       </SegmentTimeline>
+                               </SegmentTemplate>
+                       </Representation>
+               </AdaptationSet>
+       </Period>
+</MPD>
diff --git a/tests/ref/fate/dash-hls b/tests/ref/fate/dash-hls
new file mode 100644
index 0000000000..9f6bb8f456
--- /dev/null
+++ b/tests/ref/fate/dash-hls
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xmlns="urn:mpeg:dash:schema:mpd:2011"
+       xmlns:xlink="http://www.w3.org/1999/xlink";
+       xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 
http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd";
+       profiles="urn:mpeg:dash:profile:isoff-live:2011"
+       type="static"
+       mediaPresentationDuration="PT1.0S"
+       maxSegmentDuration="PT1.0S"
+       minBufferTime="PT2.0S">
+       <ProgramInformation>
+       </ProgramInformation>
+       <ServiceDescription id="0">
+       </ServiceDescription>
+       <Period id="0" start="PT0.0S">
+               <AdaptationSet id="0" contentType="audio" startWithSAP="1" 
segmentAlignment="true" bitstreamSwitching="true">
+                       <Representation id="0" mimeType="audio/mp4" codecs="" 
bandwidth="705600" audioSamplingRate="44100">
+                               <AudioChannelConfiguration 
schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="1" 
/>
+                               <BaseURL>dash-hls</BaseURL>
+                               <SegmentList timescale="1000000" 
duration="1000000" startNumber="1">
+                                       <Initialization range="0-732" />
+                                       <SegmentURL mediaRange="733-89444" 
indexRange="733-784" />
+                               </SegmentList>
+                       </Representation>
+               </AdaptationSet>
+       </Period>
+</MPD>
diff --git a/tests/ref/fate/dash-hls-multi b/tests/ref/fate/dash-hls-multi
new file mode 100644
index 0000000000..f88113c0ed
--- /dev/null
+++ b/tests/ref/fate/dash-hls-multi
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xmlns="urn:mpeg:dash:schema:mpd:2011"
+       xmlns:xlink="http://www.w3.org/1999/xlink";
+       xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 
http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd";
+       profiles="urn:mpeg:dash:profile:isoff-live:2011"
+       type="static"
+       mediaPresentationDuration="PT3.0S"
+       maxSegmentDuration="PT1.0S"
+       minBufferTime="PT2.0S">
+       <ProgramInformation>
+       </ProgramInformation>
+       <ServiceDescription id="0">
+       </ServiceDescription>
+       <Period id="0" start="PT0.0S">
+               <AdaptationSet id="0" contentType="audio" startWithSAP="1" 
segmentAlignment="true" bitstreamSwitching="true">
+                       <Representation id="0" mimeType="audio/mp4" codecs="" 
bandwidth="705600" audioSamplingRate="44100">
+                               <AudioChannelConfiguration 
schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="1" 
/>
+                               <BaseURL>dash-hls-multi</BaseURL>
+                               <SegmentList timescale="1000000" 
duration="1000000" startNumber="1">
+                                       <Initialization range="0-732" />
+                                       <SegmentURL mediaRange="733-91004" 
indexRange="733-784" />
+                                       <SegmentURL mediaRange="91005-181276" 
indexRange="91005-91056" />
+                                       <SegmentURL mediaRange="181277-266148" 
indexRange="181277-181328" />
+                               </SegmentList>
+                       </Representation>
+               </AdaptationSet>
+       </Period>
+</MPD>
diff --git a/tests/ref/fate/dash-hls-va b/tests/ref/fate/dash-hls-va
new file mode 100644
index 0000000000..edef6c5e22
--- /dev/null
+++ b/tests/ref/fate/dash-hls-va
@@ -0,0 +1,6 @@
+#EXTM3U
+#EXT-X-VERSION:7
+#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_A1",NAME="audio_1",DEFAULT=YES,CHANNELS="1",URI="media_1.m3u8"
+#EXT-X-STREAM-INF:BANDWIDTH=912576,RESOLUTION=320x240,CODECS="mp4v.20,",AUDIO="group_A1"
+media_0.m3u8
+
diff --git a/tests/ref/fate/dash-index-correct 
b/tests/ref/fate/dash-index-correct
new file mode 100644
index 0000000000..e7efe01c87
--- /dev/null
+++ b/tests/ref/fate/dash-index-correct
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xmlns="urn:mpeg:dash:schema:mpd:2011"
+       xmlns:xlink="http://www.w3.org/1999/xlink";
+       xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 
http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd";
+       profiles="urn:mpeg:dash:profile:isoff-live:2011"
+       type="static"
+       mediaPresentationDuration="PT3.0S"
+       maxSegmentDuration="PT1.0S"
+       minBufferTime="PT2.0S">
+       <ProgramInformation>
+       </ProgramInformation>
+       <ServiceDescription id="0">
+       </ServiceDescription>
+       <Period id="0" start="PT0.0S">
+               <AdaptationSet id="0" contentType="video" startWithSAP="1" 
segmentAlignment="true" bitstreamSwitching="true" frameRate="25/1" 
maxWidth="320" maxHeight="240" par="4:3">
+                       <Representation id="0" mimeType="video/mp4" 
codecs="mp4v.20" bandwidth="200000" width="320" height="240" sar="1:1">
+                               <SegmentTemplate timescale="1000000" 
duration="1000000" initialization="init-stream$RepresentationID$.m4s" 
media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startNumber="1">
+                               </SegmentTemplate>
+                       </Representation>
+               </AdaptationSet>
+       </Period>
+</MPD>
diff --git a/tests/ref/fate/dash-metadata b/tests/ref/fate/dash-metadata
new file mode 100644
index 0000000000..90205bfb61
--- /dev/null
+++ b/tests/ref/fate/dash-metadata
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xmlns="urn:mpeg:dash:schema:mpd:2011"
+       xmlns:xlink="http://www.w3.org/1999/xlink";
+       xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 
http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd";
+       profiles="urn:mpeg:dash:profile:isoff-live:2011"
+       type="static"
+       mediaPresentationDuration="PT1.0S"
+       maxSegmentDuration="PT1.0S"
+       minBufferTime="PT2.0S">
+       <ProgramInformation>
+       </ProgramInformation>
+       <ServiceDescription id="0">
+       </ServiceDescription>
+       <Period id="0" start="PT0.0S">
+               <AdaptationSet id="0" contentType="audio" startWithSAP="1" 
segmentAlignment="true" bitstreamSwitching="true" lang="eng">
+                       <Role schemeIdUri="urn:mpeg:dash:role:2011" 
value="main"/>
+                       <Representation id="0" mimeType="audio/mp4" codecs="" 
bandwidth="705600" audioSamplingRate="44100">
+                               <AudioChannelConfiguration 
schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="1" 
/>
+                               <SegmentTemplate timescale="44100" 
initialization="init-stream$RepresentationID$.m4s" 
media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startNumber="1">
+                                       <SegmentTimeline>
+                                               <S t="0" d="44100" />
+                                       </SegmentTimeline>
+                               </SegmentTemplate>
+                       </Representation>
+               </AdaptationSet>
+       </Period>
+</MPD>
diff --git a/tests/ref/fate/dash-mpd b/tests/ref/fate/dash-mpd
new file mode 100644
index 0000000000..f6577f4eb8
--- /dev/null
+++ b/tests/ref/fate/dash-mpd
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xmlns="urn:mpeg:dash:schema:mpd:2011"
+       xmlns:xlink="http://www.w3.org/1999/xlink";
+       xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 
http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd";
+       profiles="urn:mpeg:dash:profile:isoff-live:2011"
+       type="static"
+       mediaPresentationDuration="PT1.0S"
+       maxSegmentDuration="PT1.0S"
+       minBufferTime="PT2.0S">
+       <ProgramInformation>
+       </ProgramInformation>
+       <ServiceDescription id="0">
+       </ServiceDescription>
+       <Period id="0" start="PT0.0S">
+               <AdaptationSet id="0" contentType="audio" startWithSAP="1" 
segmentAlignment="true" bitstreamSwitching="true">
+                       <Representation id="0" mimeType="audio/mp4" codecs="" 
bandwidth="705600" audioSamplingRate="44100">
+                               <AudioChannelConfiguration 
schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="1" 
/>
+                               <BaseURL>dash-audio</BaseURL>
+                               <SegmentList timescale="1000000" 
duration="1000000" startNumber="1">
+                                       <Initialization range="0-732" />
+                                       <SegmentURL mediaRange="733-89444" 
indexRange="733-784" />
+                               </SegmentList>
+                       </Representation>
+               </AdaptationSet>
+       </Period>
+</MPD>
diff --git a/tests/ref/fate/dash-opus b/tests/ref/fate/dash-opus
new file mode 100644
index 0000000000..1902e841c6
--- /dev/null
+++ b/tests/ref/fate/dash-opus
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xmlns="urn:mpeg:dash:schema:mpd:2011"
+       xmlns:xlink="http://www.w3.org/1999/xlink";
+       xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 
http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd";
+       profiles="urn:mpeg:dash:profile:isoff-live:2011"
+       type="static"
+       mediaPresentationDuration="PT1.0S"
+       maxSegmentDuration="PT1.0S"
+       minBufferTime="PT2.0S">
+       <ProgramInformation>
+       </ProgramInformation>
+       <ServiceDescription id="0">
+       </ServiceDescription>
+       <Period id="0" start="PT0.0S">
+               <AdaptationSet id="0" contentType="audio" startWithSAP="1" 
segmentAlignment="true" bitstreamSwitching="true">
+                       <Representation id="0" mimeType="audio/webm" 
codecs="opus" bandwidth="48000" audioSamplingRate="48000">
+                               <AudioChannelConfiguration 
schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="1" 
/>
+                               <SegmentTemplate timescale="1000" 
initialization="init-stream$RepresentationID$.webm" 
media="chunk-stream$RepresentationID$-$Number%05d$.webm" startNumber="1">
+                                       <SegmentTimeline>
+                                               <S t="0" d="1001" />
+                                               <S d="3" />
+                                       </SegmentTimeline>
+                               </SegmentTemplate>
+                       </Representation>
+               </AdaptationSet>
+       </Period>
+</MPD>
diff --git a/tests/ref/fate/dash-playback-rate 
b/tests/ref/fate/dash-playback-rate
new file mode 100644
index 0000000000..8f274fabbe
--- /dev/null
+++ b/tests/ref/fate/dash-playback-rate
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xmlns="urn:mpeg:dash:schema:mpd:2011"
+       xmlns:xlink="http://www.w3.org/1999/xlink";
+       xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 
http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd";
+       profiles="urn:mpeg:dash:profile:isoff-live:2011"
+       type="static"
+       mediaPresentationDuration="PT1.0S"
+       maxSegmentDuration="PT1.0S"
+       minBufferTime="PT2.0S">
+       <ProgramInformation>
+       </ProgramInformation>
+       <ServiceDescription id="0">
+               <PlaybackRate min="0.80" max="1.50"/>
+       </ServiceDescription>
+       <Period id="0" start="PT0.0S">
+               <AdaptationSet id="0" contentType="audio" startWithSAP="1" 
segmentAlignment="true" bitstreamSwitching="true">
+                       <Representation id="0" mimeType="audio/mp4" codecs="" 
bandwidth="705600" audioSamplingRate="44100">
+                               <AudioChannelConfiguration 
schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="1" 
/>
+                               <SegmentTemplate timescale="44100" 
initialization="init-stream$RepresentationID$.m4s" 
media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startNumber="1">
+                                       <SegmentTimeline>
+                                               <S t="0" d="44100" />
+                                       </SegmentTimeline>
+                               </SegmentTemplate>
+                       </Representation>
+               </AdaptationSet>
+       </Period>
+</MPD>
diff --git a/tests/ref/fate/dash-playback-rate-swap 
b/tests/ref/fate/dash-playback-rate-swap
new file mode 100644
index 0000000000..fab260de05
--- /dev/null
+++ b/tests/ref/fate/dash-playback-rate-swap
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xmlns="urn:mpeg:dash:schema:mpd:2011"
+       xmlns:xlink="http://www.w3.org/1999/xlink";
+       xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 
http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd";
+       profiles="urn:mpeg:dash:profile:isoff-live:2011"
+       type="static"
+       mediaPresentationDuration="PT1.0S"
+       maxSegmentDuration="PT1.0S"
+       minBufferTime="PT2.0S">
+       <ProgramInformation>
+       </ProgramInformation>
+       <ServiceDescription id="0">
+       </ServiceDescription>
+       <Period id="0" start="PT0.0S">
+               <AdaptationSet id="0" contentType="audio" startWithSAP="1" 
segmentAlignment="true" bitstreamSwitching="true">
+                       <Representation id="0" mimeType="audio/mp4" codecs="" 
bandwidth="705600" audioSamplingRate="44100">
+                               <AudioChannelConfiguration 
schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="1" 
/>
+                               <SegmentTemplate timescale="44100" 
initialization="init-stream$RepresentationID$.m4s" 
media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startNumber="1">
+                                       <SegmentTimeline>
+                                               <S t="0" d="44100" />
+                                       </SegmentTimeline>
+                               </SegmentTemplate>
+                       </Representation>
+               </AdaptationSet>
+       </Period>
+</MPD>
diff --git a/tests/ref/fate/dash-prft-no-streaming 
b/tests/ref/fate/dash-prft-no-streaming
new file mode 100644
index 0000000000..3e5bd94794
--- /dev/null
+++ b/tests/ref/fate/dash-prft-no-streaming
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xmlns="urn:mpeg:dash:schema:mpd:2011"
+       xmlns:xlink="http://www.w3.org/1999/xlink";
+       xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 
http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd";
+       profiles="urn:mpeg:dash:profile:isoff-live:2011"
+       type="static"
+       mediaPresentationDuration="PT1.0S"
+       maxSegmentDuration="PT1.0S"
+       minBufferTime="PT2.0S">
+       <ProgramInformation>
+       </ProgramInformation>
+       <ServiceDescription id="0">
+       </ServiceDescription>
+       <Period id="0" start="PT0.0S">
+               <AdaptationSet id="0" contentType="audio" startWithSAP="1" 
segmentAlignment="true" bitstreamSwitching="true">
+                       <Representation id="0" mimeType="audio/mp4" codecs="" 
bandwidth="705600" audioSamplingRate="44100">
+                               <AudioChannelConfiguration 
schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="1" 
/>
+                               <SegmentTemplate timescale="44100" 
initialization="init-stream$RepresentationID$.m4s" 
media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startNumber="1">
+                                       <SegmentTimeline>
+                                               <S t="0" d="44100" />
+                                       </SegmentTimeline>
+                               </SegmentTemplate>
+                       </Representation>
+               </AdaptationSet>
+       </Period>
+       <UTCTiming schemeIdUri="urn:mpeg:dash:utc:http-xsdate:2014" 
value="http://example.com/utc"/>
+</MPD>
diff --git a/tests/ref/fate/dash-prft-no-utc b/tests/ref/fate/dash-prft-no-utc
new file mode 100644
index 0000000000..fab260de05
--- /dev/null
+++ b/tests/ref/fate/dash-prft-no-utc
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xmlns="urn:mpeg:dash:schema:mpd:2011"
+       xmlns:xlink="http://www.w3.org/1999/xlink";
+       xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 
http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd";
+       profiles="urn:mpeg:dash:profile:isoff-live:2011"
+       type="static"
+       mediaPresentationDuration="PT1.0S"
+       maxSegmentDuration="PT1.0S"
+       minBufferTime="PT2.0S">
+       <ProgramInformation>
+       </ProgramInformation>
+       <ServiceDescription id="0">
+       </ServiceDescription>
+       <Period id="0" start="PT0.0S">
+               <AdaptationSet id="0" contentType="audio" startWithSAP="1" 
segmentAlignment="true" bitstreamSwitching="true">
+                       <Representation id="0" mimeType="audio/mp4" codecs="" 
bandwidth="705600" audioSamplingRate="44100">
+                               <AudioChannelConfiguration 
schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="1" 
/>
+                               <SegmentTemplate timescale="44100" 
initialization="init-stream$RepresentationID$.m4s" 
media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startNumber="1">
+                                       <SegmentTimeline>
+                                               <S t="0" d="44100" />
+                                       </SegmentTimeline>
+                               </SegmentTemplate>
+                       </Representation>
+               </AdaptationSet>
+       </Period>
+</MPD>
diff --git a/tests/ref/fate/dash-single b/tests/ref/fate/dash-single
new file mode 100644
index 0000000000..62df811f16
--- /dev/null
+++ b/tests/ref/fate/dash-single
@@ -0,0 +1,49 @@
+#tb 0: 1/44100
+#media_type 0: audio
+#codec_id 0: pcm_s16le
+#sample_rate 0: 44100
+#channel_layout_name 0: mono
+0,          0,          0,     1024,     2048, 0x00000000
+0,       1024,       1024,     1024,     2048, 0x00000000
+0,       2048,       2048,     1024,     2048, 0x00000000
+0,       3072,       3072,     1024,     2048, 0x00000000
+0,       4096,       4096,     1024,     2048, 0x00000000
+0,       5120,       5120,     1024,     2048, 0x00000000
+0,       6144,       6144,     1024,     2048, 0x00000000
+0,       7168,       7168,     1024,     2048, 0x00000000
+0,       8192,       8192,     1024,     2048, 0x00000000
+0,       9216,       9216,     1024,     2048, 0x00000000
+0,      10240,      10240,     1024,     2048, 0x00000000
+0,      11264,      11264,     1024,     2048, 0x00000000
+0,      12288,      12288,     1024,     2048, 0x00000000
+0,      13312,      13312,     1024,     2048, 0x00000000
+0,      14336,      14336,     1024,     2048, 0x00000000
+0,      15360,      15360,     1024,     2048, 0x00000000
+0,      16384,      16384,     1024,     2048, 0x00000000
+0,      17408,      17408,     1024,     2048, 0x00000000
+0,      18432,      18432,     1024,     2048, 0x00000000
+0,      19456,      19456,     1024,     2048, 0x00000000
+0,      20480,      20480,     1024,     2048, 0x00000000
+0,      21504,      21504,     1024,     2048, 0x00000000
+0,      22528,      22528,     1024,     2048, 0x00000000
+0,      23552,      23552,     1024,     2048, 0x00000000
+0,      24576,      24576,     1024,     2048, 0x00000000
+0,      25600,      25600,     1024,     2048, 0x00000000
+0,      26624,      26624,     1024,     2048, 0x00000000
+0,      27648,      27648,     1024,     2048, 0x00000000
+0,      28672,      28672,     1024,     2048, 0x00000000
+0,      29696,      29696,     1024,     2048, 0x00000000
+0,      30720,      30720,     1024,     2048, 0x00000000
+0,      31744,      31744,     1024,     2048, 0x00000000
+0,      32768,      32768,     1024,     2048, 0x00000000
+0,      33792,      33792,     1024,     2048, 0x00000000
+0,      34816,      34816,     1024,     2048, 0x00000000
+0,      35840,      35840,     1024,     2048, 0x00000000
+0,      36864,      36864,     1024,     2048, 0x00000000
+0,      37888,      37888,     1024,     2048, 0x00000000
+0,      38912,      38912,     1024,     2048, 0x00000000
+0,      39936,      39936,     1024,     2048, 0x00000000
+0,      40960,      40960,     1024,     2048, 0x00000000
+0,      41984,      41984,     1024,     2048, 0x00000000
+0,      43008,      43008,     1024,     2048, 0x00000000
+0,      44032,      44032,       68,      136, 0x00000000
diff --git a/tests/ref/fate/dash-streams-va b/tests/ref/fate/dash-streams-va
new file mode 100644
index 0000000000..242e428d2d
--- /dev/null
+++ b/tests/ref/fate/dash-streams-va
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xmlns="urn:mpeg:dash:schema:mpd:2011"
+       xmlns:xlink="http://www.w3.org/1999/xlink";
+       xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 
http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd";
+       profiles="urn:mpeg:dash:profile:isoff-live:2011"
+       type="static"
+       mediaPresentationDuration="PT1.0S"
+       maxSegmentDuration="PT1.0S"
+       minBufferTime="PT2.0S">
+       <ProgramInformation>
+       </ProgramInformation>
+       <ServiceDescription id="0">
+       </ServiceDescription>
+       <Period id="0" start="PT0.0S">
+               <AdaptationSet id="0" contentType="video" startWithSAP="1" 
segmentAlignment="true" bitstreamSwitching="true" frameRate="25/1" 
maxWidth="320" maxHeight="240" par="4:3">
+                       <Representation id="0" mimeType="video/mp4" 
codecs="mp4v.20" bandwidth="200000" width="320" height="240" sar="1:1">
+                               <SegmentTemplate timescale="12800" 
initialization="init-stream$RepresentationID$.m4s" 
media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startNumber="1">
+                                       <SegmentTimeline>
+                                               <S t="0" d="12800" />
+                                       </SegmentTimeline>
+                               </SegmentTemplate>
+                       </Representation>
+               </AdaptationSet>
+               <AdaptationSet id="1" contentType="audio" startWithSAP="1" 
segmentAlignment="true" bitstreamSwitching="true">
+                       <Representation id="1" mimeType="audio/mp4" codecs="" 
bandwidth="705600" audioSamplingRate="44100">
+                               <AudioChannelConfiguration 
schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="1" 
/>
+                               <SegmentTemplate timescale="44100" 
initialization="init-stream$RepresentationID$.m4s" 
media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startNumber="1">
+                                       <SegmentTimeline>
+                                               <S t="0" d="44100" />
+                                       </SegmentTimeline>
+                               </SegmentTemplate>
+                       </Representation>
+               </AdaptationSet>
+       </Period>
+</MPD>
diff --git a/tests/ref/fate/dash-timeline-off b/tests/ref/fate/dash-timeline-off
new file mode 100644
index 0000000000..bbd0972f30
--- /dev/null
+++ b/tests/ref/fate/dash-timeline-off
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xmlns="urn:mpeg:dash:schema:mpd:2011"
+       xmlns:xlink="http://www.w3.org/1999/xlink";
+       xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 
http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd";
+       profiles="urn:mpeg:dash:profile:isoff-live:2011"
+       type="static"
+       mediaPresentationDuration="PT1.0S"
+       maxSegmentDuration="PT1.0S"
+       minBufferTime="PT2.0S">
+       <ProgramInformation>
+       </ProgramInformation>
+       <ServiceDescription id="0">
+       </ServiceDescription>
+       <Period id="0" start="PT0.0S">
+               <AdaptationSet id="0" contentType="audio" startWithSAP="1" 
segmentAlignment="true" bitstreamSwitching="true">
+                       <Representation id="0" mimeType="audio/mp4" codecs="" 
bandwidth="705600" audioSamplingRate="44100">
+                               <AudioChannelConfiguration 
schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="1" 
/>
+                               <SegmentTemplate timescale="1000000" 
duration="1000000" initialization="init-stream$RepresentationID$.m4s" 
media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startNumber="1">
+                               </SegmentTemplate>
+                       </Representation>
+               </AdaptationSet>
+       </Period>
+</MPD>
diff --git a/tests/ref/fate/dash-video-audio b/tests/ref/fate/dash-video-audio
new file mode 100644
index 0000000000..242e428d2d
--- /dev/null
+++ b/tests/ref/fate/dash-video-audio
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xmlns="urn:mpeg:dash:schema:mpd:2011"
+       xmlns:xlink="http://www.w3.org/1999/xlink";
+       xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 
http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd";
+       profiles="urn:mpeg:dash:profile:isoff-live:2011"
+       type="static"
+       mediaPresentationDuration="PT1.0S"
+       maxSegmentDuration="PT1.0S"
+       minBufferTime="PT2.0S">
+       <ProgramInformation>
+       </ProgramInformation>
+       <ServiceDescription id="0">
+       </ServiceDescription>
+       <Period id="0" start="PT0.0S">
+               <AdaptationSet id="0" contentType="video" startWithSAP="1" 
segmentAlignment="true" bitstreamSwitching="true" frameRate="25/1" 
maxWidth="320" maxHeight="240" par="4:3">
+                       <Representation id="0" mimeType="video/mp4" 
codecs="mp4v.20" bandwidth="200000" width="320" height="240" sar="1:1">
+                               <SegmentTemplate timescale="12800" 
initialization="init-stream$RepresentationID$.m4s" 
media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startNumber="1">
+                                       <SegmentTimeline>
+                                               <S t="0" d="12800" />
+                                       </SegmentTimeline>
+                               </SegmentTemplate>
+                       </Representation>
+               </AdaptationSet>
+               <AdaptationSet id="1" contentType="audio" startWithSAP="1" 
segmentAlignment="true" bitstreamSwitching="true">
+                       <Representation id="1" mimeType="audio/mp4" codecs="" 
bandwidth="705600" audioSamplingRate="44100">
+                               <AudioChannelConfiguration 
schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="1" 
/>
+                               <SegmentTemplate timescale="44100" 
initialization="init-stream$RepresentationID$.m4s" 
media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startNumber="1">
+                                       <SegmentTimeline>
+                                               <S t="0" d="44100" />
+                                       </SegmentTimeline>
+                               </SegmentTemplate>
+                       </Representation>
+               </AdaptationSet>
+       </Period>
+</MPD>
diff --git a/tests/ref/fate/dash-xml-meta b/tests/ref/fate/dash-xml-meta
new file mode 100644
index 0000000000..efee961f63
--- /dev/null
+++ b/tests/ref/fate/dash-xml-meta
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xmlns="urn:mpeg:dash:schema:mpd:2011"
+       xmlns:xlink="http://www.w3.org/1999/xlink";
+       xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 
http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd";
+       profiles="urn:mpeg:dash:profile:isoff-live:2011"
+       type="static"
+       mediaPresentationDuration="PT1.0S"
+       maxSegmentDuration="PT1.0S"
+       minBufferTime="PT2.0S">
+       <ProgramInformation>
+               <Title>Test &amp; &lt;Special&gt; &quot;Chars&quot;</Title>
+       </ProgramInformation>
+       <ServiceDescription id="0">
+       </ServiceDescription>
+       <Period id="0" start="PT0.0S">
+               <AdaptationSet id="0" contentType="audio" startWithSAP="1" 
segmentAlignment="true" bitstreamSwitching="true">
+                       <Representation id="0" mimeType="audio/mp4" codecs="" 
bandwidth="705600" audioSamplingRate="44100">
+                               <AudioChannelConfiguration 
schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="1" 
/>
+                               <SegmentTemplate timescale="44100" 
initialization="init-stream$RepresentationID$.m4s" 
media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startNumber="1">
+                                       <SegmentTimeline>
+                                               <S t="0" d="44100" />
+                                       </SegmentTimeline>
+                               </SegmentTemplate>
+                       </Representation>
+               </AdaptationSet>
+       </Period>
+</MPD>
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to