1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-16 03:44:15 +02:00
Commit Graph

346 Commits

Author SHA1 Message Date
Bela Bodecs
098ab93257 avformat/hlsenc: temp_file usage for master playlist and vtt playlist
currently master playlist and subtitle playlist creation does not use
temporary files even when temp_file flag is set. Most of the use cases
it is not a problem because master playlist creation happens once on the
beginning of the whole process. But if master playlist is periodically
re-created because of master_pl_refresh_rate is set, non-atomic playlist
creation may cause problems in case of live streaming. This patch
correct this behavior by adding this functionality.

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
2019-06-28 13:54:27 +08:00
Derek Buitenhuis
025fcee6fa hlsenc: Add option to set custom HTTP headers
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2019-06-27 12:16:14 +01:00
Bela Bodecs
2045dd0050 avformat/hlsenc: better error log message for var_stream_map content
When multiple variant streams are specified by var_stream_map option,
%v is expected either in the filename or in the last sub-directory name,
but only in one of them. When both of them contains %v string, current
error message only states half of the truth.
And even %v may appears several times inside the last sub-directory name
or in filename pattern.
This patch clarifies this in the log message and in the doc also.

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
2019-06-24 17:43:39 +08:00
Bodecs Bela
86f04b918c avformat/hlsenc: enhanced %v handling with variant names
When multiple variant streams are specified by var_stream_map option, %v
placeholder in various names ensures that each variant has its unique
names. Currently %v is substituted by its variant index value (0, 1, 2
etc.). In some use cases it would be handy to specify names for variants
instead of numerical indexes. This patch makes it possible to use names
instead of default indexes. In var_stream_map option each or some of the
variant streams may use an optional name attributum (e.g.
-var_stream_map "v:0,a:0,name:sd v:1,a:1,name:720p") If a name is
specified for a variant, then this name value will be used as
substitution value of %v instead of the default index value.

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
Signed-off-by: Steven Liu <lq@onvideo.cn>
2019-06-20 11:08:04 +08:00
Steven Liu
fa7a6dbd76 avformat/hlsenc: add EXT-X-I-FRAMES-ONLY tag support
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-06-14 10:53:23 +08:00
Steven Liu
4ef0bea292 doc/muxers: fix typo of the hls var_stream_map example
And fix typo of the 1833 of hlsenc.c

Reviewed-by: Gyan Doshi <ffmpeg@gyani.pro>
Signed-off-by: Steven Liu <lq@onvideo.cn>
2019-06-02 21:53:11 +08:00
Karthick J
6aeaac3e1c avformat/dashenc: Add support for Global SIDX 2019-04-02 11:16:06 +05:30
Mark Reid
283ce69a10 avformat/mxfenc: allow user comments for opatom muxer
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-13 12:39:51 +01:00
Karthick J
ca5ec4cbbc avformat/dashenc: Added option to repeatedly publish master playlist
The master playlist can be published at a specified interval with this option
2019-02-25 11:40:47 +05:30
Reto Kromer
7a51fed0f0 doc/muxers: grammar fix
Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro>
2019-02-17 10:56:38 +05:30
Reto Kromer
bf78aa9ee9 doc/muxers: fix typo
Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro>
2019-02-13 18:47:16 +05:30
Moritz Barsnick
885a80d189 doc: fix various typos
Found with the help of codespell-1.14.0.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro>
2019-02-10 21:12:40 +05:30
Steven Liu
1e03d60054 avformat/hlsenc: add var_stream_map LANGUAGE field string parameter
use a:0,agroup:aud_low,default:Yes,language:CHN a:1,agroup:aud_low,language:ENG
        a:2,agroup:aud_high,default:YesYes,language:CHN a:3,agroup:aud_high,language:ENG
        v:0,agroup:aud_low v:1,agroup:aud_high
        create master m3u8 list.

