From patchwork Tue Feb 19 06:48:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jeyapal, Karthick" X-Patchwork-Id: 12102 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 41673447BAB for ; Tue, 19 Feb 2019 08:49:22 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1CDF268ABE8; Tue, 19 Feb 2019 08:49:22 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from a1i868.smtp2go.com (a1i868.smtp2go.com [43.228.187.100]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 320BF68AB42 for ; Tue, 19 Feb 2019 08:49:15 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=smtpservice.net; s=m78bu0.a1-4.dyn; x=1550559860; h=Feedback-ID: X-Smtpcorp-Track:Message-Id:Date:Subject:To:From:Reply-To:Sender: List-Unsubscribe; bh=dIewl+vDAT3b+vB1fo0uepsC5MDFNvv0Lw1GGOjDAlw=; b=Ra7Rknc4 KDumJ1VI/FhsIpZG7gD82HmKDMupnMKU0waZLxIJ+6zh6OnATla23QNGc9b1FkO44HgLvIQ31oJTY AgeMalqPZrl81jhPrF+JQSn5O4wKrl9Dcg3iWsTFOiPYQsSOoWHLH6njaGmJP6IpjRruqv7HKjBUn KAx4nsHVIEuDAfq5mYl5oPj7ZIirO6e0er90rI4KT9O7VAqp/RZ/m6ZQ56qkYqH1ZdjhS34bB2zce SsCWOdLNvAEbxwu6XXCm6GoQCpbr2puh/VkD/u7wo554G+tTG4l9aJbOn5p79vGKO750D9hJ6A5S0 J/Zc/GXugrXUkCFlJrgbGck6hA==; Received: from [10.66.228.43] (helo=SmtpCorp) by smtpcorp.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.91) (envelope-from ) id 1gvzDN-4pkQwc-LG; Tue, 19 Feb 2019 06:49:13 +0000 Received: from [10.63.208.195] (helo=blr-mp4tf.bangalore.corp.akamai.com) by smtpcorp.com with esmtpa (Exim 4.91) (envelope-from ) id 1gvzDM-wSEUyF-Eb; Tue, 19 Feb 2019 06:49:13 +0000 From: Karthick J To: ffmpeg-devel@ffmpeg.org Date: Tue, 19 Feb 2019 12:18:54 +0530 Message-Id: <20190219064854.24186-2-kjeyapal@akamai.com> X-Mailer: git-send-email 2.17.1 (Apple Git-112) In-Reply-To: <20190219064854.24186-1-kjeyapal@akamai.com> References: <20190219064854.24186-1-kjeyapal@akamai.com> X-Smtpcorp-Track: 1gvzDuwSElyFEP.aAPpHorCk Feedback-ID: 337386m:337386asVRLGB:337386sByymuFB07 X-Report-Abuse: Please forward a copy of this message, including all headers, to Subject: [FFmpeg-devel] [PATCH 2/2] avformat/dashenc: Added comments X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Karthick J MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" 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);