~ppsspp/ppsspp/ffmpeg

« back to all changes in this revision

Viewing changes to doc/muxers.texi

  • Committer: Henrik Rydgård
  • Date: 2014-01-03 10:44:32 UTC
  • Revision ID: git-v1:87c6c126784b1718bfa448ecf2e6a9fef781eb4e
Update our ffmpeg snapshot to a clone of the official repository.

This is because Maxim's at3plus support has been officially merged!

Show diffs side-by-side

added added

removed removed

Lines of Context:
146
146
 
147
147
See also the @ref{md5} muxer.
148
148
 
 
149
@anchor{gif}
 
150
@section gif
 
151
 
 
152
Animated GIF muxer.
 
153
 
 
154
It accepts the following options:
 
155
 
 
156
@table @option
 
157
@item loop
 
158
Set the number of times to loop the output. Use @code{-1} for no loop, @code{0}
 
159
for looping indefinitely (default).
 
160
 
 
161
@item final_delay
 
162
Force the delay (expressed in centiseconds) after the last frame. Each frame
 
163
ends with a delay until the next frame. The default is @code{-1}, which is a
 
164
special value to tell the muxer to re-use the previous delay. In case of a
 
165
loop, you might want to customize this value to mark a pause for instance.
 
166
@end table
 
167
 
 
168
For example, to encode a gif looping 10 times, with a 5 seconds delay between
 
169
the loops:
 
170
@example
 
171
ffmpeg -i INPUT -loop 10 -final_delay 500 out.gif
 
172
@end example
 
173
 
 
174
Note 1: if you wish to extract the frames in separate GIF files, you need to
 
175
force the @ref{image2} muxer:
 
176
@example
 
177
ffmpeg -i INPUT -c:v gif -f image2 "out%d.gif"
 
178
@end example
 
179
 
 
180
Note 2: the GIF format has a very small time base: the delay between two frames
 
181
can not be smaller than one centi second.
 
182
 
149
183
@anchor{hls}
150
184
@section hls
151
185
 
152
186
Apple HTTP Live Streaming muxer that segments MPEG-TS according to
153
 
the HTTP Live Streaming specification.
 
187
the HTTP Live Streaming (HLS) specification.
154
188
 
155
189
It creates a playlist file and numbered segment files. The output
156
190
filename specifies the playlist filename; the segment filenames
157
191
receive the same basename as the playlist, a sequential number and
158
192
a .ts extension.
159
193
 
 
194
For example, to convert an input file with @command{ffmpeg}:
160
195
@example
161
196
ffmpeg -i in.nut out.m3u8
162
197
@end example
163
198
 
 
199
See also the @ref{segment} muxer, which provides a more generic and
 
200
flexible implementation of a segmenter, and can be used to perform HLS
 
201
segmentation.
 
202
 
 
203
This muxer supports the following options:
 
204
 
164
205
@table @option
165
 
@item -hls_time @var{seconds}
166
 
Set the segment length in seconds.
167
 
@item -hls_list_size @var{size}
168
 
Set the maximum number of playlist entries.
169
 
@item -hls_wrap @var{wrap}
170
 
Set the number after which index wraps.
171
 
@item -start_number @var{number}
172
 
Start the sequence from @var{number}.
 
206
@item hls_time @var{seconds}
 
207
Set the segment length in seconds. Default value is 2.
 
208
 
 
209
@item hls_list_size @var{size}
 
210
Set the maximum number of playlist entries. If set to 0 the list file
 
211
will contain all the segments. Default value is 5.
 
212
 
 
213
@item hls_wrap @var{wrap}
 
214
Set the number after which the segment filename number (the number
 
215
specified in each segment file) wraps. If set to 0 the number will be
 
216
never wrapped. Default value is 0.
 
217
 
 
218
This option is useful to avoid to fill the disk with many segment
 
219
files, and limits the maximum number of segment files written to disk
 
220
to @var{wrap}.
 
221
 
 
222
@item start_number @var{number}
 
223
Start the playlist sequence number from @var{number}. Default value is
 
224
0.
 
225
 
 
226
Note that the playlist sequence number must be unique for each segment
 
227
and it is not to be confused with the segment filename sequence number
 
228
which can be cyclic, for example if the @option{wrap} option is
 
229
specified.
173
230
@end table
174
231
 
