Re: [FFmpeg-devel] HLS Segmenter and the "hls_time" option

2016-08-30 Thread Steven Liu
2016-08-31 1:48 GMT+08:00 Aman Gupta :

> On Fri, Aug 26, 2016 at 2:06 AM, Steven Liu 
> wrote:
>
> > 2016-08-26 16:58 GMT+08:00 Ibrahim Tachijian :
> >
> > > Thanks this actually does what I expected it to do.
> > > For me this option will help a lot, and we would really be interested
> in
> > > this eventually reaching git.
> > >
> > > Thanks to Steven Liu's patch we will be able to use this to start live
> > > streams faster. Great job!
> > >
> > > Below follows what command I ran and the output m3u8 playlist.
> > >
> > > /root/ffmpeg_patched -analyzeduration 100 -i udp://MCAST_ADDR:3301
> > -map
> > > 0:0 -map 0:1 -c:v libx264 -preset superfast -g 25 -b:v 900k -maxrate
> 900k
> > > -bufsize 2000k -filter:v yadif -c:a libfdk_aac -b:a 64k -hls_time 5
> > > *-hls_init_time
> > > 1* -hls_list_size 10 -hls_allow_cache 0 -hls_flags delete_segments -f
> hls
> > > /tmp/playlist.m3u8
> > >
> > > The output M3U8 of patched ffmpeg:
> > >
> > > #EXTM3U
> > > #EXT-X-VERSION:3
> > > #EXT-X-ALLOW-CACHE:NO
> > > #EXT-X-TARGETDURATION:5
> > > #EXT-X-MEDIA-SEQUENCE:3
> > > #EXTINF:1.00,
> > > playlist3.ts
> > > #EXTINF:1.00,
> > > playlist4.ts
> > > #EXTINF:1.00,
> > > playlist5.ts
> > > #EXTINF:1.00,
> > > playlist6.ts
> > > #EXTINF:1.00,
> > > playlist7.ts
> > > #EXTINF:1.00,
> > > playlist8.ts
> > > #EXTINF:1.60,
> > > playlist9.ts
> > > #EXTINF:1.00,
> > > playlist10.ts
> > > #EXTINF:4.00,
> > > playlist11.ts
> > > #EXTINF:5.00,
> > > playlist12.ts
> > >
> > >
> > > On Fri, Aug 26, 2016 at 8:37 AM Steven Liu 
> > > wrote:
> > >
> > > > 2016-08-26 14:00 GMT+08:00 Steven Liu :
> > > >
> > > > >
> > > > >
> > > > > 2016-08-26 10:34 GMT+08:00 Ibrahim Tachijian :
> > > > >
> > > > >> In my use case scenario I only need it for the very first couple
> of
> > > > >> segments.
> > > > >> After 5 segments it is not a problem anymore to have 5 second
> > segments
> > > > >> only.
> > > > >>
> > > > >>
> > > > >>
> > > > >> On Fri, Aug 26, 2016 at 4:25 AM Steven Liu <
> lingjiujia...@gmail.com
> > >
> > > > >> wrote:
> > > > >>
> > > > >> > 2016-08-26 10:10 GMT+08:00 Ibrahim Tachijian  >:
> > > > >> >
> > > > >> > > yes that is correct Steven.
> > > > >> > >
> > > > >> > > On Fri, Aug 26, 2016 at 3:41 AM Steven Liu <
> > > lingjiujia...@gmail.com
> > > > >
> > > > >> > > wrote:
> > > > >> > >
> > > > >> > > > 2016-08-26 8:17 GMT+08:00 Ibrahim Tachijian <
> bar...@netsat.se
> > >:
> > > > >> > > >
> > > > >> > > > > Steven, I am not sure you understood me correctly or
> > perhaps I
> > > > did
> > > > >> > not
> > > > >> > > > > explain myself optimally.
> > > > >> > > > >
> > > > >> > > > > We still want to split by keyframe in a normal fashion.
> But,
> > > for
> > > > >> > > example,
> > > > >> > > > > would like the first 5 segments to have an "hls_time" of
> 1s
> > > and
> > > > >> the
> > > > >> > > rest
> > > > >> > > > of
> > > > >> > > > > the segments after the first 5 to have an "hls_time" of
> 5s.
> > > > >> > > > >
> > > > >> > > > > An made up option would be (hls_time_initial
> Seconds,Number)
> > > > >> > > > >
> > > > >> > > > >- "-hls_time_initial 1,5 -hls_time 5"
> > > > >> > > > >
> > > > >> > > > > The output playlist would contain segments (split at
> > > keyframes)
> > > > 5
> > > > >> > > > segments
> > > > >> > > > > of length 1s and then any segment after the initial 5
> > segment
> > > > >> would
> > > > >> > be
> > > > >> > > > 5s.
> > > > >> > > > >
> > > > >> > > > > Is it clear what I am trying to explain?
> > > > >> > > > >
> > > > >> > > > > What do you think? Do you know how this can be achieved?
> > > > >> > > > >
> > > > >> > > > > Thanks,
> > > > >> > > > >
> > > > >> > > > > On Fri, Aug 26, 2016 at 2:06 AM Steven Liu <
> > > > >> lingjiujia...@gmail.com>
> > > > >> > > > > wrote:
> > > > >> > > > >
> > > > >> > > > > > 2016-08-26 7:39 GMT+08:00 Ibrahim Tachijian <
> > > bar...@netsat.se
> > > > >:
> > > > >> > > > > >
> > > > >> > > > > > > Hello,
> > > > >> > > > > > >
> > > > >> > > > > > > I've been thinking about an option for "hls_time" that
> > is
> > > > not
> > > > >> > > > currently
> > > > >> > > > > > > supported by FFMpeg and I would like feedback to if
> some
> > > of
> > > > >> you
> > > > >> > may
> > > > >> > > > > think
> > > > >> > > > > > > this is useful or utterly unnecessary.
> > > > >> > > > > > >
> > > > >> > > > > > > I find scenarios where we sometimes want to create an
> > HLS
> > > > >> output
> > > > >> > > and
> > > > >> > > > > > would
> > > > >> > > > > > > like the *first couple of segments* to be shorter than
> > the
> > > > >> *rest
> > > > >> > of
> > > > >> > > > the
> > > > >> > > > > > > segments.*
> > > > >> > > > > > >
> > > > >> > > > > > > For example starting off with 1s segments up to N
> > segments
> > > > >> then
> > > > >> > > > switch
> > > > >> > > > 