result:
EXTM3U
EXT-X-VERSION:3
EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_aud_low",NAME="audio_0",DEFAULT=YES,LANGUAGE="CHN",URI="out_0.m3u8"
EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_aud_low",NAME="audio_1",DEFAULT=NO,LANGUAGE="ENG",URI="out_1.m3u8"
EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_aud_high",NAME="audio_2",DEFAULT=YES,LANGUAGE="CHN",URI="out_2.m3u8"
EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_aud_high",NAME="audio_3",DEFAULT=NO,LANGUAGE="ENG",URI="out_3.m3u8"
EXT-X-STREAM-INF:BANDWIDTH=1170400,RESOLUTION=640x480,CODECS="avc1.64001e,mp4a.40.2",AUDIO="group_aud_low"
out_4.m3u8
EXT-X-STREAM-INF:BANDWIDTH=3440800,RESOLUTION=640x480,CODECS="avc1.64001e,mp4a.40.2",AUDIO="group_aud_high"
out_5.m3u8

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-01-31 16:17:11 +08:00
Steven Liu
6a25bb5aa4 avformat/hlsenc: add var_stream_map DEFAULT field status parameter
use a:0,agroup:aud_low,default:Yes a:1,agroup:aud_low,
    a:2,agroup:aud_high,default:Yes a:3, agroup:aud_high,
    v:0,agroup:aud_low v:1,agroup:aud_high
    create master m3u8 list.

result:
EXTM3U
EXT-X-VERSION:3
EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_aud_low",NAME="audio_0",DEFAULT=YES,URI="out_0.m3u8"
EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_aud_low",NAME="audio_1",DEFAULT=NO,URI="out_1.m3u8"
EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_aud_high",NAME="audio_2",DEFAULT=YES,URI="out_2.m3u8"
EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="group_aud_high",NAME="audio_3",DEFAULT=NO,URI="out_3.m3u8"
EXT-X-STREAM-INF:BANDWIDTH=1170400,RESOLUTION=640x480,CODECS="avc1.64001e,mp4a.40.2",AUDIO="group_aud_low"
out_4.m3u8
EXT-X-STREAM-INF:BANDWIDTH=3440800,RESOLUTION=640x480,CODECS="avc1.64001e,mp4a.40.2",AUDIO="group_aud_high"
out_5.m3u8

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2019-01-31 16:17:02 +08:00
Karthick J
306cc26115 avformat/dashenc: Added documentation for $ext$ identifier in filenames 2019-01-21 14:50:34 +05:30
kjeyapal@akamai.com
f22fcd4483 avformat/dashenc: Added support for Low-latency HLS(Experimental)
Apple doesn't have an official spec for LHLS. Meanwhile hls.js player folks are
trying to standardize a open LHLS spec. The draft spec is available in https://github.com/video-dev/hlsjs-rfcs/blob/lhls-spec/proposals/0001-lhls.md
This option will also try to comply with the above open spec, till Apple's spec officially supports it.
Applicable only when @var{streaming} and @var{hls_playlist} options are enabled.
2018-12-17 12:11:55 +05:30
kjeyapal@akamai.com
1d01ab399f avformat/movenc: Added an option to disable SIDX atom 2018-12-11 10:52:16 +05:30
Karthick J
2349260330 avformat/hlsenc : Added an option to ignore IO errors
Useful for long duration runs with network output

Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
2018-12-10 14:19:23 +08:00
Gyan Doshi
8bd7919699 doc: chromaprint
Add entry in external library list and add details to muxer entry.
2018-12-04 16:38:42 +05:30
kjeyapal@akamai.com
c32aad1961 avformat/dashenc: Added an option to ignore io errors
When dashenc has to run for long duration(say 24x7 live stream), one can enable this option to ignore the io failure of few segment's upload due to an intermittent network issues.
When the network connection recovers dashenc will continue with the upload of the current segments, leading to the recovery of the stream.
2018-12-02 19:14:37 +05:30
Andrey Semashev
281a21ed50 lavf/dashenc: Add support for format-specific file extensions.
The file name template options now support a new "$ext$" placeholder,
which is replaced with a filename extension specific for the selected
file format. This is useful for the new "auto" format mode, when
different streams may use different file formats, and it is not
possible to specify the correct file name extension exactly.

Resolves warnings in the log about webm segments not having webm extensions.
2018-11-21 18:02:19 +05:30
Andrey Semashev
322e53f8ae lavf/dashenc: Add DASH segment type auto and make it the default
This commit restores the ability to create DASH streams with codecs
that require different containers that was lost after commit
2efdbf7367. It adds a new "auto" value for
the dash_segment_type option and makes it the default. When in this mode,
the segment format will be chosen based on the codec used in the stream:
webm for Vorbis, Opus, VP8 or VP9, mp4 otherwise.
2018-11-21 18:01:53 +05:30
Werner Robitza
ad5ca1fb72 doc/hls: fix grammar for HLS options
This fixes the grammar of two HLS option descriptions and makes them less
ambiguous.

