Merge pull request #189 from pjotrek-b/gh-pages

Added command for splitting into segments (segment muxer).
This commit is contained in:
Reto Kromer 2017-05-18 10:30:45 +02:00 committed by GitHub
commit cc724200d1

View File

@ -1693,6 +1693,48 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
</div> </div>
<!-- ends Join files together --> <!-- 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>
<p>
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.
</p>
<p>
In this example, '%03d' means: 3-digits, zero-padded<br>
Examples:
<ul>
<li><code>%03d</code>: 000, 001, 002, ... 999</li>
<li><code>%05d</code>: 00000, 00001, 00002, ... 99999</li>
<li><code>%d</code>: 0, 1, 2, 3, 4, ... 23, 24, etc. </li>
</ul>
</p>
</dd>
</dl>
<p class="link"></p>
</div>
</div>
</div>
</div>
<!-- ends Split file into segments -->
<!-- Play image sequence --> <!-- 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> <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"> <div id="play_im_seq" class="modal fade" tabindex="-1" role="dialog">