Re: [FFmpeg-devel] HLS Segmenter and the "hls_time" option

2016-08-30 Thread Steven Liu
Aman Gupta 于2016年8月31日 周三上午1:48写道:

> On Fri, Aug 26, 2016 at 2:06 AM, Steven Liu 
> wrote:
>
> > 2016-08-26 16:58 GMT+08:00 Ibrahim Tachijian :
> >
> > > Thanks this actually does what I expected it to do.
> > > For me this option will help a lot, and we would really be interested
> in
> > > this eventually reaching git.
> > >
> > > Thanks to Steven Liu's patch we will be able to use this to start live
> > > streams faster. Great job!
> > >
> > > Below follows what command I ran and the output m3u8 playlist.
> > >
> > > /root/ffmpeg_patched -analyzeduration 100 -i udp://MCAST_ADDR:3301
> > -map
> > > 0:0 -map 0:1 -c:v libx264 -preset superfast -g 25 -b:v 900k -maxrate
> 900k
> > > -bufsize 2000k -filter:v yadif -c:a libfdk_aac -b:a 64k -hls_time 5
> > > *-hls_init_time
> > > 1* -hls_list_size 10 -hls_allow_cache 0 -hls_flags delete_segments -f
> hls
> > > /tmp/playlist.m3u8
> > >
> > > The output M3U8 of patched ffmpeg:
> > >
> > > #EXTM3U
> > > #EXT-X-VERSION:3
> > > #EXT-X-ALLOW-CACHE:NO
> > > #EXT-X-TARGETDURATION:5
> > > #EXT-X-MEDIA-SEQUENCE:3
> > > #EXTINF:1.00,
> > > playlist3.ts
> > > #EXTINF:1.00,
> > > playlist4.ts
> > > #EXTINF:1.00,
> > > playlist5.ts
> > > #EXTINF:1.00,
> > > playlist6.ts
> > > #EXTINF:1.00,
> > > playlist7.ts
> > > #EXTINF:1.00,
> > > playlist8.ts
> > > #EXTINF:1.60,
> > > playlist9.ts
> > > #EXTINF:1.00,
> > > playlist10.ts
> > > #EXTINF:4.00,
> > > playlist11.ts
> > > #EXTINF:5.00,
> > > playlist12.ts
> > >
> > >
> > > On Fri, Aug 26, 2016 at 8:37 AM Steven Liu 
> > > wrote:
> > >
> > > > 2016-08-26 14:00 GMT+08:00 Steven Liu :
> > > >
> > > > >
> > > > >
> > > > > 2016-08-26 10:34 GMT+08:00 Ibrahim Tachijian :
> > > > >
> > > > >> In my use case scenario I only need it for the very first couple
> of
> > > > >> segments.
> > > > >> After 5 segments it is not a problem anymore to have 5 second
> > segments
> > > > >> only.
> > > > >>
> > > > >>
> > > > >>
> > > > >> On Fri, Aug 26, 2016 at 4:25 AM Steven Liu <
> lingjiujia...@gmail.com
> > >
> > > > >> wrote:
> > > > >>
> > > > >> > 2016-08-26 10:10 GMT+08:00 Ibrahim Tachijian  >:
> > > > >> >
> > > > >> > > yes that is correct Steven.
> > > > >> > >
> > > > >> > > On Fri, Aug 26, 2016 at 3:41 AM Steven Liu <
> > > lingjiujia...@gmail.com
> > > > >
> > > > >> > > wrote:
> > > > >> > >
> > > > >> > > > 2016-08-26 8:17 GMT+08:00 Ibrahim Tachijian <
> bar...@netsat.se
> > >:
> > > > >> > > >
> > > > >> > > > > Steven, I am not sure you understood me correctly or
> > perhaps I
> > > > did
> > > > >> > not
> > > > >> > > > > explain myself optimally.
> > > > >> > > > >
> > > > >> > > > > We still want to split by keyframe in a normal fashion.
> But,
> > > for
> > > > >> > > example,
> > > > >> > > > > would like the first 5 segments to have an "hls_time" of
> 1s
> > > and
> > > > >> the
> > > > >> > > rest
> > > > >> > > > of
> > > > >> > > > > the segments after the first 5 to have an "hls_time" of
> 5s.
> > > > >> > > > >
> > > > >> > > > > An made up option would be (hls_time_initial
> Seconds,Number)
> > > > >> > > > >
> > > > >> > > > >- "-hls_time_initial 1,5 -hls_time 5"
> > > > >> > > > >
> > > > >> > > > > The output playlist would contain segments (split at
> > > keyframes)
> > > > 5
> > > > >> > > > segments
> > > > >> > > > > of length 1s and then any segment after the initial 5
> > segment
> > > > >> would
> > > > >> > be
> > > > >> > > > 5s.
> > > > >> > > > >
> > > > >> > > > > Is it clear what I am trying to explain?
> > > > >> > > > >
> > > > >> > > > > What do you think? Do you know how this can be achieved?
> > > > >> > > > >
> > > > >> > > > > Thanks,
> > > > >> > > > >
> > > > >> > > > > On Fri, Aug 26, 2016 at 2:06 AM Steven Liu <
> > > > >> lingjiujia...@gmail.com>
> > > > >> > > > > wrote:
> > > > >> > > > >
> > > > >> > > > > > 2016-08-26 7:39 GMT+08:00 Ibrahim Tachijian <
> > > bar...@netsat.se
> > > > >:
> > > > >> > > > > >
> > > > >> > > > > > > Hello,
> > > > >> > > > > > >
> > > > >> > > > > > > I've been thinking about an option for "hls_time" that
> > is
> > > > not
> > > > >> > > > currently
> > > > >> > > > > > > supported by FFMpeg and I would like feedback to if
> some
> > > of
> > > > >> you
> > > > >> > may
> > > > >> > > > > think
> > > > >> > > > > > > this is useful or utterly unnecessary.
> > > > >> > > > > > >
> > > > >> > > > > > > I find scenarios where we sometimes want to create an
> > HLS
> > > > >> output
> > > > >> > > and
> > > > >> > > > > > would
> > > > >> > > > > > > like the *first couple of segments* to be shorter than
> > the
> > > > >> *rest
> > > > >> > of
> > > > >> > > > the
> > > > >> > > > > > > segments.*
> > > > >> > > > > > >
> > > > >> > > > > > > For example starting off with 1s segments up to N
> > segments
> > > > >> then
> > > > >> > > > switch
> > > > >> > > > > 