Signed-off-by: Werner Robitza <werner.robitza@gmail.com>
Signed-off-by: Lou Logan <lou@lrcd.com>
2018-10-30 14:08:19 -08:00
Steven Liu
fbd8746efa avformat/hlsenc: rename option from use_localtime to strftime
fix ticket: 7393
indent option name to segment

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-09-05 14:08:18 +08:00
Jan Ekström
1931761f18 avformat/movenc: implicitly enable negative CTS offsets for ismv
ISMV lacks any sort of edit list support, as well as tfxd is
effectively the PTS of the fragment for most intents and purposes.

Thus, if b-frames are requested without negative CTS offsets you
end up with N frames' worth of delay (tfxd PTS plus the CTS offset
of the first sample). Negative CTS offsets enable the first sample
to have CTS=DTS, and thus a/v desync due to b-frame reorder delay
is avoided.
2018-08-24 21:00:05 +03:00
Vishwanath Dixit
5717cd80dc avformat/movenc: creating producer reference time (PRFT) box
The producer reference time box supplies relative wall-clock times
at which movie fragments, or files containing movie fragments
(such as segments) were produced.
The box is mainly useful in live streaming use cases. A media player
can parse the box and utilize the time fields to measure and improve
the latency during real time playout.
2018-05-29 09:32:11 +05:30
Karthick Jeyapal
2efdbf7367 avformat/dashenc: Added option for Segment file format
Right now segment file format is chosen to be either mp4 or webm based on the codec format.
This patch makes that choice configurable by the user, instead of being decided by the muxer.

Also with this change per-stream choice segment file format(based on codec type) is not possible.
All the output audio and video streams should be in the same file format.
2018-05-28 10:52:01 +05:30
Vishwanath Dixit
e3518821c9 avformat/dashenc: configuring container format options 2018-05-15 11:13:36 +05:30
Karthick Jeyapal
c76a6c93bf avformat/dashenc: Add documentation for http method option 2018-05-14 10:20:54 +05:30
Gyan Doshi
424836505f doc/muxers: tee muxer - rearrange, add notes and general tidy-up 2018-04-19 17:43:42 +05:30
Vishwanath Dixit
d10cefbfe5 avformat/dashenc: addition of segment index correction logic
The logic is applicable only when use_template is enabled and use_timeline
is disabled. The logic monitors the flow of segment indexes. If a streams's
segment index value is not at the expected real time position, then
the logic corrects that index value.

Typically this logic is needed in live streaming use cases. The network
bandwidth fluctuations are common during long run streaming. Each
fluctuation can cause the segment indexes fall behind the expected real
time position. Without this logic, players will not be able to consume
the content, even after encoder's network condition comes back to
normal state.
2018-04-17 14:35:40 +05:30
Vishwanath Dixit
ab789e184c avformat/dashenc: segmentation at the configured segment duration rate
When use_template is enabled and use_timeline is disabled, typically
it is required to generate the segments at the configured segment duration
rate on an average. This commit is particularly needed to handle the
segmentation when video frame rates are fractional like 29.97 or 59.94 fps.
2018-04-17 14:31:22 +05:30
Vishwanath Dixit
01ba52852d avformat/dashenc: replacing 'min_seg_duration' with 'seg_duration'
There are use cases where average segment duration needs to be configured
and muxer is expected to maintain the average segment duration. So, using
the name 'min_seg_duration' will be misleading. So, changing the parameter
name to 'seg_duration', where it can be minimum segment duration or average
segment duration based on the use-case. The additional updates needed for
this functinality are made the sub-sequent patches of this patch series.
2018-04-17 14:30:47 +05:30
Steven Liu
987026adda avformat/hlsenc: add option hls_delete_threshold
When using hls_list_size with hls_flags delete_segments, currently
hls_list_size * 2 +- segments remain on disk. With this new option,
the amount of disk space used can be controlled by the user.

