]> git.sesse.net Git - ffmpeg/blobdiff - doc/muxers.texi
avfilter/vf_lut: add support for commands
[ffmpeg] / doc / muxers.texi
index c9adee98e7e25c16355a0c46e02ae96a5de68a7b..1f9f2937f8a3a61eb2267e2c3a4761b3b7989c4e 100644 (file)
@@ -89,6 +89,12 @@ specific scenarios, e.g. when merging multiple audio streams into one for
 compatibility with software that only supports a single audio stream in AVI
 (see @ref{amerge,,the "amerge" section in the ffmpeg-filters manual,ffmpeg-filters}).
 
+@item flipped_raw_rgb
+If set to true, store positive height for raw RGB bitmaps, which indicates
+bitmap is stored bottom-up. Note that this option does not flip the bitmap
+which has to be done manually beforehand, e.g. by using the vflip filter.
+Default is @var{false} and indicates bitmap is stored top down.
+
 @end table
 
 @anchor{chromaprint}
@@ -267,8 +273,10 @@ Override User-Agent field in HTTP header. Applicable only for HTTP output.
 @item http_persistent @var{http_persistent}
 Use persistent HTTP connections. Applicable only for HTTP output.
 @item hls_playlist @var{hls_playlist}
-Generate HLS playlist files as well. The master playlist is generated with the filename master.m3u8.
+Generate HLS playlist files as well. The master playlist is generated with the filename @var{hls_master_name}.
 One media playlist file is generated for each stream with filenames media_0.m3u8, media_1.m3u8, etc.
+@item hls_master_name @var{file_name}
+HLS master playlist name. Default is "master.m3u8".
 @item streaming @var{streaming}
 Enable (1) or disable (0) chunk streaming mode of output. In chunk streaming
 mode, each frame will be a moof fragment which forms a chunk.
@@ -339,21 +347,35 @@ Enable Low-latency Dash by constraining the presence and values of some elements
 @item master_m3u8_publish_rate @var{master_m3u8_publish_rate}
 Publish master playlist repeatedly every after specified number of segment intervals.
 
-@item -write_prft @var{write_prft}
+@item write_prft @var{write_prft}
 Write Producer Reference Time elements on supported streams. This also enables writing
 prft boxes in the underlying muxer. Applicable only when the @var{utc_url} option is enabled.
+It's set to auto by default, in which case the muxer will attempt to enable it only in modes
+that require it.
 
-@item -mpd_profile @var{mpd_profile}
+@item mpd_profile @var{mpd_profile}
 Set one or more manifest profiles.
 
-@item -http_opts @var{http_opts}
+@item http_opts @var{http_opts}
 A :-separated list of key=value options to pass to the underlying HTTP
 protocol. Applicable only for HTTP output.
 
-@item -target_latency @var{target_latency}
+@item target_latency @var{target_latency}
 Set an intended target latency in seconds (fractional value can be set) for serving. Applicable only when @var{streaming} and @var{write_prft} options are enabled.
 This is an informative fields clients can use to measure the latency of the service.
 
+@item min_playback_rate @var{min_playback_rate}
+Set the minimum playback rate indicated as appropriate for the purposes of automatically
+adjusting playback latency and buffer occupancy during normal playback by clients.
+
+@item max_playback_rate @var{max_playback_rate}
+Set the maximum playback rate indicated as appropriate for the purposes of automatically
+adjusting playback latency and buffer occupancy during normal playback by clients.
+
+@item update_period @var{update_period}
+ Set the mpd update period ,for dynamic content.
+ The unit is second.
+
 @end table
 
 @anchor{framecrc}
@@ -587,14 +609,21 @@ segmentation.
 This muxer supports the following options:
 
 @table @option
-@item hls_init_time @var{seconds}
-Set the initial target segment length in seconds. Default value is @var{0}.
+@item hls_init_time @var{duration}
+Set the initial target segment length. Default value is @var{0}.
+
+@var{duration} must be a time duration specification,
+see @ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) manual,ffmpeg-utils}.
+
 Segment will be cut on the next key frame after this time has passed on the first m3u8 list.
 After the initial playlist is filled @command{ffmpeg} will cut segments
 at duration equal to @code{hls_time}
 