Re: [FFmpeg-devel] HLS Segmenter and the "hls_time" option

2016-08-30 Thread Aman Gupta
On Fri, Aug 26, 2016 at 2:06 AM, Steven Liu  wrote:

> 2016-08-26 16:58 GMT+08:00 Ibrahim Tachijian :
>
> > Thanks this actually does what I expected it to do.
> > For me this option will help a lot, and we would really be interested in
> > this eventually reaching git.
> >
> > Thanks to Steven Liu's patch we will be able to use this to start live
> > streams faster. Great job!
> >
> > Below follows what command I ran and the output m3u8 playlist.
> >
> > /root/ffmpeg_patched -analyzeduration 100 -i udp://MCAST_ADDR:3301
> -map
> > 0:0 -map 0:1 -c:v libx264 -preset superfast -g 25 -b:v 900k -maxrate 900k
> > -bufsize 2000k -filter:v yadif -c:a libfdk_aac -b:a 64k -hls_time 5
> > *-hls_init_time
> > 1* -hls_list_size 10 -hls_allow_cache 0 -hls_flags delete_segments -f hls
> > /tmp/playlist.m3u8
> >
> > The output M3U8 of patched ffmpeg:
> >
> > #EXTM3U
> > #EXT-X-VERSION:3
> > #EXT-X-ALLOW-CACHE:NO
> > #EXT-X-TARGETDURATION:5
> > #EXT-X-MEDIA-SEQUENCE:3
> > #EXTINF:1.00,
> > playlist3.ts
> > #EXTINF:1.00,
> > playlist4.ts
> > #EXTINF:1.00,
> > playlist5.ts
> > #EXTINF:1.00,
> > playlist6.ts
> > #EXTINF:1.00,
> > playlist7.ts
> > #EXTINF:1.00,
> > playlist8.ts
> > #EXTINF:1.60,
> > playlist9.ts
> > #EXTINF:1.00,
> > playlist10.ts
> > #EXTINF:4.00,
> > playlist11.ts
> > #EXTINF:5.00,
> > playlist12.ts
> >
> >
> > On Fri, Aug 26, 2016 at 8:37 AM Steven Liu 
> > wrote:
> >
> > > 2016-08-26 14:00 GMT+08:00 Steven Liu :
> > >
> > > >
> > > >
> > > > 2016-08-26 10:34 GMT+08:00 Ibrahim Tachijian :
> > > >
> > > >> In my use case scenario I only need it for the very first couple of
> > > >> segments.
> > > >> After 5 segments it is not a problem anymore to have 5 second
> segments
> > > >> only.
> > > >>
> > > >>
> > > >>
> > > >> On Fri, Aug 26, 2016 at 4:25 AM Steven Liu  >
> > > >> wrote:
> > > >>
> > > >> > 2016-08-26 10:10 GMT+08:00 Ibrahim Tachijian :
> > > >> >
> > > >> > > yes that is correct Steven.
> > > >> > >
> > > >> > > On Fri, Aug 26, 2016 at 3:41 AM Steven Liu <
> > lingjiujia...@gmail.com
> > > >
> > > >> > > wrote:
> > > >> > >
> > > >> > > > 2016-08-26 8:17 GMT+08:00 Ibrahim Tachijian  >:
> > > >> > > >
> > > >> > > > > Steven, I am not sure you understood me correctly or
> perhaps I
> > > did
> > > >> > not
> > > >> > > > > explain myself optimally.
> > > >> > > > >
> > > >> > > > > We still want to split by keyframe in a normal fashion. But,
> > for
> > > >> > > example,
> > > >> > > > > would like the first 5 segments to have an "hls_time" of 1s
> > and
> > > >> the
> > > >> > > rest
> > > >> > > > of
> > > >> > > > > the segments after the first 5 to have an "hls_time" of 5s.
> > > >> > > > >
> > > >> > > > > An made up option would be (hls_time_initial Seconds,Number)
> > > >> > > > >
> > > >> > > > >- "-hls_time_initial 1,5 -hls_time 5"
> > > >> > > > >
> > > >> > > > > The output playlist would contain segments (split at
> > keyframes)
> > > 5
> > > >> > > > segments
> > > >> > > > > of length 1s and then any segment after the initial 5
> segment
> > > >> would
> > > >> > be
> > > >> > > > 5s.
> > > >> > > > >
> > > >> > > > > Is it clear what I am trying to explain?
> > > >> > > > >
> > > >> > > > > What do you think? Do you know how this can be achieved?
> > > >> > > > >
> > > >> > > > > Thanks,
> > > >> > > > >
> > > >> > > > > On Fri, Aug 26, 2016 at 2:06 AM Steven Liu <
> > > >> lingjiujia...@gmail.com>
> > > >> > > > > wrote:
> > > >> > > > >
> > > >> > > > > > 2016-08-26 7:39 GMT+08:00 Ibrahim Tachijian <
> > bar...@netsat.se
> > > >:
> > > >> > > > > >
> > > >> > > > > > > Hello,
> > > >> > > > > > >
> > > >> > > > > > > I've been thinking about an option for "hls_time" that
> is
> > > not
> > > >> > > > currently
> > > >> > > > > > > supported by FFMpeg and I would like feedback to if some
> > of
> > > >> you
> > > >> > may
> > > >> > > > > think
> > > >> > > > > > > this is useful or utterly unnecessary.
> > > >> > > > > > >
> > > >> > > > > > > I find scenarios where we sometimes want to create an
> HLS
> > > >> output
> > > >> > > and
> > > >> > > > > > would
> > > >> > > > > > > like the *first couple of segments* to be shorter than
> the
> > > >> *rest
> > > >> > of
> > > >> > > > the
> > > >> > > > > > > segments.*
> > > >> > > > > > >
> > > >> > > > > > > For example starting off with 1s segments up to N
> segments
> > > >> then
> > > >> > > > switch
> > > >> > > > > to
> > > >> > > > > > > 5s segments.
> > > >> > > > > > >
> > > >> > > > > > > The reasoning is simply to have the playlist.m3u8 and
> > first
> > > >> > segment
> > > >> > > > > > > available *asap.*
> > > >> > > > > > >
> > > >> > > > > > > What do you think? Do you know how this can be achieved?
> > > >> > > > > > >
> > > >> > > > > > > Thanks,
> > > >> > > > > > >
> > > >> > > > > >
> > > 

Re: [FFmpeg-devel] HLS Segmenter and the "hls_time" option

