Skip to content

Commit

Permalink
Merge pull request #460 from kieranjol/gh-pages
Browse files Browse the repository at this point in the history
join files recipe - remove './' from example, fixes #457
  • Loading branch information
kieranjol authored May 12, 2022
2 parents 20cbf26 + aba38e0 commit 6303394
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1092,17 +1092,17 @@ <h2 id="join-trim">Join, trim, or create an excerpt</h2>
<div class="hiding">
<h5>Join files together</h5>
<p><code>ffmpeg -f concat -i mylist.txt -c copy <em>output_file</em></code></p>
<p>This command takes two or more files of the same file type and joins them together to make a single file. All that the program needs is a text file with a list specifying the files that should be joined. However, it only works properly if the files to be combined have the exact same codec and technical specifications. Be careful, FFmpeg may appear to have successfully joined two video files with different codecs, but may only bring over the audio from the second file or have other weird behaviors. Don’t use this command for joining files with different codecs and technical specs and always preview your resulting video file!</p>
<p>This command takes two or more files of the same file type and joins them together to make a single file. All that the program needs is a text file with a list specifying the files that should be joined. If possible, run the command from the same directory where the files and the text file reside. Otherwise you'll have to use <code>-safe 0</code>, see below for more information. However, it only works properly if the files to be combined have the exact same codec and technical specifications. Be careful, FFmpeg may appear to have successfully joined two video files with different codecs, but may only bring over the audio from the second file or have other weird behaviors. Don’t use this command for joining files with different codecs and technical specs and always preview your resulting video file!</p>
<dl>
<dt>ffmpeg</dt><dd>starts the command</dd>
<dt>-f concat</dt><dd>forces ffmpeg to concatenate the files and to keep the same file format</dd>
<dt>-i <em>mylist.txt</em></dt><dd>path, name and extension of the input file. Per the <a href="https://ffmpeg.org/ffmpeg-formats.html#Options" target="_blank">FFmpeg documentation</a>, it is preferable to specify relative rather than absolute file paths, as allowing absolute file paths may pose a security risk.<br>
This text file contains the list of files to be concatenated and should be formatted as follows:
This text file contains the list of files (without their absolute path) to be concatenated and should be formatted as follows:
<pre>
file '<em>./first_file.ext</em>'
file '<em>./second_file.ext</em>'
file '<em>first_file.ext</em>'
file '<em>second_file.ext</em>'
. . .
file '<em>./last_file.ext</em>'
file '<em>last_file.ext</em>'
</pre>
In the above, <strong>file</strong> is simply the word "file". Straight apostrophes ('like this') rather than curved quotation marks (‘like this’) must be used to enclose the file paths.<br>
<strong>Note:</strong> If specifying absolute file paths in the .txt file, add <code>-safe 0</code> before the input file.<br>
Expand Down

0 comments on commit 6303394

Please sign in to comment.