Nicolas Martyanoff
706fcffce1
avformat/hlsenc: rename some identifers to make the code easier to read
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Nicolas Martyanoff
53f10e0368
avformat/hlsenc: Add some comments to make the code easier to read
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Nicolas Martyanoff
0c889da8cb
avformat/hlsenc: fix cleanup after avformat_write_header()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
351b22caae
avformat/mux: support re-interleaving packets in ff_write_chained()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Nicolas Martyanoff
6cc1fec412
avformat/hlsenc: correctly compute target duration
...
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>
11 years ago
Martin Storsjö
34e2ce5dde
hlsenc: Set the default codecs to AAC and H264
...
Most HLS implementation only support these codecs.
Signed-off-by: Martin Storsjö <martin@martin.st>
11 years ago
Luca Barbato
7266e24f17
hls: Sync the file number with the start sequence
11 years ago
Luca Barbato
a16431034d
hls: Factor the sequence computation
11 years ago
Luca Barbato
c7603b3c24
hls: Print start_number as first sequence value
...
The option now behaves as expected.
11 years ago
Luca Barbato
344f7b5a7e
hls: Report the current media sequence
...
Useful for debugging mostly.
11 years ago
Luca Barbato
5a70a783f0
hls: Add an option to prepend a baseurl to the playlist entries
...
Useful to generate playlists with absolute paths.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years ago
Michael Niedermayer
f359bac27c
avformat/hlsenc: remove unneeded l prefix from %lf
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Senthilnathan M
96b8e7a9cd
hlsenc: added floating point time support.
...
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>
11 years ago
Senthilnathan M
561bfce203
HLS: Handle the case when hls_list_size=0. Playlist file should contain all the segments. Fixes bug #3376 .
...
Signed-off-by: Senthilnathan M <senthil.codr@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
d780fdb904
avformat/hlsenc: copy metadata
...
Fixes Ticket2296
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
8f8bc92365
Add missing #includes for *INT64_MAX and *INT64_C
11 years ago
Carl Eugen Hoyos
9d86bfc259
hlsenc: Don't reset the number variable when wrapping
...
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>
11 years ago
Stefano Sabatini
09c93b1b95
hlsenc: Append the last incomplete segment when closing the output
...
Also avoid comparing NOPTS values.
Bug-id: 551
Signed-off-by: Martin Storsjö <martin@martin.st>
11 years ago
Carl Eugen Hoyos
75b9fb27f5
lavf/hlsenc: fix bogus hls segment index rewrapping logic
...
The counter should not be reset since it detects the
hls segment increasing timeframe.
Fixes ticket #2643 .
Reviewed-by: Stefano Sabatini
12 years ago
Anton Khirnov
cf679b9476
hls, segment: fix splitting for audio-only streams.
...
CC:libav-stable@libav.org
12 years ago
Stefano Sabatini
4630dfd1eb
lavf/hlsenc: append last incomplete segment when closing the output
...
Also introduce missing check on PTS value in case of NOPTS value.
12 years ago
Kanglin
ba8cb33273
hlsenc: Make the start_number option set the right variable
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Luca Barbato
30a7648730
hlsenc: make segment number unsigned
...
It will overflow if somebody keeps streaming for a time long enough.
12 years ago
Luca Barbato
9b1370aced
hlsenc: do not add timestamps in different timebases
...
start_time is in stream timebase units while end_time is
in AV_TIME_BASE ones.
12 years ago
Luca Barbato
0448f26c97
hlsenc: keep the playlist to the correct number of items
...
Consider the corner case with a list size larger than the wrap
number.
12 years ago
Kanglin
27a15e0af6
hlsenc: make EXT-X-MEDIA-SEQUENCE always increase
12 years ago
Kanglin
0d8cc7a3b2
hlsenc: use the correct AV_TIME_BASE macro
...
recording_time is in AV_TIME_BASE units.
12 years ago
Luca Barbato
6dd93ee6f1
hlsenc: check append_entry return value
12 years ago
Luca Barbato
ae85d6c9c0
hlsenc: use the segment filename in the playlist entry
...
Avoid calling av_get_frame_filename twice, once to generate the
segment filename and once to generate the playlist.
12 years ago
Luca Barbato
66f7b4862f
hlsenc: use the basename to generate the list entries
...
The segment path is desumed from the playlist path, recording a
relative path in the playlist while serving the file could lead
to misleading results.
12 years ago
Martin Storsjö
4a9f7d2bf9
hlsenc: Don't duplicate a string constant
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Stefano Sabatini
3193b13aa1
hlsenc: Allocate enough space for the pattern string
...
If s->filename doesn't contain any period/filename extension to strip
away, the buffer will be too small to fit both strings. This isn't
any buffer overflow since the concatenation uses av_strlcat with
the right buffer size.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Luca Barbato
7e98956e72
hlsenc: correctly report target duration
12 years ago
Stefano Sabatini
60c801c679
lavf/hlsenc: reuse pattern string, rather than redefining it
...
Improve robustness.
12 years ago
Stefano Sabatini
005b360b9c
lavf/hlsenc: fix basename size computation off-by-one bug
12 years ago
Stefano Sabatini
340b7caf54
lavf/hlsenc: provide some feedback in case of invalid basename
12 years ago
Stefano Sabatini
28b96efab5
lavf/hlsenc: fix minor grammar inconsistencies in the option help messages
12 years ago
Luca Barbato
adbe03077d
hls: use a meaningful long name
12 years ago
Luca Barbato
5fbceb2c63
hls: add start_number option
12 years ago
Luca Barbato
22a0827dff
hlsenc: stand alone hls segmenter
...
Simplifies usage but has higher latency.
12 years ago