2016-08-26 Thread Ibrahim Tachijian
Thanks this actually does what I expected it to do.
For me this option will help a lot, and we would really be interested in
this eventually reaching git.

Thanks to Steven Liu's patch we will be able to use this to start live
streams faster. Great job!

Below follows what command I ran and the output m3u8 playlist.

/root/ffmpeg_patched -analyzeduration 100 -i udp://MCAST_ADDR:3301 -map
0:0 -map 0:1 -c:v libx264 -preset superfast -g 25 -b:v 900k -maxrate 900k
-bufsize 2000k -filter:v yadif -c:a libfdk_aac -b:a 64k -hls_time 5
*-hls_init_time
1* -hls_list_size 10 -hls_allow_cache 0 -hls_flags delete_segments -f hls
/tmp/playlist.m3u8

The output M3U8 of patched ffmpeg:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-ALLOW-CACHE:NO
#EXT-X-TARGETDURATION:5
#EXT-X-MEDIA-SEQUENCE:3
#EXTINF:1.00,
playlist3.ts
#EXTINF:1.00,
playlist4.ts
#EXTINF:1.00,
playlist5.ts
#EXTINF:1.00,
playlist6.ts
#EXTINF:1.00,
playlist7.ts
#EXTINF:1.00,
playlist8.ts
#EXTINF:1.60,
playlist9.ts
#EXTINF:1.00,
playlist10.ts
#EXTINF:4.00,
playlist11.ts
#EXTINF:5.00,
playlist12.ts


On Fri, Aug 26, 2016 at 8:37 AM Steven Liu  wrote:

> 2016-08-26 14:00 GMT+08:00 Steven Liu :
>
> >
> >
> > 2016-08-26 10:34 GMT+08:00 Ibrahim Tachijian :
> >
> >> In my use case scenario I only need it for the very first couple of
> >> segments.
> >> After 5 segments it is not a problem anymore to have 5 second segments
> >> only.
> >>
> >>
> >>
> >> On Fri, Aug 26, 2016 at 4:25 AM Steven Liu 
> >> wrote:
> >>
> >> > 2016-08-26 10:10 GMT+08:00 Ibrahim Tachijian :
> >> >
> >> > > yes that is correct Steven.
> >> > >
> >> > > On Fri, Aug 26, 2016 at 3:41 AM Steven Liu  >
> >> > > wrote:
> >> > >
> >> > > > 2016-08-26 8:17 GMT+08:00 Ibrahim Tachijian :
> >> > > >
> >> > > > > Steven, I am not sure you understood me correctly or perhaps I
> did
> >> > not
> >> > > > > explain myself optimally.
> >> > > > >
> >> > > > > We still want to split by keyframe in a normal fashion. But, for
> >> > > example,
> >> > > > > would like the first 5 segments to have an "hls_time" of 1s and
> >> the
> >> > > rest
> >> > > > of
> >> > > > > the segments after the first 5 to have an "hls_time" of 5s.
> >> > > > >
> >> > > > > An made up option would be (hls_time_initial Seconds,Number)
> >> > > > >
> >> > > > >- "-hls_time_initial 1,5 -hls_time 5"
> >> > > > >
> >> > > > > The output playlist would contain segments (split at keyframes)
> 5
> >> > > > segments
> >> > > > > of length 1s and then any segment after the initial 5 segment
> >> would
> >> > be
> >> > > > 5s.
> >> > > > >
> >> > > > > Is it clear what I am trying to explain?
> >> > > > >
> >> > > > > What do you think? Do you know how this can be achieved?
> >> > > > >
> >> > > > > Thanks,
> >> > > > >
> >> > > > > On Fri, Aug 26, 2016 at 2:06 AM Steven Liu <
> >> lingjiujia...@gmail.com>
> >> > > > > wrote:
> >> > > > >
> >> > > > > > 2016-08-26 7:39 GMT+08:00 Ibrahim Tachijian  >:
> >> > > > > >
> >> > > > > > > Hello,
> >> > > > > > >
> >> > > > > > > I've been thinking about an option for "hls_time" that is
> not
> >> > > > currently
> >> > > > > > > supported by FFMpeg and I would like feedback to if some of
> >> you
> >> > may
> >> > > > > think
> >> > > > > > > this is useful or utterly unnecessary.
> >> > > > > > >
> >> > > > > > > I find scenarios where we sometimes want to create an HLS
> >> output
> >> > > and
> >> > > > > > would
> >> > > > > > > like the *first couple of segments* to be shorter than the
> >> *rest
> >> > of
> >> > > > the
> >> > > > > > > segments.*
> >> > > > > > >
> >> > > > > > > For example starting off with 1s segments up to N segments
> >> then
> >> > > > switch
> >> > > > > to
> >> > > > > > > 5s segments.
> >> > > > > > >
> >> > > > > > > The reasoning is simply to have the playlist.m3u8 and first
> >> > segment
> >> > > > > > > available *asap.*
> >> > > > > > >
> >> > > > > > > What do you think? Do you know how this can be achieved?
> >> > > > > > >
> >> > > > > > > Thanks,
> >> > > > > > >
> >> > > > > >
> >> > > > > > ffmpeg split segment use hlsenc by keyframe, if you want to
> >> split
> >> > > > segment
> >> > > > > > *ASAP*,
> >> > > > > > you can try set your streaming *GOP(Group Of Picture)*
> shorter,
> >> > > > > > for example: gop_size = 60,  c->time_base =
> (AVRational){1,60};
> >> > > > > > in command line : -r:v 60 -g 60
> >> > > > > >
> >> > > > > > if can accept split segment at non-keyframe, you can use
> >> hls_time
> >> > and
> >> > > > > > hls_flags split_by_time.
> >> > > > > > ___
> >> > > > >
> >> > > > you mean:
> >> > > >
> >> > > > segment-0.ts,segment-1.ts,segment-2.ts,segment-3.ts,segment-4.ts
> >> these
> >> > > 5
> >> > > > segments duration is 1s
> >> > > > and
> >> > > > 

Re: [FFmpeg-devel] HLS Segmenter and the "hls_time" option

2016-08-26 Thread Steven Liu
2016-08-26 14:00 GMT+08:00 Steven Liu :

