diff mbox

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

Message ID 20190219064854.24186-2-kjeyapal@akamai.com
State Superseded
Headers show

Commit Message

Jeyapal, Karthick Feb. 19, 2019, 6:48 a.m. UTC
Added comments regarding usage of certain movflags in streaming mode.
---
 libavformat/dashenc.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Carl Eugen Hoyos Feb. 19, 2019, 7:29 p.m. UTC | #1
2019-02-19 7:48 GMT+01:00, Karthick J <kjeyapal@akamai.com>:

> +    // Explanation for why certain movflags are used for streaming:

I don't think this is a useful line.

> +    // frag_every_frame :- Every frame should be moof fragment, so

Is there a smiley in the middle of the line?

> +    //     the data from current frame can be streamed without
> +    //     waiting for the completion of the entire segment.

frag_every_frame: Allows lower latency (iiuc!)
In any case, this is too long.

> +    // skip_sidx :- The SIDX atom for each moof will result in a
> +    //     significant bitrate overhead. Hence disabling it here.

skip_sidx: Reduce bitrate overhead

> +    // skip_trailer

skip_trailer: Reduce memory footprint

Carl Eugen
diff mbox

Patch

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);