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>
7 years ago
Steven Liu
d67c1dda40
avformat/hlsenc: fix compiling error when disable-network
7 years ago
Steven Liu
071f47649c
avformat/hlsplaylist: add int type of API ff_hls_write_file_entry
...
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
7 years ago
Robert Nagy
31b351ea81
avformat/hlsenc: fix baseurl missing last char
...
Reviewed-by: Steven Liu <lq@onvideo.cn>
7 years ago
Karthick J
3684b5e56a
avformat/hlsenc: Refactored 'get_int_from_double' function to allow reuse
7 years ago
Karthick J
da49cdf640
avformat/hlsenc: Modularized playlist creation to allow reuse
7 years ago
Jeyapal, Karthick
815e34b5b4
libavformat/hlsenc: Persistent HTTP connections supported as an option
7 years ago
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
7 years ago
Karthick J
efb51c8ebb
avformat/hlsenc: Added option to add EXT-X-INDEPENDENT-SEGMENTS tag
7 years ago
Karthick J
241c1192d6
avformat/hlsenc: Refactor an inconsistent variable name
7 years ago
Karthick J
f335efc0ad
avformat/hlsenc: Minor fix in setting http options for master playlist
7 years ago
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>
7 years ago
Vishwanath Dixit
77ab1d7bae
avformat/hlsenc: creation of hls master playlist file
...
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
7 years ago
Vishwanath Dixit
92a32d0747
avformat/hlsenc: creation of hls variant streams in a single hlsenc instance
...
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
7 years ago
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>
7 years ago
Timo Rothenpieler
3ee63f3fb7
avformat/hlsenc: allocate space for terminating null
...
Fixes CID #1420394
7 years ago
Steven Liu
c7360512c2
avformat/hlsenc: reindent hlsenc code
...
Signed-off-by: Steven Liu <lq@onvideo.cn>
7 years ago
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>
7 years ago
Steven Liu
073986c5ae
avformat/hlsenc: reindent hlsenc code
...
Signed-off-by: Steven Liu <lq@onvideo.cn>
7 years ago
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>
7 years ago
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>
7 years ago
Steven Liu
c34c0e3a64
avformat/hlsenc: support http method for hls fmp4 init file
...
Signed-off-by: Steven Liu <lq@onvideo.cn>
8 years ago
Steven Liu
7e9cdd3f49
avformat/hlsenc: fix CID 1418106
...
fix the "Uninitialized scalar variable (UNINIT)" problem.
Signed-off-by: Steven Liu <lq@onvideo.cn>
8 years ago
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
8 years ago
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>
8 years ago
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>
8 years ago
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>
8 years ago
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>
8 years ago
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>
8 years ago
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>
8 years ago
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>
8 years ago
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>
8 years ago
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>
8 years ago
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>
8 years ago
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>
8 years ago
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>
8 years ago
Luca Barbato
16cb06bb30
hlsenc: Support recovery from an already present playlist
...
Parse the playlist to recover the start sequence and previously
generated segments and continue muxing from there.
Mainly useful for near-seamless recovery in live scenarios.
8 years ago
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>
8 years ago
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>
8 years ago
Steven Liu
363e4f0810
avformat/hlsenc: hold old key info when append list
...
fix ticket id: #6353
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
8 years ago
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>
8 years ago
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>
8 years ago
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>
8 years ago
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>
8 years ago
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>
8 years ago
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>
8 years ago
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>
8 years ago
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>
8 years ago
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>
8 years ago
Bela Bodecs
2b9f92fcc5
avformat/hlsenc: fix stream level metadata handling
...
hls-encoder currenlty does not provide stream level metadata to mpegts
muxer. This patch fixes track #3848 bug.
Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
8 years ago