>
>
> 2016-08-26 10:34 GMT+08:00 Ibrahim Tachijian :
>
>> In my use case scenario I only need it for the very first couple of
>> segments.
>> After 5 segments it is not a problem anymore to have 5 second segments
>> only.
>>
>>
>>
>> On Fri, Aug 26, 2016 at 4:25 AM Steven Liu 
>> wrote:
>>
>> > 2016-08-26 10:10 GMT+08:00 Ibrahim Tachijian :
>> >
>> > > yes that is correct Steven.
>> > >
>> > > On Fri, Aug 26, 2016 at 3:41 AM Steven Liu 
>> > > wrote:
>> > >
>> > > > 2016-08-26 8:17 GMT+08:00 Ibrahim Tachijian :
>> > > >
>> > > > > Steven, I am not sure you understood me correctly or perhaps I did
>> > not
>> > > > > explain myself optimally.
>> > > > >
>> > > > > We still want to split by keyframe in a normal fashion. But, for
>> > > example,
>> > > > > would like the first 5 segments to have an "hls_time" of 1s and
>> the
>> > > rest
>> > > > of
>> > > > > the segments after the first 5 to have an "hls_time" of 5s.
>> > > > >
>> > > > > An made up option would be (hls_time_initial Seconds,Number)
>> > > > >
>> > > > >- "-hls_time_initial 1,5 -hls_time 5"
>> > > > >
>> > > > > The output playlist would contain segments (split at keyframes) 5
>> > > > segments
>> > > > > of length 1s and then any segment after the initial 5 segment
>> would
>> > be
>> > > > 5s.
>> > > > >
>> > > > > Is it clear what I am trying to explain?
>> > > > >
>> > > > > What do you think? Do you know how this can be achieved?
>> > > > >
>> > > > > Thanks,
>> > > > >
>> > > > > On Fri, Aug 26, 2016 at 2:06 AM Steven Liu <
>> lingjiujia...@gmail.com>
>> > > > > wrote:
>> > > > >
>> > > > > > 2016-08-26 7:39 GMT+08:00 Ibrahim Tachijian :
>> > > > > >
>> > > > > > > Hello,
>> > > > > > >
>> > > > > > > I've been thinking about an option for "hls_time" that is not
>> > > > currently
>> > > > > > > supported by FFMpeg and I would like feedback to if some of
>> you
>> > may
>> > > > > think
>> > > > > > > this is useful or utterly unnecessary.
>> > > > > > >
>> > > > > > > I find scenarios where we sometimes want to create an HLS
>> output
>> > > and
>> > > > > > would
>> > > > > > > like the *first couple of segments* to be shorter than the
>> *rest
>> > of
>> > > > the
>> > > > > > > segments.*
>> > > > > > >
>> > > > > > > For example starting off with 1s segments up to N segments
>> then
>> > > > switch
>> > > > > to
>> > > > > > > 5s segments.
>> > > > > > >
>> > > > > > > The reasoning is simply to have the playlist.m3u8 and first
>> > segment
>> > > > > > > available *asap.*
>> > > > > > >
>> > > > > > > What do you think? Do you know how this can be achieved?
>> > > > > > >
>> > > > > > > Thanks,
>> > > > > > >
>> > > > > >
>> > > > > > ffmpeg split segment use hlsenc by keyframe, if you want to
>> split
>> > > > segment
>> > > > > > *ASAP*,
>> > > > > > you can try set your streaming *GOP(Group Of Picture)* shorter,
>> > > > > > for example: gop_size = 60,  c->time_base = (AVRational){1,60};
>> > > > > > in command line : -r:v 60 -g 60
>> > > > > >
>> > > > > > if can accept split segment at non-keyframe, you can use
>> hls_time
>> > and
>> > > > > > hls_flags split_by_time.
>> > > > > > ___
>> > > > >
>> > > > you mean:
>> > > >
>> > > > segment-0.ts,segment-1.ts,segment-2.ts,segment-3.ts,segment-4.ts
>> these
>> > > 5
>> > > > segments duration is 1s
>> > > > and
>> > > > segment-5.ts,segment-6.ts,segment-7.ts .. these segment
>> duration is
>> > > 5
>> > > > or set by hls_time
>> > > > Is that right i understand?
>> > >
>> > >
>> > OK , Thanks.
>> > That a good idea, but i have a question:
>> > when ffmpeg update the segment list after 10 segments, there have a new
>> > user to play the hls playlist, the m3u8 segments every ts segments'
>> > duration is the 5s.
>> > So do you want exec a new ffmpeg when every one play the hls playlist ?
>>
>>
> Dose this patch can fix your request?
>
>
> update patch


Test process:
localhost:ffmpeg liuqi$ ./ffmpeg -v verbose -re -i
~/Movies/objectC/facebook.mp4 -c copy -f hls -hls_time 3 -hls_list_size 3
-hls_flags split_by_time _output.m3u8
ffmpeg version N-81462-gbcd1153 Copyright (c) 2000-2016 the FFmpeg
developers
  built with Apple LLVM version 7.3.0 (clang-703.0.31)
  configuration: --enable-fontconfig --enable-gpl --enable-libass
--enable-libbluray --enable-libfreetype --enable-libmp3lame
--enable-libspeex --enable-libx264 --enable-libx265 --enable-version3
  libavutil  55. 29.100 / 55. 29.100
  libavcodec 57. 54.100 / 57. 54.100
  libavformat57. 48.100 / 57. 48.100
  libavdevice57.  0.102 / 57.  0.102
  libavfilter 6. 55.100 /  6. 55.100
  libswscale  4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc54.  0.100 / 54.  0.100
[h264 @ 0x7f94f1813c00] Reinit context to 1280x720, pix_fmt: yuv420p

Re: [FFmpeg-devel] HLS Segmenter and the "hls_time" option

2016-08-26 Thread Steven Liu
2016-08-26 10:34 GMT+08:00 Ibrahim Tachijian :