-@item hls_time @var{seconds}
-Set the target segment length in seconds. Default value is 2.
+@item hls_time @var{duration}
+Set the target segment length. Default value is 2.
+
+@var{duration} must be a time duration specification,
+see @ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) manual,ffmpeg-utils}.
 Segment will be cut on the next key frame after this time has passed.
 
 @item hls_list_size @var{size}
@@ -638,6 +667,9 @@ Set the starting sequence numbers according to @var{start_number} option value.
 @item epoch
 The start number will be the seconds since epoch (1970-01-01 00:00:00)
 
+@item epoch_us
+The start number will be the microseconds since epoch (1970-01-01 00:00:00)
+
 @item datetime
 The start number will be based on the current date/time as YYYYmmddHHMMSS. e.g. 20161231235759.
 
@@ -806,7 +838,7 @@ When enabled every segment generated is encrypted and the encryption key
 is saved as @var{playlist name}.key.
 
 @item -hls_enc_key @var{key}
-Hex-coded 16byte key to encrypt the segments, by default it
+16-octet key to encrypt the segments, by default it
 is randomly generated.
 
 @item -hls_enc_key_url @var{keyurl}
@@ -814,7 +846,7 @@ If set, @var{keyurl} is prepended instead of @var{baseurl} to the key filename
 in the playlist.
 
 @item -hls_enc_iv @var{iv}
-Hex-coded 16byte initialization vector for every segment instead
+16-octet initialization vector for every segment instead
 of the autogenerated ones.
 
 @item hls_segment_type @var{flags}
@@ -834,6 +866,16 @@ fmp4 files may be used in HLS version 7 and above.
 @item hls_fmp4_init_filename @var{filename}
 Set filename to the fragment files header file, default filename is @file{init.mp4}.
 
+Use @code{-strftime 1} on @var{filename} to expand the segment filename with localtime.
+@example
+ffmpeg -i in.nut  -hls_segment_type fmp4 -strftime 1 -hls_fmp4_init_filename "%s_init.mp4" out.m3u8
+@end example
+This will produce init like this
+@file{1602678741_init.mp4}
+
+@item hls_fmp4_init_resend
+Resend init file after m3u8 file refresh every time, default is @var{0}.
+
 When @code{var_stream_map} is set with two or more variant streams, the
 @var{filename} pattern must contain the string "%v", this string specifies
 the position of variant stream index in the generated init file names.
@@ -1060,6 +1102,21 @@ have and language is named ENG, the other audio language is named CHN.
 
 By default, a single hls variant containing all the encoded streams is created.
 
