mirror of
https://github.com/amiaopensource/ffmprovisr.git
synced 2025-10-21 21:29:18 +02:00
Compare commits
31 Commits
v2018-07-2
...
v2018-11-0
Author | SHA1 | Date | |
---|---|---|---|
|
de039c667b | ||
|
b2233fe170 | ||
|
6d74c84cc5 | ||
|
4caca0a698 | ||
|
6ec07fd3dd | ||
|
5e059adfb2 | ||
|
06501bc8bd | ||
|
ac4a14c54f | ||
|
dbf59f919a | ||
|
4e75f3f540 | ||
|
387876676d | ||
|
05e2775d49 | ||
|
ba1d2757c6 | ||
|
150faff29d | ||
|
ff1871273f | ||
|
36da6d3e79 | ||
|
d00d9f91de | ||
|
a948b1519b | ||
|
33d3a4d10d | ||
|
b88cbbd248 | ||
|
982a1a6525 | ||
|
ec5e7621b5 | ||
|
6a0a70d1d5 | ||
|
6b24940df1 | ||
|
e08ec96fd9 | ||
|
42cacd8414 | ||
|
d6ab2d63bb | ||
|
c3ff180189 | ||
|
ac22e3e361 | ||
|
963e0591e5 | ||
|
1bf462820e |
124
index.html
124
index.html
@@ -38,7 +38,9 @@
|
||||
<a href="#perceptual-similarity"><div class="contents-list">Compare similarity of videos</div></a>
|
||||
<a href="#other"><div class="contents-list">Something else</div></a>
|
||||
<a href="#similar-tools"><div class="contents-list">Similar tools: tips & tricks</div></a>
|
||||
<a href="#cdda"><div class="contents-list">CDDA (Audio CD) Ripping Tools</div></a>
|
||||
<a href="#imagemagick"><div class="contents-list">ImageMagick</div></a>
|
||||
<a href="#flac-tool"><div class="contents-list">flac tool</div></a>
|
||||
</nav>
|
||||
|
||||
<div class="content">
|
||||
@@ -77,7 +79,7 @@
|
||||
<p>A very basic FFmpeg command looks like this:</p>
|
||||
<dl>
|
||||
<dt>ffmpeg</dt><dd>starts the command</dd>
|
||||
<dt>-i <em>input_file.ext</em></dt><dd>path and name of the input file<br></dd>
|
||||
<dt>-i <em>input_file.ext</em></dt><dd>path and name of the input file</dd>
|
||||
<dt><em>-flag some_action</em></dt><dd>tell FFmpeg to do something, by supplying a valid flag and action</dd>
|
||||
<dt><em>output_file.ext</em></dt><dd>path and name of the output file.<br>
|
||||
Because this is the last part of the command, the filename you type here does not have a flag designating it as the output file.</dd>
|
||||
@@ -104,6 +106,25 @@
|
||||
<div class="well">
|
||||
|
||||
<h2 id="concepts">Learn about more advanced FFmpeg concepts</h2>
|
||||
<!-- Codec Defaults explanation -->
|
||||
<label class="recipe" for="codec-defaults">Codec defaults</label>
|
||||
<input type="checkbox" id="codec-defaults">
|
||||
<div class="hiding">
|
||||
<h3>Codec Defaults</h3>
|
||||
<p>Unless specified, FFmpeg will automatically set codec choices and codec parameters based off of internal defaults. These defaults are applied based on the file type used in the output (for example <code>.mov</code> or <code>.wav</code>).</p>
|
||||
<p>When creating or transcoding files with FFmpeg, it is important to consider codec settings for both audio and video, as the default options may not be desirable in your particular context. The following is a brief list of codec defaults for some common file types:</p>
|
||||
<ul>
|
||||
<li><code>.avi</code>: Audio Codec: mp3, Video Codec: mpeg4</li>
|
||||
<li><code>.mkv</code>: Audio Codec: ac3, Video Codec: h.264</li>
|
||||
<li><code>.mov</code>: Audio Codec: aac, Video Codec: h.264</li>
|
||||
<li><code>.mp4</code>: Audio Codec: aac, Video Codec: h.264</li>
|
||||
<li><code>.mpg</code>: Audio Codec: mp2, Video Codec: mpeg1video</li>
|
||||
<li><code>.mxf</code>: Audio Codec: pcm_s16le, Video Codec: mpeg2video</li>
|
||||
<li><code>.wav</code>: Audio Codec: pcm_s16le (16 bit PCM)</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- End Codec Defaults -->
|
||||
|
||||
<!-- Filtergraph explanation -->
|
||||
<label class="recipe" for="filtergraphs">Filtergraphs</label>
|
||||
<input type="checkbox" id="filtergraphs">
|
||||
@@ -177,7 +198,7 @@
|
||||
<p><strong>Note:</strong> rewrapping is also known as remuxing, short for re-multiplexing.</p>
|
||||
<dl>
|
||||
<dt>ffmpeg</dt><dd>starts the command</dd>
|
||||
<dt>-i <em>input_file.ext</em></dt><dd>path and name of the input file<br></dd>
|
||||
<dt>-i <em>input_file.ext</em></dt><dd>path and name of the input file</dd>
|
||||
<dt>-c copy</dt><dd>copy the streams directly, without re-encoding.</dd>
|
||||
<dt>-map 0</dt><dd>map all streams of the input to the output.<br>
|
||||
By default, FFmpeg will only map one stream of each type (video, audio, subtitles) to the output file. However, files may have multiple streams of a given type - for example, a video may have several audio tracks for different languages. Therefore, if you want to preserve all the streams in the original, it's necessary to use this option.</dd>
|
||||
@@ -273,7 +294,7 @@
|
||||
<div class="hiding">
|
||||
<h3>Transcode to H.264</h3>
|
||||
<p><code>ffmpeg -i <em>input_file</em> -c:v libx264 -pix_fmt yuv420p -c:a aac <em>output_file</em></code></p>
|
||||
<p>This command takes an input file and transcodes it to H.264 with an .mp4 wrapper, keeping the audio the same codec as the original. The libx264 codec defaults to a “medium” preset for compression quality and a CRF of 23. CRF stands for constant rate factor and determines the quality and file size of the resulting H.264 video. A low CRF means high quality and large file size; a high CRF means the opposite.</p>
|
||||
<p>This command takes an input file and transcodes it to H.264 with an .mp4 wrapper, audio is transcoded to AAC. The libx264 codec defaults to a “medium” preset for compression quality and a CRF of 23. CRF stands for constant rate factor and determines the quality and file size of the resulting H.264 video. A low CRF means high quality and large file size; a high CRF means the opposite.</p>
|
||||
<dl>
|
||||
<dt>ffmpeg</dt><dd>starts the command</dd>
|
||||
<dt>-i <em>input_file</em></dt><dd>path, name and extension of the input file</dd>
|
||||
@@ -283,6 +304,11 @@
|
||||
AAC is the codec most often used for audio streams within an .mp4 container.</dd>
|
||||
<dt><em>output_file</em></dt><dd>path, name and extension of the output file</dd>
|
||||
</dl>
|
||||
<p>In order to optimize the file for streaming, you can add this preset:</p>
|
||||
<p><code>ffmpeg -i <em>input_file</em> -c:v libx264 -pix_fmt yuv420p -c:a aac -movflags +faststart <em>output_file</em></code></p>
|
||||
<dl>
|
||||
<dt>-movflags +faststart</dt><dd>This tells FFmpeg to move some of the essential metadata to the start of the file, which permits starting viewing before the file finishes downloading (an ideal characteristic for streaming).</dd>
|
||||
</dl>
|
||||
<p>In order to use the same basic command to make a higher quality file, you can add some of these presets:</p>
|
||||
<p><code>ffmpeg -i <em>input_file</em> -c:v libx264 -pix_fmt yuv420p -preset veryslow -crf 18 -c:a aac <em>output_file</em></code></p>
|
||||
<dl>
|
||||
@@ -708,7 +734,7 @@
|
||||
<dl>
|
||||
<dt>ffmpeg</dt><dd>starts the command</dd>
|
||||
<dt>-i <em>input_file</em></dt><dd>path, name and extension of the input file</dd>
|
||||
<dt>-c copy</dt><dd>Usings stream copy for all streams</dd>
|
||||
<dt>-c copy</dt><dd>Using stream copy for all streams</dd>
|
||||
<dt>-map 0</dt><dd>tells FFmpeg to map all streams of the input to the output.</dd>
|
||||
<dt>-aspect DAR_NUM:DAR_DEN</dt><dd>Replace DAR_NUM with the display aspect ratio numerator and DAR_DEN with the display aspect ratio denominator, such as <em>-aspect 4:3</em> or <em>-aspect 16:9</em>.</dd>
|
||||
<dt><em>output_file</em></dt><dd>path, name and extension of the output file</dd>
|
||||
@@ -2376,6 +2402,67 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="well">
|
||||
<h2 id="cdda">CDDA (Audio CD) Ripping Tools</h2>
|
||||
<!-- Find Drive Offset for Exact CD Ripping -->
|
||||
<label class="recipe" for="find-offset">Find Drive Offset for Exact CD Ripping</label>
|
||||
<input type="checkbox" id="find-offset">
|
||||
<div class="hiding">
|
||||
<h3>Find Drive Offset for Exact CD Ripping</h3>
|
||||
<p>If you want to make CD rips that can be verified via checksums to other rips of the same content, you need to know the offset of your CD drive. Put simply, different models of CD drives have different offsets, meaning they start reading in slightly different locations. This must be compensated for in order for files created on different (model) drives to generate the same checksum. For a more detailed explanation of drive offsets see the explanation <a href="http://dbpoweramp.com/spoons-audio-guide-cd-ripping.htm">here.</a> In order to find your drive offset, first you will need to know exactly what model your drive is, then you can look it up in the list of drive offsets by Accurate Rip.</p>
|
||||
<p>Often it can be difficult to tell what model your drive is simply by looking at it - it may be housed inside your computer or have external branding that is different from the actual drive manufacturer. For this reason, it can be useful to query your drive with CD ripping software in order to ID it. The following commands should give you a better idea of what drive you have.</p>
|
||||
<p><strong>Cdda2wav:</strong> <code>cdda2wav -scanbus</code> or simply <code>cdda2wav</code></p>
|
||||
<p><strong>CD Paranoia:</strong> <code>cdparanoia -vsQ</code></p>
|
||||
<p>Once you have IDed your drive, you can search the <a href="http://www.accuraterip.com/driveoffsets.htm">Accurate Rip CD drive offset list</a> to find the correct offset for your drive as sourced by the community.</p>
|
||||
<p><strong>Note:</strong> A very effective GUI based tool (macOS specific) for both for discovering drive offset as well as accurately ripping CDDAs is <a href="https://tmkk.undo.jp/xld/index_e.html">XLD</a>. Instructions for calibrating XLD can be found at <a href="https://wiki.hydrogenaud.io/index.php?title=XLD_Configuration">this page</a>.</p>
|
||||
<p class="link"></p>
|
||||
</div>
|
||||
<!-- Find Drive Offset for Exact CD Ripping -->
|
||||
|
||||
<!-- Rip with CD Paranoia -->
|
||||
<label class="recipe" for="cdparanoia">Rip a CD with CD Paranoia</label>
|
||||
<input type="checkbox" id="cdparanoia">
|
||||
<div class="hiding">
|
||||
<h3>Rip a CD with CD Paranoia</h3>
|
||||
<p><code>cdparanoia -L -B -O <em>[Drive Offset]</em> <em>[Starting Track Number]</em>-<em>[Ending Track Number]</em> <em>output_file.wav</em></code></p>
|
||||
<p>This command will use CD Paranoia to rip a CD into separate tracks while compensating for the sample offset of the CD drive. (For more information about drive offset see <a href="#find-offset">the related ffmprovisr command.</a>)</p>
|
||||
<dl>
|
||||
<dt>cdparanoia</dt><dd>begins the cdparanoia command.</dd>
|
||||
<dt>-L</dt><dd>creates verbose logfile.</dd>
|
||||
<dt>-B</dt><dd>puts CD Paranoia into 'batch' mode, which will automatically split tracks into separate files.</dd>
|
||||
<dt>-O [Drive Offset]</dt><dd>allows you to specify the sample offset of your drive. Skip this flag to rip without offset correction.</dd>
|
||||
<dt>[Starting Track Number]-[Ending Track Number]</dt><dd>specifies which tracks to write. For example <code>1-4</code> would rip tracks one through four.</dd>
|
||||
<dt><em>output_file.wav</em></dt><dd>the desired name for your output file(s) (for example the CD name). CD Paranoia will prepend this with track numbers.</dd>
|
||||
</dl>
|
||||
<p class="link"></p>
|
||||
</div>
|
||||
<!-- ends Rip with CD Paranoia -->
|
||||
|
||||
<!-- Rip with CDDA2WAV -->
|
||||
<label class="recipe" for="cdda2wav">Rip a CD with Cdda2wav</label>
|
||||
<input type="checkbox" id="cdda2wav">
|
||||
<div class="hiding">
|
||||
<h3>Rip a CD with Cdda2wav</h3>
|
||||
<p><code>cdda2wav -L0 -t all -cuefile -paranoia paraopts=retries=200,readahead=600,minoverlap=sectors-per-request-1 -verbose-level all <em>output.wav</em></code></p>
|
||||
<p>Cdda2wav is a tool that uses the <a href="https://www.xiph.org/paranoia/">Paranoia library</a> to facilitate accurate ripping of audio CDs (CDDA). It can be installed via Homebrew with the command <code> brew install cdrtools</code>. This command will accurately rip an audio CD into a single wave file, while querying the CDDB database for track information and creating a cue sheet. This cue sheet can then be used either for playback of the WAV file or to split it into individual access files. Any <a href="https://en.wikipedia.org/wiki/CD-Text">cdtext</a> information that is discovered will be stored as a sidecar. For more information about cue sheets see <a href="https://en.wikipedia.org/wiki/Cue_sheet_(computing)">this Wikipedia article.</a></p>
|
||||
<p><strong>Notes: </strong>On macOS the CD must be unmounted before this command is run. This can be done with the command <code>sudo umount '/Volumes/Name_of_CD'</code></p>
|
||||
<p>As of writing, when using the default Homebrew installed version of Cdda2wav some drives will falsely report errors on all rips. If this is occurring, a possible solution is to use the command <code>brew install --devel cdrtools</code> to install a more recent build that incorporates a fix.</p>
|
||||
<dl>
|
||||
<dt>cdda2wav</dt><dd>begins the Cdda2wav command</dd>
|
||||
<dt>-L0</dt><dd>tells Cdda2wav to query the CDDB database for track name information. L0 is 'interactive mode' meaning Cdda2wav will ask you to confirm choices in the event of multiple matches. Change this to <code>-L1</code> to automatically select the first database match.</dd>
|
||||
<dt>-t all</dt><dd>tells Cdda2wav to rip the entire CD to one file</dd>
|
||||
<dt>-cuefile</dt><dd>tells Cdda2wav to create a cue file of CD contents</dd>
|
||||
<dt>-paranoia</dt><dd>enables the Paranoia library for ripping</dd>
|
||||
<dt>paraopts=retries=200,readahead=600,minoverlap=sectors-per-request-1</dt><dd>configures ripping to a generically conservative setting for retries and caching. These values were taken from the Cdda2wav man file and can be changed depending on needs, such as for more/less retry attempts. For more information see the Cdda2wav man file (also available online <a href="https://linux.die.net/man/1/cdda2wav">here)</a>.</dd>
|
||||
<dt>-verbose-level all</dt><dd>sets terminal information to the most verbose view</dd>
|
||||
<dt><em>output.wav</em></dt><dd>the desired name for your output file (for example the CD name).</dd>
|
||||
</dl>
|
||||
<p class="link"></p>
|
||||
</div>
|
||||
<!-- ends Rip with CDDA2WAV -->
|
||||
</div>
|
||||
<!-- ends CDDA Tools -->
|
||||
|
||||
<div class="well">
|
||||
<h2 id="imagemagick">ImageMagick</h2>
|
||||
|
||||
@@ -2423,7 +2510,7 @@
|
||||
<dt>-quality 75</dt><dd>sets quality to 75 (out of 100), adding light compression to smaller files</dd>
|
||||
<dt>-path thumbs</dt><dd>specifies where to save the thumbnails -- this goes to a folder within the active folder called "thumbs".<br>
|
||||
Note: You will have to make this folder if it doesn't already exist.</dd>
|
||||
<dt><em>*.jpg</em></dt><dd>The astericks acts as a "wildcard" to be applied to every file in the directory.</dd>
|
||||
<dt><em>*.jpg</em></dt><dd>The asterisk acts as a "wildcard" to be applied to every file in the directory.</dd>
|
||||
</dl>
|
||||
<p class="link"></p>
|
||||
</div>
|
||||
@@ -2498,8 +2585,33 @@
|
||||
<p class="link"></p>
|
||||
</div>
|
||||
<!-- ends Resize to width -->
|
||||
|
||||
</div>
|
||||
<div class="well">
|
||||
<h2 id="flac">flac</h2>
|
||||
<!-- flac tool -->
|
||||
<label class="recipe" for="flac-tool">Transcoding to/from FLAC</label>
|
||||
<input type="checkbox" id="flac-tool">
|
||||
<div class="hiding">
|
||||
<h3>About flac tool</h3>
|
||||
<p>The flac tool is the tool created by the FLAC project to transcode to/from FLAC and to manipulate metadata in FLAC files. One advantage it has over other tools used to transcode into FLAC is the capability of embedding foreign metadata (such as BWF metadata). This means that it is possible to compress a BWF file into FLAC and maintain the ability to transcode back into an identical BWF, metadata and all. For a more detailed explanation, see <a href="http://dericed.com/2013/flac-in-the-archives/" target="_blank">Dave Rice's article</a> on the topic, from which the following commands are adapted.</p>
|
||||
<h3>Transcode to FLAC</h3>
|
||||
<p>Use this command to transcode from WAV to FLAC while maintaining BWF metadata</p>
|
||||
<p><code>flac --best --keep-foreign-metadata --preserve-modtime --verify <em>input.wav</em></code></p>
|
||||
<dl>
|
||||
<dt>flac</dt><dd>starts the command</dd>
|
||||
<dt>-i <em>input_file.ext</em></dt><dd>path and name of the input file</dd>
|
||||
<dt>--best</dt><dd>sets the file for the most efficient compression (resulting in a smaller file at the expense of a slower process).</dd>
|
||||
<dt>--keep-foreign-metadata</dt><dd>tells the flac tool to maintain original metadata within the FLAC file.</dd>
|
||||
<dt>--preserve-modtime</dt><dd>preserves the file timestamps of the input file.</dd>
|
||||
<dt>--verify</dt><dd>verifies the validity of the output file.</dd>
|
||||
</dl>
|
||||
<h3>Transcode from FLAC</h3>
|
||||
<p>Use this command to transcode from FLAC to reconstruct original BWF file. Command is the same as the prior command with the exception of substituting <code>--decode</code> for <code>best</code> and changing the input to a <code>.flac</code> file.</p>
|
||||
<p><code>flac --decode --keep-foreign-metadata --preserve-modtime --verify <em>input.flac</em></code></p>
|
||||
<p class="link"></p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End About flac -->
|
||||
</div><!-- ends "content" -->
|
||||
|
||||
<!-- sample example -->
|
||||
|
Reference in New Issue
Block a user