> In my use case scenario I only need it for the very first couple of
> segments.
> After 5 segments it is not a problem anymore to have 5 second segments
> only.
>
>
>
> On Fri, Aug 26, 2016 at 4:25 AM Steven Liu 
> wrote:
>
> > 2016-08-26 10:10 GMT+08:00 Ibrahim Tachijian :
> >
> > > yes that is correct Steven.
> > >
> > > On Fri, Aug 26, 2016 at 3:41 AM Steven Liu 
> > > wrote:
> > >
> > > > 2016-08-26 8:17 GMT+08:00 Ibrahim Tachijian :
> > > >
> > > > > Steven, I am not sure you understood me correctly or perhaps I did
> > not
> > > > > explain myself optimally.
> > > > >
> > > > > We still want to split by keyframe in a normal fashion. But, for
> > > example,
> > > > > would like the first 5 segments to have an "hls_time" of 1s and the
> > > rest
> > > > of
> > > > > the segments after the first 5 to have an "hls_time" of 5s.
> > > > >
> > > > > An made up option would be (hls_time_initial Seconds,Number)
> > > > >
> > > > >- "-hls_time_initial 1,5 -hls_time 5"
> > > > >
> > > > > The output playlist would contain segments (split at keyframes) 5
> > > > segments
> > > > > of length 1s and then any segment after the initial 5 segment would
> > be
> > > > 5s.
> > > > >
> > > > > Is it clear what I am trying to explain?
> > > > >
> > > > > What do you think? Do you know how this can be achieved?
> > > > >
> > > > > Thanks,
> > > > >
> > > > > On Fri, Aug 26, 2016 at 2:06 AM Steven Liu <
> lingjiujia...@gmail.com>
> > > > > wrote:
> > > > >
> > > > > > 2016-08-26 7:39 GMT+08:00 Ibrahim Tachijian :
> > > > > >
> > > > > > > Hello,
> > > > > > >
> > > > > > > I've been thinking about an option for "hls_time" that is not
> > > > currently
> > > > > > > supported by FFMpeg and I would like feedback to if some of you
> > may
> > > > > think
> > > > > > > this is useful or utterly unnecessary.
> > > > > > >
> > > > > > > I find scenarios where we sometimes want to create an HLS
> output
> > > and
> > > > > > would
> > > > > > > like the *first couple of segments* to be shorter than the
> *rest
> > of
> > > > the
> > > > > > > segments.*
> > > > > > >
> > > > > > > For example starting off with 1s segments up to N segments then
> > > > switch
> > > > > to
> > > > > > > 5s segments.
> > > > > > >
> > > > > > > The reasoning is simply to have the playlist.m3u8 and first
> > segment
> > > > > > > available *asap.*
> > > > > > >
> > > > > > > What do you think? Do you know how this can be achieved?
> > > > > > >
> > > > > > > Thanks,
> > > > > > >
> > > > > >
> > > > > > ffmpeg split segment use hlsenc by keyframe, if you want to split
> > > > segment
> > > > > > *ASAP*,
> > > > > > you can try set your streaming *GOP(Group Of Picture)* shorter,
> > > > > > for example: gop_size = 60,  c->time_base = (AVRational){1,60};
> > > > > > in command line : -r:v 60 -g 60
> > > > > >
> > > > > > if can accept split segment at non-keyframe, you can use hls_time
> > and
> > > > > > hls_flags split_by_time.
> > > > > > ___
> > > > >
> > > > you mean:
> > > >
> > > > segment-0.ts,segment-1.ts,segment-2.ts,segment-3.ts,segment-4.ts
> these
> > > 5
> > > > segments duration is 1s
> > > > and
> > > > segment-5.ts,segment-6.ts,segment-7.ts .. these segment
> duration is
> > > 5
> > > > or set by hls_time
> > > > Is that right i understand?
> > >
> > >
> > OK , Thanks.
> > That a good idea, but i have a question:
> > when ffmpeg update the segment list after 10 segments, there have a new
> > user to play the hls playlist, the m3u8 segments every ts segments'
> > duration is the 5s.
> > So do you want exec a new ffmpeg when every one play the hls playlist ?
>
>
Dose this patch can fix your request?


0001-add-option-hls_init_time-to-set-init-hls-window-segm.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] HLS Segmenter and the "hls_time" option

2016-08-25 Thread Ibrahim Tachijian
In my use case scenario I only need it for the very first couple of
segments.
After 5 segments it is not a problem anymore to have 5 second segments
only.



On Fri, Aug 26, 2016 at 4:25 AM Steven Liu  wrote:

> 2016-08-26 10:10 GMT+08:00 Ibrahim Tachijian :
>
> > yes that is correct Steven.
> >
> > On Fri, Aug 26, 2016 at 3:41 AM Steven Liu 
> > wrote:
> >
> > > 2016-08-26 8:17 GMT+08:00 Ibrahim Tachijian :
> > >
> > > > Steven, I am not sure you understood me correctly or perhaps I did
> not
> > > > explain myself optimally.
> > > >
> > > > We still want to split by keyframe in a normal fashion. But, for
> > example,
> > > > would like the first 5 segments to have an "hls_time" of 1s and the
> > rest
> > > of
> > > > the segments after the first 5 to have an "hls_time" of 5s.
> > > >
> > > > An made up option would be (hls_time_initial Seconds,Number)
> > > >
> > > >- "-hls_time_initial 1,5 -hls_time 5"
> > > >
> > > > The output playlist would contain segments (split at keyframes) 5
> > > segments
> > > > of length 1s and then any segment after the initial 5 segment would
> be
> > > 5s.
> > > >
> > > > Is it clear what I am trying to explain?
> > > >
> > > > What do you think? Do you know how this can be achieved?
> > > >
> > > > Thanks,
> > > >
> > > > On Fri, Aug 26, 2016 at 2:06 AM Steven Liu 
> > > > wrote:
> > > >
> > > > > 2016-08-26 7:39 GMT+08:00 Ibrahim Tachijian :
> > > > >
> > > > > > Hello,
> > > > > >
> > > > > > I've been thinking about an option for "hls_time" that is not
> > > currently
> > > > > > supported by FFMpeg and I would like feedback to if some of you
> may
> > > > think
> > > > > > this is useful or utterly unnecessary.
> > > > > >
> > > > > > I find scenarios where we sometimes want to create an HLS output
> > and
> > > > > would
> > > > > > like the *first couple of segments* to be shorter than the *rest
> of
> > > the
> > > > > > segments.*
> > > > > >
> > > > > > For example starting off with 1s segments up to N segments then
> > > switch
> > > > to
> > > > > > 5s segments.
> > > > > >
> > > > > > The reasoning is simply to have the playlist.m3u8 and first
> segment
> > > > > > available *asap.*
> > > > > >
> > > > > > What do you think? Do you know how this can be achieved?
> > > > > >
> > > > > > Thanks,
> > > > > >
> > > > >
> > > > > ffmpeg split segment use hlsenc by keyframe, if you want to split
> > > segment
> > > > > *ASAP*,
> > > > > you can try set your streaming *GOP(Group Of Picture)* shorter,
> > > > > for example: gop_size = 60,  c->time_base = (AVRational){1,60};
> > > > > in command line : -r:v 60 -g 60
> > > > >
> > > > > if can accept split segment at non-keyframe, you can use hls_time
> and
> > > > > hls_flags split_by_time.
> > > > > ___
> > > >
> > > you mean:
> > >
> > > segment-0.ts,segment-1.ts,segment-2.ts,segment-3.ts,segment-4.ts  these
> > 5
> > > segments duration is 1s
> > > and
> > > segment-5.ts,segment-6.ts,segment-7.ts .. these segment duration is
> > 5
> > > or set by hls_time
> > > Is that right i understand?
> >
> >
> OK , Thanks.
> That a good idea, but i have a question:
> when ffmpeg update the segment list after 10 segments, there have a new
> user to play the hls playlist, the m3u8 segments every ts segments'
> duration is the 5s.
> So do you want exec a new ffmpeg when every one play the hls playlist ?
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] HLS Segmenter and the "hls_time" option