+@example
+ffmpeg -y -i input_with_subtitle.mkv \
+ -b:v:0 5250k -c:v h264 -pix_fmt yuv420p -profile:v main -level 4.1 \
+ -b:a:0 256k \
+ -c:s webvtt -c:a mp2 -ar 48000 -ac 2 -map 0:v -map 0:a:0 -map 0:s:0 \
+ -f hls -var_stream_map "v:0,a:0,s:0,sgroup:subtitle" \
+ -master_pl_name master.m3u8 -t 300 -hls_time 10 -hls_init_time 4 -hls_list_size \
+ 10 -master_pl_publish_rate 10  -hls_flags \
+ delete_segments+discont_start+split_by_time ./tmp/video.m3u8
+@end example
+
+This example adds @code{#EXT-X-MEDIA} tag with @code{TYPE=SUBTITLES} in
+the master playlist with webvtt subtitle group name 'subtitle'. Please make sure
+the input file has one text subtitle stream at least.
+
 @item cc_stream_map
 Map string which specifies different closed captions groups and their
 attributes. The closed captions stream groups are separated by space.
@@ -1283,7 +1340,8 @@ The recognized metadata settings in this muxer are:
 
 @table @option
 @item title
-Set title name provided to a single track.
+Set title name provided to a single track. This gets mapped to
+the FileDescription element for a stream written as attachment.
 
 @item language
 Specify the language of the track in the Matroska languages form.
@@ -1350,11 +1408,38 @@ index at the beginning of the file.
 
 If this option is set to a non-zero value, the muxer will reserve a given amount
 of space in the file header and then try to write the cues there when the muxing
-finishes. If the available space does not suffice, muxing will fail. A safe size
-for most use cases should be about 50kB per hour of video.
+finishes. If the reserved space does not suffice, no Cues will be written, the
+file will be finalized and writing the trailer will return an error.
+A safe size for most use cases should be about 50kB per hour of video.
 
 Note that cues are only written if the output is seekable and this option will
 have no effect if it is not.
+@item default_mode
+This option controls how the FlagDefault of the output tracks will be set.
+It influences which tracks players should play by default. The default mode
+is @samp{infer}.
+@table @samp
+@item infer
+In this mode, for each type of track (audio, video or subtitle), if there is
+a track with disposition default of this type, then the first such track
+(i.e. the one with the lowest index) will be marked as default; if no such
+track exists, the first track of this type will be marked as default instead
+(if existing). This ensures that the default flag is set in a sensible way even
+if the input originated from containers that lack the concept of default tracks.
+@item infer_no_subs
+This mode is the same as infer except that if no subtitle track with
+disposition default exists, no subtitle track will be marked as default.
+@item passthrough
+In this mode the FlagDefault is set if and only if the AV_DISPOSITION_DEFAULT
+flag is set in the disposition of the corresponding stream.
+@end table
+
+@item flipped_raw_rgb
+If set to true, store positive height for raw RGB bitmaps, which indicates
+bitmap is stored bottom-up. Note that this option does not flip the bitmap
+which has to be done manually beforehand, e.g. by using the vflip filter.
+Default is @var{false} and indicates bitmap is stored top down.
+
 @end table
 
 @anchor{md5}
@@ -1504,13 +1589,6 @@ point on IIS with this muxer. Example:
 ffmpeg -re @var{<normal input/transcoding options>} -movflags isml+frag_keyframe -f ismv http://server/publishingpoint.isml/Streams(Encoder1)
 @end example
 
-@subsection Audible AAX
-
-Audible AAX files are encrypted M4B files, and they can be decrypted by specifying a 4 byte activation secret.
-@example
-ffmpeg -activation_bytes 1CEB00DA -i test.aax -vn -c:a copy output.mp4
-@end example
-
 @section mp3
 
 The MP3 muxer writes a raw MP3 stream with the following optional features:
@@ -1619,11 +1697,13 @@ Advanced Codec Digital HDTV service.
 
 @item mpegts_pmt_start_pid @var{integer}
 Set the first PID for PMTs. Default is @code{0x1000}, minimum is @code{0x0020},
-maximum is @code{0x1ffa}.
+maximum is @code{0x1ffa}. This option has no effect in m2ts mode where the PMT
+PID is fixed @code{0x0100}.
 
 @item mpegts_start_pid @var{integer}
 Set the first PID for elementary streams. Default is @code{0x0100}, minimum is
-@code{0x0020}, maximum is @code{0x1ffa}.
+@code{0x0020}, maximum is @code{0x1ffa}. This option has no effect in m2ts mode
+where the elementary stream PIDs are fixed.
 
 @item mpegts_m2ts_mode @var{boolean}
 Enable m2ts mode if set to @code{1}. Default value is @code{-1} which
@@ -2228,6 +2308,11 @@ certain (usually permanent) errors the recovery is not attempted even when
 Specify whether to wait for the keyframe after recovering from
 queue overflow or failure. This option is set to 0 (false) by default.
 
+@item timeshift @var{duration}
+Buffer the specified amount of packets and delay writing the output. Note that
+@var{queue_size} must be big enough to store the packets for timeshift. At the
+end of the input the fifo buffer is flushed at realtime speed.
+
 @end table
 
 @subsection Examples