175
232
@anchor{ico}
386
443
 
387
444
See also the @ref{framemd5} muxer.
388
445
 
389
 
@section MOV/MP4/ISMV
 
446
@section mov/mp4/ismv
 
447
 
 
448
MOV/MP4/ISMV (Smooth Streaming) muxer.
390
449
 
391
450
The mov/mp4/ismv muxer supports fragmentation. Normally, a MOV/MP4
392
451
file has all the metadata about all packets stored in one location
612
671
overhead.
613
672
@end table
614
673
 
 
674
@anchor{segment}
615
675
@section segment, stream_segment, ssegment
616
676
 
617
677
Basic stream segmenter.
618
678
 
619
 
The segmenter muxer outputs streams to a number of separate files of nearly
 
679
This muxer outputs streams to a number of separate files of nearly
620
680
fixed duration. Output filename pattern can be set in a fashion similar to
621
681
@ref{image2}.
622
682
 
638
698
 
639
699
Optionally it can generate a list of the created segments, by setting
640
700
the option @var{segment_list}. The list type is specified by the
641
 
@var{segment_list_type} option.
 
701
@var{segment_list_type} option. The entry filenames in the segment
 
702
list are set by default to the basename of the corresponding segment
 
703
files.
 
704
 
 
705
See also the @ref{hls} muxer, which provides a more specific
 
706
implementation for HLS segmentation.
642
707
 
643
708
The segment muxer supports the following options:
644
709
 
670
735
Allow live-friendly file generation.
671
736
@end table
672
737
 
673
 
Default value is @code{samp}.
674
 
 
675
738
@item segment_list_size @var{size}
676
739
Update the list file so that it contains at most the last @var{size}
677
740
segments. If 0 the list file will contain all the segments. Default
678
741
value is 0.
679
742
 
 
743
@item segment_list_entry_prefix @var{prefix}
 
744
Set @var{prefix} to prepend to the name of each entry filename. By
 
745
default no prefix is applied.
 
746
 
680
747
@item segment_list_type @var{type}
681
748
Specify the format for the segment list file.
682
749
 
849
916
The slave outputs are specified in the file name given to the muxer,
850
917
separated by '|'. If any of the slave name contains the '|' separator,
851
918
leading or trailing spaces or any special character, it must be
852
 
escaped (see the ``Quoting and escaping'' section in the ffmpeg-utils
853
 
manual).
 
919
escaped (see @ref{quoting_and_escaping,,the "Quoting and escaping"
 
920
section in the ffmpeg-utils(1) manual,ffmpeg-utils}).
854
921
 
855
922
Muxer options can be specified for each slave by prepending them as a list of
856
923
@var{key}=@var{value} pairs separated by ':', between square brackets. If
865
932
 
866
933
@item bsfs[/@var{spec}]
867
934
Specify a list of bitstream filters to apply to the specified
868
 
output. It is possible to specify to which streams a given bitstream
869
 
filter applies, by appending a stream specifier to the option
870
 
separated by @code{/}. If the stream specifier is not specified, the
 
935
output.
 
936
 
 
937
It is possible to specify to which streams a given bitstream filter
 
938
applies, by appending a stream specifier to the option separated by
 
939
@code{/}. @var{spec} must be a stream specifier (see @ref{Format
 
940
stream specifiers}).  If the stream specifier is not specified, the
871
941
bistream filters will be applied to all streams in the output.
872
942
 
873
943
Several bitstream filters can be specified, separated by ",".
899
969
ffmpeg -i ... -map 0 -flags +global_header -c:v libx264 -c:a aac -strict experimental
900
970
       -f tee "[bsfs/v=dump_extra]out.ts|[movflags=+faststart]out.mp4|[select=a]out.aac"
901
971
@end example
 
972
 
 
973
@item
 
974
As below, but select only stream @code{a:1} for the audio output. Note
 
975
that a second level escaping must be performed, as ":" is a special
 
976
character used to separate options.
 
977
@example
 
978
ffmpeg -i ... -map 0 -flags +global_header -c:v libx264 -c:a aac -strict experimental
 
979
       -f tee "[bsfs/v=dump_extra]out.ts|[movflags=+faststart]out.mp4|[select=\'a:1\']out.aac"
 
980
@end example
902
981
@end itemize
903
982
 
904
983
Note: some codecs may need different options depending on the output format;