2016-08-25 Thread Steven Liu
2016-08-26 10:10 GMT+08:00 Ibrahim Tachijian :

> yes that is correct Steven.
>
> On Fri, Aug 26, 2016 at 3:41 AM Steven Liu 
> wrote:
>
> > 2016-08-26 8:17 GMT+08:00 Ibrahim Tachijian :
> >
> > > Steven, I am not sure you understood me correctly or perhaps I did not
> > > explain myself optimally.
> > >
> > > We still want to split by keyframe in a normal fashion. But, for
> example,
> > > would like the first 5 segments to have an "hls_time" of 1s and the
> rest
> > of
> > > the segments after the first 5 to have an "hls_time" of 5s.
> > >
> > > An made up option would be (hls_time_initial Seconds,Number)
> > >
> > >- "-hls_time_initial 1,5 -hls_time 5"
> > >
> > > The output playlist would contain segments (split at keyframes) 5
> > segments
> > > of length 1s and then any segment after the initial 5 segment would be
> > 5s.
> > >
> > > Is it clear what I am trying to explain?
> > >
> > > What do you think? Do you know how this can be achieved?
> > >
> > > Thanks,
> > >
> > > On Fri, Aug 26, 2016 at 2:06 AM Steven Liu 
> > > wrote:
> > >
> > > > 2016-08-26 7:39 GMT+08:00 Ibrahim Tachijian :
> > > >
> > > > > Hello,
> > > > >
> > > > > I've been thinking about an option for "hls_time" that is not
> > currently
> > > > > supported by FFMpeg and I would like feedback to if some of you may
> > > think
> > > > > this is useful or utterly unnecessary.
> > > > >
> > > > > I find scenarios where we sometimes want to create an HLS output
> and
> > > > would
> > > > > like the *first couple of segments* to be shorter than the *rest of
> > the
> > > > > segments.*
> > > > >
> > > > > For example starting off with 1s segments up to N segments then
> > switch
> > > to
> > > > > 5s segments.
> > > > >
> > > > > The reasoning is simply to have the playlist.m3u8 and first segment
> > > > > available *asap.*
> > > > >
> > > > > What do you think? Do you know how this can be achieved?
> > > > >
> > > > > Thanks,
> > > > >
> > > >
> > > > ffmpeg split segment use hlsenc by keyframe, if you want to split
> > segment
> > > > *ASAP*,
> > > > you can try set your streaming *GOP(Group Of Picture)* shorter,
> > > > for example: gop_size = 60,  c->time_base = (AVRational){1,60};
> > > > in command line : -r:v 60 -g 60
> > > >
> > > > if can accept split segment at non-keyframe, you can use hls_time and
> > > > hls_flags split_by_time.
> > > > ___
> > >
> > you mean:
> >
> > segment-0.ts,segment-1.ts,segment-2.ts,segment-3.ts,segment-4.ts  these
> 5
> > segments duration is 1s
> > and
> > segment-5.ts,segment-6.ts,segment-7.ts .. these segment duration is
> 5
> > or set by hls_time
> > Is that right i understand?
>
>
OK , Thanks.
That a good idea, but i have a question:
when ffmpeg update the segment list after 10 segments, there have a new
user to play the hls playlist, the m3u8 segments every ts segments'
duration is the 5s.
So do you want exec a new ffmpeg when every one play the hls playlist ?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] HLS Segmenter and the "hls_time" option

2016-08-25 Thread Ibrahim Tachijian
yes that is correct Steven.

On Fri, Aug 26, 2016 at 3:41 AM Steven Liu  wrote:

> 2016-08-26 8:17 GMT+08:00 Ibrahim Tachijian :
>
> > Steven, I am not sure you understood me correctly or perhaps I did not
> > explain myself optimally.
> >
> > We still want to split by keyframe in a normal fashion. But, for example,
> > would like the first 5 segments to have an "hls_time" of 1s and the rest
> of
> > the segments after the first 5 to have an "hls_time" of 5s.
> >
> > An made up option would be (hls_time_initial Seconds,Number)
> >
> >- "-hls_time_initial 1,5 -hls_time 5"
> >
> > The output playlist would contain segments (split at keyframes) 5
> segments
> > of length 1s and then any segment after the initial 5 segment would be
> 5s.
> >
> > Is it clear what I am trying to explain?
> >
> > What do you think? Do you know how this can be achieved?
> >
> > Thanks,
> >
> > On Fri, Aug 26, 2016 at 2:06 AM Steven Liu 
> > wrote:
> >
> > > 2016-08-26 7:39 GMT+08:00 Ibrahim Tachijian :
> > >
> > > > Hello,
> > > >
> > > > I've been thinking about an option for "hls_time" that is not
> currently
> > > > supported by FFMpeg and I would like feedback to if some of you may
> > think
> > > > this is useful or utterly unnecessary.
> > > >
> > > > I find scenarios where we sometimes want to create an HLS output and
> > > would
> > > > like the *first couple of segments* to be shorter than the *rest of
> the
> > > > segments.*
> > > >
> > > > For example starting off with 1s segments up to N segments then
> switch
> > to
> > > > 5s segments.
> > > >
> > > > The reasoning is simply to have the playlist.m3u8 and first segment
> > > > available *asap.*
> > > >
> > > > What do you think? Do you know how this can be achieved?
> > > >
> > > > Thanks,
> > > >
> > >
> > > ffmpeg split segment use hlsenc by keyframe, if you want to split
> segment
> > > *ASAP*,
> > > you can try set your streaming *GOP(Group Of Picture)* shorter,
> > > for example: gop_size = 60,  c->time_base = (AVRational){1,60};
> > > in command line : -r:v 60 -g 60
> > >
> > > if can accept split segment at non-keyframe, you can use hls_time and
> > > hls_flags split_by_time.
> > > ___
> >
> you mean:
>
> segment-0.ts,segment-1.ts,segment-2.ts,segment-3.ts,segment-4.ts  these 5
> segments duration is 1s
> and
> segment-5.ts,segment-6.ts,segment-7.ts .. these segment duration is 5
> or set by hls_time
> Is that right i understand?
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] HLS Segmenter and the "hls_time" option

