Karthick J
deceb7d9ae
avformat/hlsenc: Call avio_flush during persistent http connections
...
Since close is not called, during http persistent connection,
flush needs to be called so that output is written on time.
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-12-15 22:14:43 +08:00
Steven Liu
0e5260226a
avformat/hlsenc: reindent after previous commits
2017-12-12 11:50:23 +08:00
Steven Liu
08d28ee182
avformat/hlsenc: move init operations from write_header to init
...
Reviewed-by: Vishwanath Dixit <vdixit@akamai.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-12-11 11:03:25 +08:00
Steven Liu
d67c1dda40
avformat/hlsenc: fix compiling error when disable-network
2017-12-04 23:52:17 +08:00
Steven Liu
071f47649c
avformat/hlsplaylist: add int type of API ff_hls_write_file_entry
...
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-12-04 12:03:37 +08:00
Robert Nagy
31b351ea81
avformat/hlsenc: fix baseurl missing last char
...
Reviewed-by: Steven Liu <lq@onvideo.cn>
2017-12-04 12:00:13 +08:00
Karthick J
3684b5e56a
avformat/hlsenc: Refactored 'get_int_from_double' function to allow reuse
2017-11-30 10:54:54 +08:00
Karthick J
da49cdf640
avformat/hlsenc: Modularized playlist creation to allow reuse
2017-11-29 19:44:15 +08:00
Jeyapal, Karthick
815e34b5b4
libavformat/hlsenc: Persistent HTTP connections supported as an option
2017-11-29 14:33:07 +08:00
Karthick J
d5d2632e3a
avformat/hlsenc: Fixed initial setting for end_pts
...
This patch fixes Bug #6868
Sometimes end_pts is getting initialized to audio stream's
first pts, while the duration is calculated based on video stream's pts.
In this patch the end_pts is initialized with the correct stream's first pts.
Reviewed-by: Steven Liu <lq@onvideo.cn>
Tested-by: beloko
2017-11-28 20:03:15 +08:00
Karthick J
efb51c8ebb
avformat/hlsenc: Added option to add EXT-X-INDEPENDENT-SEGMENTS tag
2017-11-24 06:57:36 +08:00
Karthick J
241c1192d6
avformat/hlsenc: Refactor an inconsistent variable name
2017-11-24 06:42:35 +08:00
Karthick J
f335efc0ad
avformat/hlsenc: Minor fix in setting http options for master playlist
2017-11-24 06:41:25 +08:00
Steven Liu
25aff9d820
avformat/hlsenc: use FFABS to instead of abs
...
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-11-20 10:51:57 +08:00
Vishwanath Dixit
77ab1d7bae
avformat/hlsenc: creation of hls master playlist file
...
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
2017-11-20 10:04:34 +08:00
Vishwanath Dixit
92a32d0747
avformat/hlsenc: creation of hls variant streams in a single hlsenc instance
...
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
2017-11-20 10:02:11 +08:00
Steven Liu
880b299381
avformat/hlsenc: write fmp4 init header after first AV frame
...
fix ticket id: 6825
Signed-off-by: Steven Liu <lq@onvideo.cn>
Tested-by: Aman Gupta <aman@tmm1.net>
2017-11-14 10:31:26 +08:00
Timo Rothenpieler
3ee63f3fb7
avformat/hlsenc: allocate space for terminating null
...
Fixes CID #1420394
2017-11-13 10:44:16 +08:00
Steven Liu
c7360512c2
avformat/hlsenc: reindent hlsenc code
...
Signed-off-by: Steven Liu <lq@onvideo.cn>
2017-11-02 22:30:06 +08:00
Steven Liu
c52beb4839
avformat/hlsenc: check hls segment mode for ignore the init filename
...
ignore the fmp4_init_filename when in normal hls segment mode
Signed-off-by: Steven Liu <lq@onvideo.cn>
2017-11-02 22:29:28 +08:00
Steven Liu
073986c5ae
avformat/hlsenc: reindent hlsenc code
...
Signed-off-by: Steven Liu <lq@onvideo.cn>
2017-10-29 12:32:24 +08:00
Steven Liu
c3e279e752
avformat/hlsenc: fix missing first segment bug in fmp4 mode
...
fix ticket id: #6776
fix code logic error, need not check first segment.
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-10-29 12:31:49 +08:00
Steven Liu
f520830761
avformat/hlsenc: fix base_output_dirname is null when basename_size is 0 bug
...
fix ticket id: #6777
when use argument hls_segment_filename, the basename_size will be 0
Signed-off-by: Steven Liu <lq@onvideo.cn>
2017-10-29 12:30:44 +08:00
Steven Liu
c34c0e3a64
avformat/hlsenc: support http method for hls fmp4 init file
...
Signed-off-by: Steven Liu <lq@onvideo.cn>
2017-09-21 23:10:57 +08:00
Steven Liu
7e9cdd3f49
avformat/hlsenc: fix CID 1418106
...
fix the "Uninitialized scalar variable (UNINIT)" problem.
Signed-off-by: Steven Liu <lq@onvideo.cn>
2017-09-21 23:08:00 +08:00
Aman Gupta
73bf0f42e3
avformat/hlsenc: fix segfault when using -hls_segment_type fmp4 with -hls_segment_filename
...
previously, specifying -hls_segment_filename meant
s->base_output_dirname was never set, causing a segfault:
(lldb) bt
* thread #1 , queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
* frame #0 : 0x00007fffbf7d82d0 libsystem_platform.dylib`_platform_strcmp + 80
frame #1 : 0x00000001005f4dcf libavformat.57.dylib`io_open_default(s=0x000000010481cc00, pb=0x0000000104806020, url=0x0000000000000000, flags=2, options=0x0000000000000000) at options.c:107
frame #2 : 0x0000000100528968 libavformat.57.dylib`hls_mux_init(s=0x000000010481cc00) at hlsenc.c:595
frame #3 : 0x00000001005273cb libavformat.57.dylib`hls_write_header(s=0x000000010481cc00) at hlsenc.c:1518
frame #4 : 0x00000001005c08d0 libavformat.57.dylib`write_header_internal(s=0x000000010481cc00) at mux.c:486
frame #5 : 0x00000001005c0774 libavformat.57.dylib`avformat_write_header(s=0x000000010481cc00, options=0x00000001029026e8) at mux.c:539
2017-09-16 10:32:28 +08:00
Karthick J
837c55e072
avformat/hlsenc: Added configuration to override HTTP User-Agent
...
Signed-off-by: Karthick J <kjeyapal@akamai.com>
Signed-off-by: Steven Liu <lq@onvideo.cn>
2017-09-05 23:30:52 +08:00
Steven Liu
20a6b198b4
avformat/hlsenc: move free fmp4_init_filename after hls_window operation
...
fix ticket id: 6599
Signed-off-by: Steven Liu <lq@onvideo.cn>
2017-08-22 10:21:42 +08:00
DeHackEd
eabeb9093a
avformat/hlsenc: allow dynamic encryption key rotation
...
Makes behaviour of 805ce25b1d
optional, re-enables
HLS key rotation feature
Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: DHE <git@dehacked.net>
2017-08-06 15:10:35 +08:00
Steven Liu
738b29cfb6
avformat/hlsenc: support fmp4 single file mode
...
add byterange mode of the hls fmp4
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Steven Liu <lq@onvideo.cn>
2017-08-04 21:38:55 +08:00
Steven Liu
805ce25b1d
avformat/hlsenc: improve hls encrypt get key file operation
...
get key file only once time is ok, no need more times.
Ticket-id: #6545
Found-by: JohnPi
Signed-off-by: Steven Liu <lq@onvideo.cn>
2017-07-25 10:31:29 +08:00
Steven Liu
f21457f8e0
avformat/hlsenc: fix hls fmp4 extention name bug
...
ticket-id: #6541
when use hls fmp4 muxer, the extention name is not .m4s, this
code can fix it.
Found-by: JohnPi
Signed-off-by: Steven Liu <lq@onvideo.cn>
2017-07-24 19:55:19 +08:00
Derek Buitenhuis
2d417076a2
avformat/hlsenc: Add missing error check
...
Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2017-07-07 10:08:18 +08:00
Steven Liu
23e21130bb
avformat/hlsenc: add warn message when use both fmp4 and single_file
...
have not implementation the fmp4 single file yet before this commit.
Suggested-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Steven Liu <lq@onvideo.cn>
2017-07-07 10:05:54 +08:00
Steven Liu
1fe40e73a6
avformat/hlsenc: copy codec_tag when stream copy
...
when use fmp4 segment type in hls and use codec copy,
there have an error message.
error message:
[mp4 @ 0x25df020] Tag avc1 incompatible with output codec id '28' ([33][0][0][0])
[hls @ 0x2615c80] Some of the provided format options in '(null)' are not recognized
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
this patch can fix it.
Signed-off-by: Liu Qi <w_liuqi@kingsoft.com>
Signed-off-by: Steven Liu <lq@onvideo.cn>
2017-07-05 11:20:21 +08:00
Steven Liu
d01b8f8683
avformat/hlsenc: optimize help message default value.
...
show the hls_segment_type default always 0, show the flag name better
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-07-05 11:15:20 +08:00
Steven Liu
274bd1670b
avfomat/hlsenc: support fmp4 format in hls
...
add the fmp4 format into hlsenc
because the fmp4 format add into hls from version 7.
the spec link is:
https://tools.ietf.org/html/draft-pantos-http-live-streaming-20
and the describe on WWDC
https://developer.apple.com/videos/play/wwdc2017/515/
Signed-off-by: Steven Liu <lq@onvideo.cn>
2017-07-03 20:20:44 +08:00
Steven Liu
3996ae9302
avformat/hlsenc: donnot show duplicate segment warning at byterange mode
...
When the hlsenc at BYTERANGE mode, it should not show the warning message:
"Duplicated segment filename detected:"
Reported-by: Marco <marco@worldcast.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-06-19 10:35:41 +08:00
Steven Liu
7355c1dda2
avformat/hlsenc: move old_filename free operation earlier
...
Suggested-by: Aaron Levinson <alevinsn@aracnet.com>
Reviewed-by: Aaron Levinson <alevinsn@aracnet.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-05-11 10:15:08 +08:00
Steven Liu
cbfd44a922
avformat/hlsenc: fix CID 1405135
...
Fixes Coverity CID: 1405135
Reviewed-by: Rodger Combs <rodger.combs@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-04-28 10:18:44 +08:00
Steven Liu
363e4f0810
avformat/hlsenc: hold old key info when append list
...
fix ticket id: #6353
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-04-28 10:17:40 +08:00
Steven Liu
5caaa3a49e
avformat/hlsenc: add hls encrypt options
...
refer to:
https://git.libav.org/?p=libav.git;a=commitdiff;h=0a4b9d0ccd10b3c39105f99bd320f696f69a75a2
add hls encrypt options looks like libav's libavformat/hlsenc.c
Reviewed-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-04-14 23:30:29 +08:00
Steven Liu
e90ad88281
avformat/hlsenc: fix duration wrong when no pkt duration
...
when cannot get pkt duration, hlsenc segments duration will
be set to 0, this patch can fix it.
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-03-15 07:37:11 +08:00
Steven Liu
d3ce067e76
avformat/hlsenc: fix ticket 6231
...
check if the hls_flags is byterange_mode and check if should close fd
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-03-14 10:16:00 +08:00
Steven Liu
33e997d992
avformat/hlsenc: second_levels flags process function extract
...
the SECOND_LEVEL* flags process and name is too long
extract all of them output to funtions, make code clear
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-03-13 11:58:34 +08:00
Steven Liu
4507f29e4a
avformat/hlsenc: move the segment files handler close to before temp flags process
...
fix ticket: #6204
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-03-04 09:27:56 +08:00
Hendrik Leppkes
3aef2fceff
avformat/hlsenc: don't use %s for strftime on msvc
...
MSVC doesn't support the %s time format, and instead of returning an
error the invalid parameter handler is invoked which (by default)
terminates the process.
Reviewed-by:Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com>
2017-02-25 11:23:50 +08:00
Steven Liu
f73ef3748e
avformat/hlsenc: fix hls_flags temp_file bug
...
refer to ticket id: #6170
rename file from temp to origin name after complete current segment
Reviewed-by: Aman Gupta <ffmpeg@tmm1.net>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-02-25 10:59:05 +08:00
Steven Liu
0c0aef1caf
avformat/hlsenc: fix cid 1401346 Dereferencing pointer error
...
check if proto is null before av_strcasecmp
CID: 1401346
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-02-21 23:38:39 +08:00
Steven Liu
965f35b111
avformat/hlsenc: set default http method to PUT when method is null
...
When the http method is not set, the method will use POST for ts,
PUT for m3u8, it is not unify, now set it unify.
This ticket id: #5315
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-02-18 09:42:51 +08:00