Added command for splitting into segments (segment muxer).

This commit is contained in:
Peter B 2017-05-17 18:53:04 +02:00
parent dc47dbc618
commit e12bbb0c6d

View File

@ -1560,6 +1560,38 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
</div>
<!-- ends Join files together -->
<!-- Split file into segments -->
<span data-toggle="modal" data-target="#segment_file"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Split one file into several smaller segments">Split file into segments</button></span>
<div id="segment_file" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="well">
<h3>Split file into segments</h3>
<p><code>ffmpeg -i <i>input_file</i> -c copy -map 0 -f segment -segment_time 60 -reset_timestamps 1 <i>output_file-%03d.mkv</i></code></p>
<dl>
<dt>ffmpeg</dt><dd>starts the command</dd>
<dt>-i <i>input_file</i></dt><dd>takes in a normal file</dd>
<dt>-c copy</dt><dd>use stream copy mode to re-mux instead of re-encode.</dd>
<dt>-map 0</dt><dd>Tells ffmpeg to map all streams of the input to the output.</dd>
<dt>-f segment</dt><dd>use <a href="http://www.ffmpeg.org/ffmpeg-formats.html#toc-segment_002c-stream_005fsegment_002c-ssegment">segment muxer</a> for generating the output.</dd>
<dt>-segment_time 60</dt><dd>Set duration of each segment (in seconds). This example creates segments with max. duration of 60s each.</dd>
<dt>-reset_timestamps 1</dt><dd>Reset timestamps of each segment to 0. Meant to ease the playback of the generated segments.</dd>
<dt><i>output_file-%03d.mkv</i></dt>
<dd>
path, name and extension of the output file.<br />
In order to have an incrementing number in each segment filename, FFmpeg supports <a href="http://www.cplusplus.com/reference/cstdio/printf/">printf-style</a> syntax for a counter.
In this example, '%03d' means: 3-digits, zero-padded<br />
For example: output_file-000.mkv, output_file-001.mkv, etc.
</dd>
</dl>
<p class="link"></p>
</div>
</div>
</div>
</div>
<!-- ends Join files together -->
<!-- Play image sequence -->
<span data-toggle="modal" data-target="#play_im_seq"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Play an image sequence directly as moving images">Play an image sequence</button></span>
<div id="play_im_seq" class="modal fade" tabindex="-1" role="dialog">