2016-08-25 Thread Steven Liu
2016-08-26 8:17 GMT+08:00 Ibrahim Tachijian :

> Steven, I am not sure you understood me correctly or perhaps I did not
> explain myself optimally.
>
> We still want to split by keyframe in a normal fashion. But, for example,
> would like the first 5 segments to have an "hls_time" of 1s and the rest of
> the segments after the first 5 to have an "hls_time" of 5s.
>
> An made up option would be (hls_time_initial Seconds,Number)
>
>- "-hls_time_initial 1,5 -hls_time 5"
>
> The output playlist would contain segments (split at keyframes) 5 segments
> of length 1s and then any segment after the initial 5 segment would be 5s.
>
> Is it clear what I am trying to explain?
>
> What do you think? Do you know how this can be achieved?
>
> Thanks,
>
> On Fri, Aug 26, 2016 at 2:06 AM Steven Liu 
> wrote:
>
> > 2016-08-26 7:39 GMT+08:00 Ibrahim Tachijian :
> >
> > > Hello,
> > >
> > > I've been thinking about an option for "hls_time" that is not currently
> > > supported by FFMpeg and I would like feedback to if some of you may
> think
> > > this is useful or utterly unnecessary.
> > >
> > > I find scenarios where we sometimes want to create an HLS output and
> > would
> > > like the *first couple of segments* to be shorter than the *rest of the
> > > segments.*
> > >
> > > For example starting off with 1s segments up to N segments then switch
> to
> > > 5s segments.
> > >
> > > The reasoning is simply to have the playlist.m3u8 and first segment
> > > available *asap.*
> > >
> > > What do you think? Do you know how this can be achieved?
> > >
> > > Thanks,
> > >
> >
> > ffmpeg split segment use hlsenc by keyframe, if you want to split segment
> > *ASAP*,
> > you can try set your streaming *GOP(Group Of Picture)* shorter,
> > for example: gop_size = 60,  c->time_base = (AVRational){1,60};
> > in command line : -r:v 60 -g 60
> >
> > if can accept split segment at non-keyframe, you can use hls_time and
> > hls_flags split_by_time.
> > ___
>
you mean:

segment-0.ts,segment-1.ts,segment-2.ts,segment-3.ts,segment-4.ts  these 5
segments duration is 1s
and
segment-5.ts,segment-6.ts,segment-7.ts .. these segment duration is 5
or set by hls_time
Is that right i understand?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] HLS Segmenter and the "hls_time" option

2016-08-25 Thread Ibrahim Tachijian
Steven, I am not sure you understood me correctly or perhaps I did not
explain myself optimally.

We still want to split by keyframe in a normal fashion. But, for example,
would like the first 5 segments to have an "hls_time" of 1s and the rest of
the segments after the first 5 to have an "hls_time" of 5s.

An made up option would be (hls_time_initial Seconds,Number)

   - "-hls_time_initial 1,5 -hls_time 5"

The output playlist would contain segments (split at keyframes) 5 segments
of length 1s and then any segment after the initial 5 segment would be 5s.

Is it clear what I am trying to explain?

What do you think? Do you know how this can be achieved?

Thanks,

On Fri, Aug 26, 2016 at 2:06 AM Steven Liu  wrote:

> 2016-08-26 7:39 GMT+08:00 Ibrahim Tachijian :
>
> > Hello,
> >
> > I've been thinking about an option for "hls_time" that is not currently
> > supported by FFMpeg and I would like feedback to if some of you may think
> > this is useful or utterly unnecessary.
> >
> > I find scenarios where we sometimes want to create an HLS output and
> would
> > like the *first couple of segments* to be shorter than the *rest of the
> > segments.*
> >
> > For example starting off with 1s segments up to N segments then switch to
> > 5s segments.
> >
> > The reasoning is simply to have the playlist.m3u8 and first segment
> > available *asap.*
> >
> > What do you think? Do you know how this can be achieved?
> >
> > Thanks,
> >
>
> ffmpeg split segment use hlsenc by keyframe, if you want to split segment
> *ASAP*,
> you can try set your streaming *GOP(Group Of Picture)* shorter,
> for example: gop_size = 60,  c->time_base = (AVRational){1,60};
> in command line : -r:v 60 -g 60
>
> if can accept split segment at non-keyframe, you can use hls_time and
> hls_flags split_by_time.
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] HLS Segmenter and the "hls_time" option

2016-08-25 Thread Steven Liu
2016-08-26 7:39 GMT+08:00 Ibrahim Tachijian :

> Hello,
>
> I've been thinking about an option for "hls_time" that is not currently
> supported by FFMpeg and I would like feedback to if some of you may think
> this is useful or utterly unnecessary.
>
> I find scenarios where we sometimes want to create an HLS output and would
> like the *first couple of segments* to be shorter than the *rest of the
> segments.*
>
> For example starting off with 1s segments up to N segments then switch to
> 5s segments.
>
> The reasoning is simply to have the playlist.m3u8 and first segment
> available *asap.*
>
> What do you think? Do you know how this can be achieved?
>
> Thanks,
>

ffmpeg split segment use hlsenc by keyframe, if you want to split segment
*ASAP*,
you can try set your streaming *GOP(Group Of Picture)* shorter,
for example: gop_size = 60,  c->time_base = (AVRational){1,60};
in command line : -r:v 60 -g 60

if can accept split segment at non-keyframe, you can use hls_time and
hls_flags split_by_time.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] HLS Segmenter and the "hls_time" option

2016-08-25 Thread Ibrahim Tachijian
Hello,

I've been thinking about an option for "hls_time" that is not currently
supported by FFMpeg and I would like feedback to if some of you may think
this is useful or utterly unnecessary.

I find scenarios where we sometimes want to create an HLS output and would
like the *first couple of segments* to be shorter than the *rest of the
segments.*

For example starting off with 1s segments up to N segments then switch to
5s segments.

The reasoning is simply to have the playlist.m3u8 and first segment
available *asap.*

What do you think? Do you know how this can be achieved?

Thanks,
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel