From patchwork Fri Sep 9 08:15:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ligverd Haer X-Patchwork-Id: 487 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.134 with SMTP id o128csp196484vsd; Fri, 9 Sep 2016 01:18:46 -0700 (PDT) X-Received: by 10.28.52.2 with SMTP id b2mr1704868wma.109.1473409126094; Fri, 09 Sep 2016 01:18:46 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id bk9si1906680wjb.184.2016.09.09.01.18.43; Fri, 09 Sep 2016 01:18:46 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 139CC689F65; Fri, 9 Sep 2016 11:18:31 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail.kursktelecom.ru (mail.kursktelecom.ru [77.241.16.8]) by ffbox0-bg.mplayerhq.hu (Postfix) with SMTP id 8E9DD689ECE for ; Fri, 9 Sep 2016 11:18:24 +0300 (EEST) Received: (qmail 20382 invoked by uid 89); 9 Sep 2016 11:15:32 +0300 Received: by simscan 1.1.0 ppid: 20354, pid: 20356, t: 1.9793s scanners: regex: 1.1.0 attach: 1.1.0 clamav: 0.88.2/m:38/d:1452 spam: 3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on mail.kursktelecom.ru X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED, WEIRD_QUOTING autolearn=disabled version=3.1.1 Received: from ligverd.kursktelecom.ru (HELO kid.localnet) (hidra@kursktelecom.ru@77.241.16.66) by smtp.kursktelecom.ru with ESMTPA; 9 Sep 2016 11:15:30 +0300 From: Ligverd Haer To: FFmpeg development discussions and patches Date: Fri, 09 Sep 2016 11:15:32 +0300 Message-ID: <2710195.FATtgMfBzh@kid> User-Agent: KMail/5.2.3 (Linux/4.1.13-smp; KDE/5.24.0; i686; ; ) In-Reply-To: <20160908235514.GX4692@nb4> References: <2105862.8yzaTEHBEC@kid> <3350228.10vRjjMd7z@kid> <20160908235514.GX4692@nb4> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] dash encoder. Correct generated manifest for MPEG-DASH MPD Validator and calculate current bandwidth for eath chunk. Now works correctly with dash.sj 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" > missing commit mesage / not a proper git patch ... > this looks unrelated, unrelated changes need to be in separate patches > > please explain in the commit messages of the patch(es) what each > patch does, why it does it and if you have at hand any reference to > specs feel free to include them > > floats make the binary output code platform dependant, theres no > need to use floats here Thanks for the positive comments Michael. 0001-libavformat-dashenc.c-fix-validation-manifest.mpd.patch 1. If the MPD is dynamic the Period element shall have an id. 2. Attribute ‘bandwidth’ must appear on element ‘Representation’ 3. Attribute [profiles,width,height,sar,frameRate,audioSamplingRate,mimeType,segmentProfiles,codecs,maximumSAPPeriod,startWithSAP,maxPlayoutRate,codingDependency,scanType] Common attributes for AdaptationSet and Representation shall either be in one of the elements but not in both. the tests were conducted on http://www-itec.uni-klu.ac.at/dash/?page_id=605 0002-libavformat-dashenc.c-calculation-bandwidth-for-mani.patch When stream encoding is not counted bandwidth which makes it impossible to properly switch to the desired stream. Use float I removed. Now the calculation accuracy decreased to kilobits. Is it possible to supply test division by 0 ? 0003-libavformat-dashenc.c-change-moveflags-works-better.patch Replaced flags movflags. These flags input rtsp stream looked better. From 8dc233c503d954f344933b81d4ae1d6cef584675 Mon Sep 17 00:00:00 2001 From: ligverd Date: Fri, 9 Sep 2016 10:49:28 +0300 Subject: [PATCH 3/3] libavformat/dashenc.c change moveflags, works better --- libavformat/dashenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index d61aa90..3ce5583 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -654,7 +654,7 @@ static int dash_write_header(AVFormatContext *s) goto fail; os->init_start_pos = 0; - av_dict_set(&opts, "movflags", "frag_custom+dash+delay_moov", 0); + av_dict_set(&opts, "movflags", "dash+frag_keyframe+empty_moov+separate_moof+delay_moov", 0); if ((ret = avformat_write_header(ctx, &opts)) < 0) { goto fail; } -- 2.6.3