[FFmpeg-devel] [PATCH 2/2] avformat/dashenc: Added comments

Karthick J kjeyapal at akamai.com
Tue Feb 19 08:48:54 EET 2019


Added comments regarding usage of certain movflags in streaming mode.
---
 libavformat/dashenc.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index a0b44a0ec3..f8782756b4 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -1216,6 +1216,17 @@ static int dash_init(AVFormatContext *s)
 
         if (os->segment_type == SEGMENT_TYPE_MP4) {
             if (c->streaming)
+                // Explanation for why certain movflags are used for streaming:
+                // frag_every_frame :- Every frame should be moof fragment, so
+                //     the data from current frame can be streamed without
+                //     waiting for the completion of the entire segment.
+                // skip_sidx :- The SIDX atom for each moof will result in a
+                //     significant bitrate overhead. Hence disabling it here.
+                // skip_trailer :- Writing mp4 trailer means that a list of all
+                //     fragment's information is stored, which results continuous
+                //     growth in memory usage as more fragments are muxed.
+                //     Disabling trailer results in deterministic memory usage.
+                //     Anyways trailer is unnecessary of fmp4 segment.
                 av_dict_set(&opts, "movflags", "frag_every_frame+dash+delay_moov+skip_sidx+skip_trailer", 0);
             else
                 av_dict_set(&opts, "movflags", "frag_custom+dash+delay_moov", 0);
-- 
2.17.1 (Apple Git-112)



More information about the ffmpeg-devel mailing list