Close segment I/O context and append segment in hls_write_trailer() only
when segment I/O context is allocated.
Signed-off-by: Christian Suloway <csuloway@globaleagleent.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This option flag deletes segment files removed from the playlist after a
period of time equal to the duration of the segment plus the duration of
the playlist.
Signed-off-by: Christian Suloway <csuloway@globaleagleent.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This option allows segment filenames to be specified. Unless -hls_flags
single_file is set the filename is used as a string format with the
segment number.
Example:
ffmpeg -f lavfi -i testsrc -c:v h264 -map 0 -hls_segment_filename
bar%03d.ts foo.m3u8
Signed-off-by: Christian Suloway <csuloway@globaleagleent.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This fixes the abnormally high ts overhead in the files produced by the
HLS and segments muxers. See https://trac.ffmpeg.org/ticket/2857 . For
example makes it much more likely that it can produces streams that fit
under the 64kb App store limit.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit '28816050e47b6dba430a52e429d21a864cffda8e':
lavf: Set the stream time base hint properly for chained muxers
Conflicts:
libavformat/segment.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
The -hls_allow_cache parameter enables explicitly setting the
EXT-X-ALLOW-CACHE tag in the manifest file. That tag indicates
whether the client MAY or MUST NOT cache downloaded media
segments for later replay.
Valid values are 1 (=YES) or 0 (=NO) and the EXT-X-ALLOW-CACHE
will not show in the manifest for other values (or if
-hls_allow_cache is not used.
Signed-off-by: Martin Storsjö <martin@martin.st>
The -hls_allow_cache parameter enables explicitly setting the
EXT-X-ALLOW-CACHE tag in the manifest file. That tag indicates
whether the client MAY or MUST NOT cache downloaded media
segments for later replay.
Valid values are 1 (=YES) or 0 (=NO) and the EXT-X-ALLOW-CACHE
will not show in the manifest for other values (or if
-hls_allow_cache is not used.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This adds a new option -hls_flags single_file that creates one .ts file
for HLS and adds byteranges to the .m3u8 file, instead of creating one
.ts file for each segment.
This is helpful at least for storing large number of videos, as the
number of files per video is drastically reduced and copying and storing
those files takes less requests and inodes.
This is based on work by Nicolas Martyanoff, discussed on ffmpeg-devel
in July 2014. That patch seems abandoned by the author, and contained
unrelated changes. This patch tries to add the minimum amount of code to
support the byterange playlists.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
With HLS, the duration of all segments must be lower or equal to the target
duration. Therefore floor(duration + 0.5) yields incorrect results.
For example, for duration = 1.35, floor(duration + 0.5) yields 1.0, but the
correct result is 2.0.
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
* commit '7266e24f176389d2e81bfc7c829934f7c8ae361c':
hls: Sync the file number with the start sequence
Conflicts:
libavformat/hlsenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'c7603b3c243331057300337a61464e6ac4a605cb':
hls: Print start_number as first sequence value
Conflicts:
libavformat/hlsenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '5a70a783f04919514efec7751d710b64d8975fd7':
hls: Add an option to prepend a baseurl to the playlist entries
Conflicts:
doc/muxers.texi
libavformat/hlsenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Necessary for HLS version 3 and above. Fixes ticket #3505.
Signed-off-by: Senthilnathan M <senthil.codr@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit '09c93b1b957f2049ea5fd8fb0e6f4d82680172f2':
hlsenc: Append the last incomplete segment when closing the output
Conflicts:
libavformat/hlsenc.c
See: 4630dfd1eb
Merged-by: Michael Niedermayer <michaelni@gmx.at>
The counter itself shouldn't be wrapped, since it is used for
determining end_pts for the next segment - only wrap the number
used for the segment file name.
Signed-off-by: Martin Storsjö <martin@martin.st>
* commit '92e354b655613b88c3c202a7e19e7037daed37eb':
rtpdec_vp8: Set the timestamp when returning a deferred packet
hlsenc: Make the start_number option set the right variable
Conflicts:
libavformat/hlsenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>