diff mbox

[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

Message ID 2710195.FATtgMfBzh@kid
State Changes Requested
Headers show

Commit Message

Ligverd Haer Sept. 9, 2016, 8:15 a.m. UTC
> 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.

Comments

Michael Niedermayer April 18, 2017, 6:14 p.m. UTC | #1
On Fri, Sep 09, 2016 at 11:15:32AM +0300, Ligverd Haer wrote:
>  
> > 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.

Sorry for the late reply, i was hoping someone who knows dash well
would look at this and then i forgot

patch1 still applies cleanly
patches2 and 3 dont

patch1 removes the storage of the framerate this leaves several
unused variables.
Most likely the framerate should be stored differently instead of
not storing it anymore but
certainly no unused variables should remain

thx

[...]
diff mbox

Patch

From 8dc233c503d954f344933b81d4ae1d6cef584675 Mon Sep 17 00:00:00 2001
From: ligverd <ligverd@r46.ru>
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