diff mbox

[FFmpeg-devel] avformat/dashenc: Skip writing trailer for MP4 output when in streaming mode

Message ID 20190124060121.85529-1-kjeyapal@akamai.com
State Accepted
Commit 1db30d6cec70d9b28c80cb743220dd2502b8df30
Headers show

Commit Message

Jeyapal, Karthick Jan. 24, 2019, 6:01 a.m. UTC
In streaming mode mp4 trailer is not required for playout.
---
 libavformat/dashenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Liu Steven Jan. 24, 2019, 7:16 a.m. UTC | #1
> 在 2019年1月24日,下午2:01,Karthick J <kjeyapal@akamai.com> 写道:
> 
> In streaming mode mp4 trailer is not required for playout.
> ---
> libavformat/dashenc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
> index 9c90cf17e5..6299e179c2 100644
> --- a/libavformat/dashenc.c
> +++ b/libavformat/dashenc.c
> @@ -1210,7 +1210,7 @@ static int dash_init(AVFormatContext *s)
> 
>         if (os->segment_type == SEGMENT_TYPE_MP4) {
>             if (c->streaming)
> -                av_dict_set(&opts, "movflags", "frag_every_frame+dash+delay_moov+skip_sidx", 0);
> +                av_dict_set(&opts, "movflags", "frag_every_frame+dash+delay_moov+skip_sidx+skip_trailer", 0);
maybe you can merge this to hlsenc too.
>             else
>                 av_dict_set(&opts, "movflags", "frag_custom+dash+delay_moov", 0);
>         } else {
> -- 
> 2.17.1 (Apple Git-112)
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Thanks
Steven
Jeyapal, Karthick Jan. 25, 2019, 8:09 a.m. UTC | #2
On 1/24/19 12:46 PM, Liu Steven wrote:
>

>

>> 在 2019年1月24日,下午2:01,Karthick J <kjeyapal@akamai.com> 写道:

>>

>> In streaming mode mp4 trailer is not required for playout.

>> ---

>> libavformat/dashenc.c | 2 +-

>> 1 file changed, 1 insertion(+), 1 deletion(-)

>>

>> diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c

>> index 9c90cf17e5..6299e179c2 100644

>> --- a/libavformat/dashenc.c

>> +++ b/libavformat/dashenc.c

>> @@ -1210,7 +1210,7 @@ static int dash_init(AVFormatContext *s)

>>

>>         if (os->segment_type == SEGMENT_TYPE_MP4) {

>>             if (c->streaming)

>> -                av_dict_set(&opts, "movflags", "frag_every_frame+dash+delay_moov+skip_sidx", 0);

>> +                av_dict_set(&opts, "movflags", "frag_every_frame+dash+delay_moov+skip_sidx+skip_trailer", 0);

> maybe you can merge this to hlsenc too.

It has been quite a while since I worked on hlsenc :)
>>             else

>>                 av_dict_set(&opts, "movflags", "frag_custom+dash+delay_moov", 0);

>>         } else {

>> -- 

>> 2.17.1 (Apple Git-112)

>>

>> _______________________________________________

>> ffmpeg-devel mailing list

>> ffmpeg-devel@ffmpeg.org

>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

>

>

> Thanks

> Steven

>
mypopy@gmail.com Jan. 31, 2019, 1:38 a.m. UTC | #3
On Thu, Jan 24, 2019 at 2:01 PM Karthick J <kjeyapal@akamai.com> wrote:
>
> In streaming mode mp4 trailer is not required for playout.
> ---
>  libavformat/dashenc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
> index 9c90cf17e5..6299e179c2 100644
> --- a/libavformat/dashenc.c
> +++ b/libavformat/dashenc.c
> @@ -1210,7 +1210,7 @@ static int dash_init(AVFormatContext *s)
>
>          if (os->segment_type == SEGMENT_TYPE_MP4) {
>              if (c->streaming)
Can we add some comments when setting some special flags in the code,
not just comments in the commit message?
> -                av_dict_set(&opts, "movflags", "frag_every_frame+dash+delay_moov+skip_sidx", 0);
> +                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);
>          } else {
> --
Jeyapal, Karthick Feb. 19, 2019, 6:53 a.m. UTC | #4
On 1/31/19 7:08 AM, mypopy@gmail.com wrote:
> On Thu, Jan 24, 2019 at 2:01 PM Karthick J <kjeyapal@akamai.com> wrote:

>>

>> In streaming mode mp4 trailer is not required for playout.

>> ---

>>  libavformat/dashenc.c | 2 +-

>>  1 file changed, 1 insertion(+), 1 deletion(-)

>>

>> diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c

>> index 9c90cf17e5..6299e179c2 100644

>> --- a/libavformat/dashenc.c

>> +++ b/libavformat/dashenc.c

>> @@ -1210,7 +1210,7 @@ static int dash_init(AVFormatContext *s)

>>

>>          if (os->segment_type == SEGMENT_TYPE_MP4) {

>>              if (c->streaming)

> Can we add some comments when setting some special flags in the code,

> not just comments in the commit message?

Thanks for your suggestion. Have added the comments in this patch http://ffmpeg.org/pipermail/ffmpeg-devel/2019-February/240258.html
>> -                av_dict_set(&opts, "movflags", "frag_every_frame+dash+delay_moov+skip_sidx", 0);

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

>>          } else {

>> --
diff mbox

Patch

diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index 9c90cf17e5..6299e179c2 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -1210,7 +1210,7 @@  static int dash_init(AVFormatContext *s)
 
         if (os->segment_type == SEGMENT_TYPE_MP4) {
             if (c->streaming)
-                av_dict_set(&opts, "movflags", "frag_every_frame+dash+delay_moov+skip_sidx", 0);
+                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);
         } else {