fix ticket: #7131

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Aman Gupta <aman@tmm1.net>
2018-04-13 15:39:49 +08:00
Ravindra
99230b7ef8 libavformat/dashenc: Option to set timeout for socket I/O operation 2018-03-18 12:36:28 +05:30
Ravindra
6010537956 avformat/hlsenc: Option to set timeout for socket I/O operation
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
2018-03-14 19:59:34 +08:00
Vishwanath Dixit
28924f4b48 avformat/dashenc: chunk streaming support for low latency use cases 2018-02-24 10:55:28 +05:30
Vishwanath Dixit
1948b76a1b avformat/hlsenc: closed caption tags in the master playlist 2018-01-24 11:42:57 +08:00
Vishwanath Dixit
41e51fbcd9 avformat/hlsenc: creation of variant streams in subdirectories
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
2018-01-02 10:46:48 +08:00
Vishwanath Dixit
e872befdb5 avformat/hlsenc: configurable variant stream index position in filenames 2018-01-02 10:46:17 +08:00
Karthick Jeyapal
0c78b6a416 avformat/dashenc: Persistent HTTP connections supported as an option
Reviewed-by: Aman Gupta <aman@tmm1.net>
Reviewed-by: Steven Liu <lq@onvideo.cn>
2017-12-29 18:12:32 +08:00
Vishwanath Dixit
d02289c386 avformat/hlsenc:addition of #EXT-X-MEDIA tag and AUDIO attribute
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-12-23 13:42:00 +08:00
Karthick J
8c2b37e678 avformat/dashenc: Option to generate hls playlist as well
This is to take full advantage of Common Media Application Format(CMAF).
Now server can generate one content and serve both HLS and DASH players.

Reviewed-by: Steven Liu <lq@onvideo.cn>
2017-11-30 10:55:51 +08:00
Jeyapal, Karthick
815e34b5b4 libavformat/hlsenc: Persistent HTTP connections supported as an option 2017-11-29 14:33:07 +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
d24e08e978 avformat/dashenc: Added configuration to override HTTP User-Agent
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-11-21 03:13:03 +01: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
f3e34072aa avformat/img2enc: add frame_pts option for make output filename
fix ticket id: #1452
when use frame_pts option, the output image name can be set with PTS
of current frame.

Signed-off-by: Steven Liu <lq@onvideo.cn>
2017-11-13 10:52:01 +08:00
James Almer
27aa69896b Merge commit '0e702124ee149593168cbbb7b30376249a64ae66'
* commit '0e702124ee149593168cbbb7b30376249a64ae66':
  doc: Provide better examples for hls and segment muxing

Merged-by: James Almer <jamrial@gmail.com>
2017-11-11 23:47:50 -03:00
Luca Barbato
0e702124ee doc: Provide better examples for hls and segment muxing
Some encoders do not output further IDRs if not requested to.
2017-10-27 19:52:48 +02:00
Martin Storsjö
07e4be7ec9 movenc: Add an option for enabling negative CTS offsets
This reduces the need for an edit list; streams that start with
e.g. dts=-1, pts=0 can be encoded as dts=0, pts=0 (which is valid
in mov/mp4) by shifting the dts values of all packets forward.
This avoids the need for edit lists for such streams (while they
still are needed for audio streams with encoder delay).

This eases conformance with the DASH-IF interoperability guidelines.

Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-09-28 18:15:45 +02:00
Rodger Combs
3eb1d05ef7 Merge commit 'c5c663541739cb813a2a5668ee8339b535b35d7d'
* commit 'c5c663541739cb813a2a5668ee8339b535b35d7d':
  doc: add dash muxer

Merged-by: Rodger Combs <rodger.combs@gmail.com>
2017-09-26 14:13:54 -03:00
Lou Logan
183fd30e0f Fix several typos
"apix_fmts" found by Marc Péchaud.
"speedloss" found by Mikhail V.

Signed-off-by: Lou Logan <lou@lrcd.com>
2017-09-21 16:17:02 -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
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
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
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
Nicolas George
0c20f9fcab doc/muxers: fix default value for image2 option start_number. 2017-04-04 09:15:01 +02:00
Lou Logan
396be0da59 doc/muxers: cleanup mpegts section
Add missing options.
List correct variable types.
Re-order options and markup flag options properly.
Add more texinfo markup.

Signed-off-by: Lou Logan <lou@lrcd.com>
2017-03-16 12:01:15 -08:00
Steven Liu
70a9407b50 doc/muxers: move hls_flags temp_file to after SECOND LEVEL hls example
the temp_file hls_flags describe text offset is wrong, now move it after example

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-03-11 21:11:38 +08:00
Michael Niedermayer
68b8be0811 doc/muxers: Fix typo, causing warnings during build
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-12 20:40:47 +01:00
Steven Liu
d96ebc5ef8 avformat/hlsenc: deprecate hls_wrap option
When user use the hls_wrap, there have many problem:
1. some platform refersh the old but usefull segment
2. CDN(Content Delivery Network) Deliver HLS not friendly

