[FFmpeg-devel] [PATCH] Add segment name id set by user defined

Michael Niedermayer michaelni at gmx.at
Sun May 11 06:22:56 CEST 2014


On Sat, May 10, 2014 at 11:40:07AM +0800, Steven Liu wrote:
> 
> On May 10, 2014, at 6:57 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> 
> > On Fri, May 09, 2014 at 01:29:14AM +0800, Steven Liu wrote:
> >> Hi!
> >> 
> >> Some times, m3u8 can be used for timeshift used segment id,
> >> for example:
> >>    xxx.m3u8?starttime=139xxxxxxx&endtime=139xxxxxxx,
> >>    or
> >>    xxx.m3u8?starttime=20140408121221&endtime=20140408131221
> >>    or
> >>    seek m3u8 file
> >>    xxx.m3u8?starttime=14&endtime=3600
> >> 
> >> so add the parameters for the segment id for index,
> >> for example:
> >> 
> >> segment name id by mpegts starttime, use the parameters:
> >> -segment_name_flag starttime
> >>    output-0.ts
> >>    output-14.ts
> >>    output-24.ts
> >>    output-34.ts
> >> 
> >> segment name id by time(), use the parameters:
> >> -segment_name_flag time
> >>    output-1399568846.ts
> >>    output-1399568856.ts
> >>    output-1399568866.ts
> >> 
> >> segment name id by format time, use the parameters:
> >> -segment_name_flag fmt_time
> >>    output-20140509010807.ts
> >>    output-20140509010817.ts
> >>    output-20140509010827.ts
> >> 
> >> this parameters can use default, if use the default, it will as before
> >> this functions can be used for m3u8 time shift
> >> 
> >> Signed-off-by: Steven Liu <qi.liu at chinacache.com>
> >> ---
> >> libavformat/avformat.h |  2 +-
> >> libavformat/segment.c  | 81 ++++++++++++++++++++++++++++++++++++++++++++++----
> >> libavformat/utils.c    |  4 +--
> >> 3 files changed, 79 insertions(+), 8 deletions(-)
> >> 
> > 
> >> diff --git a/libavformat/avformat.h b/libavformat/avformat.h
> >> index 7d2db6a..a11a9eb 100644
> >> --- a/libavformat/avformat.h
> >> +++ b/libavformat/avformat.h
> >> @@ -2465,7 +2465,7 @@ void av_dump_format(AVFormatContext *ic,
> >>  * @return 0 if OK, -1 on format error
> >>  */
> >> int av_get_frame_filename(char *buf, int buf_size,
> >> -                          const char *path, int number);
> >> +                          const char *path, int64_t number);
> > 
> > breaks ABI
> It there have some ABI for support the number like int64?

not that i remember


> I saw the av_get_frame_filename’s number is int, but int is not enough for use
> Or let’s create a new ABI for this function?

[....]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140511/c4100346/attachment.asc>


More information about the ffmpeg-devel mailing list