The hls_wrap is used to wrap segments for use little space,
now user can use hls_list_size and hls_flags delete_segments
instead it.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-02-11 12:32:31 +08:00
Mulvya
40b6e28778 doc: Add muxers/demuxers list option
Signed-off-by: Mulvya <mulvya@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-02-11 02:59:32 +01:00
Aman Gupta
606eac7b07 avformat/hlsenc: add hls_flag option to write segments to temporary file until complete
Adds a `-hls_flags +temp_file` which will write segment data to
filename.tmp, and then rename to filename when the segment is complete.

This patch is similar in spirit to one used in Plex's ffmpeg fork, and
allows a transcoding webserver to ensure incomplete segment files are
never served up accidentally.

Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Reviewed-by: Bodecs Bela <bodecsb@vivanet.hu>
Signed-off-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-02-07 11:58:43 +08:00
Marton Balint
1687fa2131 doc/muxers: remove confusing example for segment muxer option clocktime_wrap_duration
Detecting a leap second depends on a lot of things, segment time, segment
offset, system leap second implementation, the removed part is a huge
simplification which can be misleading, so it is best to remove it.

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-02-04 23:36:46 +01:00
Tobias Rapp
c778a9657d doc/muxers: add AVI muxer documentation
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2017-01-31 15:08:37 +01:00
Peter Große
c5c6635417 doc: add dash muxer
Signed-off-by: Peter Große <pegro@friiks.de>
Signed-off-by: Martin Storsjö <martin@martin.st>
2017-01-31 00:45:30 +02:00
Bodecs Bela
8811d6d9a0 avformat/hlsenc: hls_start_number_source and start_number
start_number option starts the playlist sequence number
(#EXT-X-MEDIA-SEQUENCE) from the specified number. Unless hls_flags
single_file is set, it also specifies starting sequence numbers of
segment and subtitle filenames. Sometimes it is usefull to have unique
starting numbers at each run, but currently it is only achiveable by
setting this parameter manually.
This patch enables to specify start_number source parameter by
introducing hls_start_number_source with 3 possible values:
generic/epoch/datetime. This ensures to set start sequence number
automatically for practically unique numbers. Generic option is the
default and this is the curent behaviour: start_number option value
specifies the start sequence number. (start_number default value is 0)
If hls_start_number_source is set to epoch, then the start number will
be the seconds since epoch (1970-01-01 00:00:00). If set to datetime,
then the start sequence number will be based on the current date/time
value as YYYYmmddHHMMSS. e.g. 20161231235659.
Hls speficication allows 64 bit integers as sequence numbers. This patch
also changes some code where only 32 bit integer values were handled
correctly.

Reviewed-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-01-12 20:43:10 +08:00
Bela Bodecs
4068f5fac7 doc/muxers/hlsenc: typo hls_flag: discont_starts => discont_start
Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-05 23:18:36 +01:00
Bela Bodecs
557c0df9a8 avformat/hlsenc: size and duration in segment filenames
1st:
This patch makes it possible to put actual segment file size (measured
in bytes) and/or duration (calculated in microseconds) into segment
filenames. This feature is useful when post-processing live streaming
access log files. New behaviour works only when -use_localtime option
is set and second_level_segment_size or/and
second_level_segment_duration new hls_flags are specified. %%s is the
placeholder for size and %%t for duration in hls_segment_filename
option. Fix sized trailing zeropadding also works eg. %%09s or %%023t.

A command to test new features:
./ffmpeg -loglevel info -y -f lavfi -i color=c=red:size=640x480:r=25 -f
lavfi -i sine=f=440:b=4:r=44100 -c:v mpeg2video -g 25 -acodec aac
-cutoff 20000 -ac 2 -ar 44100 -ab 192k -f hls -hls_time 3 -hls_list_size
5 -hls_flags
second_level_segment_index+second_level_segment_size+second_level_segment_duration
-use_localtime 1 -use_localtime_mkdir 1 -hls_segment_filename
"segment_%Y%m%d%H%M%S_%%04d_%%08s_%%013t.ts" stream.m3u8

2nd:
doc/muxers: beside second_level_segment_duration and second_level_segment_size,
added some more details and example to hls_segment_filename,
use_localtime, use_localtime_mkdir, hls_flags. hls_flags option list
reformatted to table

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-01-03 22:57:51 +08:00
Jan Sebechlebsky
7c91ee01cc libavformat/tee: Add fifo support for tee
Signed-off-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com>
2016-12-28 16:18:15 +01:00
Bodecs Bela
0ff8c6b6d5 avformat/hlsenc: strftime identifiers and segment index
in filenames

Putting date/time values into segment filenames is very usefull.
But to produce non-conflicting segment filenames with -use_localtime
option with date/time
values in hls_segment_filename option, sometimes is not enough.
Like in cases when multiple segments produced in the same second.
But hlsenc currently does not make possible to use segment index (%d) at
the

same time whe use_localtime is in effect, due to identifier conflict.
This patch makes possible to use strftime identifiers and still put
segment index (%d) at same time in segment filenames by introducing
second_level_segment_index flag. When -use_localtime is active,
identifier %d is for month day index, so %%d is the segment index
placeholder. This enhanced behaviour only exists when new
second_level_segment_index flag is specified.
For instance putting 'segment_%Y%m%d%H%M%S_%%05d.ts' value into
-hls_segment_filename option and specifing -hls_flags
second_level_segment_index and -use_localtime 1, may produce segment
filename as 'segment_20161230235758_00002.ts'

An example:

ffmpeg -loglevel info -y -f lavfi -i color=c=red:size=640x480:r=25 -f
lavfi -i anullsrc=r=44100:cl=stereo -c:v mpeg2video -g 25 -acodec aac
-cutoff 20000 -ac 2 -ar 44100 -ab 192k -f hls -hls_time 3 -hls_list_size
5 -hls_flags delete_segments+second_level_segment_index -use_localtime 1
-hls_segment_filename "segment_%Y%m%d%H%M%S_%%05d.ts" stream.m3u8

will produce segments filenames:

....
segment_20161227005902_00013.ts
segment_20161227005902_00014.ts
segment_20161227005902_00015.ts
segment_20161227005903_00016.ts
segment_20161227005903_00017.ts
segment_20161227005903_00018.ts
segment_20161227005903_00019.ts
segment_20161227005903_00020.ts
....

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
2016-12-27 10:40:35 +08:00
Lou Logan
ee795d9d26 doc/muxers: remove "-strict experimental" from tee muxer examples
Examples use the native FFmpeg AAC encoder but it is no longer
considered experimental and therefore not required.

Signed-off-by: Lou Logan <lou@lrcd.com>
2016-12-08 12:06:05 -09:00
Steven Liu
ee24c8ad01 avformat/flvenc: fix ticket 5976 and use old commit
mythtv have problem with non-seekable dont write duration and filesize
and there have problem with some other server and player with 0 value
duation and filesize.
So add a flv flags to fix the ticket and make a choose for users.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2016-11-26 08:52:19 +08:00
Steven Liu
d316b21dba avformat/flvenc: add no_metadata to flvflags
some flv have no metadata,
ffmpeg will same with the source flv stream.

Signed-off-by: Steven Liu <lingjiujianke@gmail.com>
2016-11-22 10:18:23 +08:00
Luca Barbato
0a4b9d0ccd hlsenc: Add encryption support
Partially based on Christian Suloway <csuloway@globaleagleent.com> work.
2016-11-17 19:19:55 +01:00
Steven Liu
863ebe6f83 avformat/flvenc: add add_keyframe_index option
Add keyframe index metadata
Used to facilitate seeking; particularly for HTTP pseudo streaming.
 1. read live streaming or file by sequence
 2. if use add_keyframe_index option, add a mark flag at the position,
    use to insert new context at the last step.
 3. add the keyframes *offset* and *timestamp* into a list
 4. if use add_keyframe_index option, shift the metadata data from
    mark flag offset
 5. insert the keyframes *offset* and *timestamp* from the list by
    sequence
 6. free the list
 7. end.

Add FATE test case;

Reviewed-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Steven Liu <liuqi@gosun.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-10 10:30:48 +08:00
Michael Niedermayer
a566c952f9 avformat/mpegtsenc: Add option to mark stream begin as discontinuous
This avoids continuity check failures in concatenated streams

Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-02 16:34:01 +01:00
Michael Niedermayer
2b09a3ad19 Revert "img2 encoder: allow %t in filename, based on patch from Yuval Adam"
breaks API

Found-by: jamrial
This reverts commit 1a956c64c8.
2016-11-01 23:03:24 +01:00
rogerdpack
8459e6fd12 img2 encoder: use more descriptive vsync names
Signed-off-by: rogerdpack <rogerpack2005@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-01 22:29:23 +01:00
rogerdpack
1a956c64c8 img2 encoder: allow %t in filename, based on patch from Yuval Adam
Signed-off-by: rogerdpack <rogerpack2005@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-01 22:29:23 +01:00
Andreas Cadhalpun
c8a6eb58d7 doc: fix spelling errors
Thanks to Mathieu Malaterre <malat@debian.org> for reporting the
Que/Queue typo. (https://bugs.debian.org/839542)

Reviewed-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-10-21 23:58:47 +02:00
Moritz Barsnick
99d68d462f doc: fix various typos and grammar errors
Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-11 16:57:46 +02:00
Josh de Kock
dc0f711459 lavc: remove libfaac wrapper
There is really no need for two aac wrappers, we already have
libfdk-aac which is better. Not to mention that faac doesn't
even support HEv1, or HEv2. It's also under a license which is
unusable for distribution, so it would only be useful to people
who will compile their own ffmpeg, only use it themselves (which
at that point should just use fdk-aac).

Signed-off-by: Josh de Kock <josh@itanimul.li>
2016-10-01 19:58:04 +01:00
Steven Liu
95f2dcafe1 doc/muxers: fix hlsenc options examples error
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Lou Logan <lou@lrcd.com>
2016-09-28 15:04:55 -08:00
Carl Eugen Hoyos
46aae84616 lavf/movenc: Allow to disable writing the timecode track.
Fixes ticket #5492.
2016-09-26 08:50:48 +02:00
Steven Liu
3ea28f3f79 doc/muxers: add flv muxer document into doc/muxers
add flvflags aac_seq_header_detect and flvflags no_sequence_end
document into doc/muxers

Reviewed-by: Lou Logan <lou@lrcd.com>
2016-09-16 16:16:04 -08:00
Michael Niedermayer
2793ebd6cb avformat/hlsenc: implement program_date_time
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-09-08 02:22:21 +02:00
Steven Liu
7ba98824a9 doc/muxers: add option hls_init_time document
Reviewed-by: Ibrahim Tachijian <barhom@netsat.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-29 14:54:39 +02:00
Jan Sebechlebsky
92b5f8fecd avformat: Add fifo pseudo-muxer
Signed-off-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-08-22 22:03:37 +02:00
Steven Liu
445c30ba07 lavf/hlsenc: add append_list flag into hlsenc
When ffmpeg exit by exception, start a new ffmpeg will
cover the old segment list, add this flag can continue
append the new segments into old hls segment list

Signed-off-by: LiuQi <liuqi@gosun.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-21 14:55:27 +02:00
Steven Liu
41ad6d193a doc/muxers: improve hlsenc description
Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-22 16:31:30 +02:00
Steven Liu
6f07467831 doc/muxers: add hls_flags option description
Signed-off-by: Steven Liu <liuqi@gosun.com>
Reviewed-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-22 16:31:30 +02:00
Steven Liu
b701ec4152 refine the method option describe of hlsenc doc
Signed-off-by: LiuQi <liuqi@gosun.com>
Reviewed-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-15 16:24:28 +02:00
Michael Niedermayer
37c658b56b doc/muxers: Fix Thisimproves typo
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-11 12:55:29 +02:00
Steven Liu
b45a976ed4 add split_by_time flag for support splite mpegts segment at non-keyframe
support split hls segment at duration set by hls_time

Signed-off-by: LiuQi <liuqi@gosun.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-11 12:20:40 +02:00
Benoit Fouet
2234566cfb hls muxer doc: clarify segment splitting option
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-15 11:28:04 +02:00
Stefano Sabatini
6bcc6fd55d doc/muxers/mpegts: apply misc consistency/formatting fixes 2016-06-14 12:11:04 +02:00
Jan Sebechlebsky
2063f3ed9c avformat/tee: Handling slave failure in tee muxer
Adds per slave option 'onfail' to the tee muxer allowing an output to
fail, so other slave outputs can continue.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-04-22 20:04:27 +02:00