Compare commits

...

35 Commits

Author SHA1 Message Date
Andrew Weaver
f771ff3816 Merge pull request #354 from amiaopensource/weaver-branch
CDDA Emphasis
2018-11-15 09:45:47 -08:00
Weaver
db219e201c cleaning 2018-11-15 09:08:04 -08:00
Andrew Weaver
a727aa7d5c check for cd emph 2018-11-14 14:54:17 -08:00
Andrew Weaver
5f7a01e920 cd de-emph 2018-11-14 14:02:28 -08:00
Ashley
76a93b7211 Merge pull request #353 from amiaopensource/ab/add-get-checksum-on-streams
Add get checksum on streams
2018-11-09 11:52:13 -05:00
Ashley Blewer
e431fbb3c5 Add space between Note and the note in Create stream md5s 2018-11-09 08:47:18 -05:00
Ashley Blewer
14e66c13db Add command for getting checksum from stream 2018-11-09 08:46:56 -05:00
Ashley
2d14e3266b Merge pull request #350 from amiaopensource/ablwr-patch-1
rm "optionally" for Matroska-specific description
2018-11-07 13:36:36 -05:00
Ashley
7615c872e4 rm "optionally" for Matroska-specific description 2018-11-07 13:30:35 -05:00
Andrew Weaver
de039c667b Merge pull request #349 from amiaopensource/more-cdda
More cdda
2018-10-29 13:55:10 -07:00
Andrew Weaver
b2233fe170 quotes - thank you Reto! 2018-10-28 12:40:57 -07:00
Andrew Weaver
6d74c84cc5 remove rogue closing tag 2018-10-26 08:39:07 -07:00
Andrew Weaver
4caca0a698 add note about XLD GUI 2018-10-25 16:58:37 -07:00
Andrew Weaver
6ec07fd3dd add cdparanoia 2018-10-25 16:37:20 -07:00
Weaver
5e059adfb2 suggestions
simpler command/order
2018-10-17 14:00:45 -07:00
Andrew Weaver
06501bc8bd start offset section 2018-10-15 20:44:41 -07:00
Andrew Weaver
ac4a14c54f add notes to cdda2wav 2018-10-11 16:40:28 -07:00
Ashley
dbf59f919a Merge pull request #347 from bturkus/patch-1
small codec default addition
2018-10-02 11:41:08 -04:00
bturkus
4e75f3f540 small codec default addition
for @ablwr. I did something! MXF
2018-10-02 11:39:05 -04:00
Ashley
387876676d Merge pull request #346 from amiaopensource/cdda-to-toc
add CDDA to ToC #340
2018-10-02 09:25:02 -04:00
Ashley
05e2775d49 close div 2018-10-01 11:44:23 -04:00
Ashley
ba1d2757c6 add CDDA to ToC #340 2018-10-01 10:19:13 -04:00
Ashley
150faff29d Merge pull request #345 from amiaopensource/cdda
add cdda2wav
2018-09-30 12:42:45 -04:00
Andrew Weaver
ff1871273f typos! 2018-09-29 11:21:43 -07:00
Andrew Weaver
36da6d3e79 add cdda2wav 2018-09-28 16:35:11 -07:00
Reto Kromer
d00d9f91de Merge pull request #344 (delete not needed tags) 2018-09-27 22:19:39 +02:00
Reto Kromer
a948b1519b delete not needed tags 2018-09-27 21:49:56 +02:00
Andrew Weaver
33d3a4d10d Merge pull request #343 from amiaopensource/add-div
add closing tag
2018-09-27 11:57:51 -07:00
Weaver
b88cbbd248 add closing tag 2018-09-27 11:24:23 -07:00
Ashley
982a1a6525 Merge pull request #341 from amiaopensource/fix_typo
fix typos
2018-09-27 11:26:50 -04:00
Reto Kromer
ec5e7621b5 other typo 2018-09-27 12:55:13 +02:00
Reto Kromer
6a0a70d1d5 fix typo 2018-09-27 12:46:22 +02:00
Ashley
6b24940df1 Merge pull request #339 from amiaopensource/weaver
Add fast start note
2018-09-19 17:11:04 -04:00
Weaver
e08ec96fd9 add note for +faststart 2018-09-19 13:57:48 -07:00
Weaver
42cacd8414 change to reflect aac transcode 2018-09-19 13:43:50 -07:00

View File

@@ -38,9 +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 &amp; 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">
@@ -79,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>
@@ -119,6 +119,7 @@
<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>
@@ -197,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>
@@ -293,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>
@@ -303,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>
@@ -361,7 +367,7 @@
<dt>-slicecrc 1</dt><dd>Adds CRC information for each slice. This makes it possible for a decoder to detect errors in the bitstream, rather than blindly decoding a broken slice. (Read more <a href="http://ndsr.nycdigital.org/diving-in-head-first/" target="_blank">here</a>).</dd>
<dt>-slices 16</dt><dd>Each frame is split into 16 slices. 16 is a good trade-off between filesize and encoding time.</dd>
<dt>-c:a copy</dt><dd>copies all mapped audio streams.</dd>
<dt><em>output_file</em>.mkv</dt><dd>path and name of the output file. Use the <code>.mkv</code> extension to save your file in a Matroska container. Optionally, choose a different extension if you want a different container, such as <code>.mov</code> or <code>.avi</code>.</dd>
<dt><em>output_file</em>.mkv</dt><dd>path and name of the output file. Use the <code>.mkv</code> extension to save your file in a Matroska container.</dd>
<dt>-f framemd5</dt><dd>Decodes video with the framemd5 muxer in order to generate MD5 checksums for every frame of your input file. This allows you to verify losslessness when compared against the framemd5s of the output file.</dd>
<dt>-an</dt><dd>ignores the audio stream when creating framemd5 (audio no)</dd>
<dt><em>framemd5_output_file</em></dt><dd>path, name and extension of the framemd5 file.</dd>
@@ -728,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>
@@ -877,6 +883,23 @@
</div>
<!-- ends RIAA equalization -->
<!-- CD De-emphasis -->
<label class="recipe" for="cd_eq">Reverse CD Pre-Emphasis</label>
<input type="checkbox" id="cd_eq">
<div class="hiding">
<h3>Reverse CD Pre-Emphasis</h3>
<p><code>ffmpeg -i <em>input_file</em> -af aemphasis=type=cd <em>output_file</em></code></p>
<p>This will apply de-emphasis to reverse the effects of CD pre-emphasis in the somewhat rare case of CDs that were created with this technology. Use this command to create more accurate listening copies of files that were ripped 'flat' (without any de-emphasis) where the original source utilized emphasis. For more information about CD pre-emphasis see the <a href="https://wiki.hydrogenaud.io/index.php?title=Pre-emphasis" target="_blank">Hydrogen Audio page</a> on this subject.</p>
<dl>
<dt>ffmpeg</dt><dd>starts the command</dd>
<dt><em>input_file</em></dt><dd>path, name and extension of the input file</dd>
<dt>-af aemphasis=type=cd</dt><dd>activates the aemphasis filter and sets it to use CD equalization</dd>
<dt><em>output_file</em></dt><dd>path and name of output file</dd>
</dl>
<p class="link"></p>
</div>
<!-- CD De-emphasis -->
<!-- one pass loudnorm -->
<label class="recipe" for="loudnorm_one_pass">One Pass Loudness Normalization</label>
<input type="checkbox" id="loudnorm_one_pass">
@@ -1850,11 +1873,30 @@
<dt>-c:a copy</dt><dd>ensures that FFmpeg will not transcode the audio to a different codec before generating the MD5 (by default FFmpeg will use 16 bit PCM for audio MD5s).</dd>
<dt><em>output_file_2</em></dt><dd>is the output file for the audio stream MD5.</dd>
</dl>
<p><strong>Note:</strong>The MD5s generated by running this command on WAV files are compatible with those embedded by the <a href="https://mediaarea.net/BWFMetaEdit" target="_blank">BWF MetaEdit</a> tool and can be compared.</p>
<p><strong>Note:</strong> The MD5s generated by running this command on WAV files are compatible with those embedded by the <a href="https://mediaarea.net/BWFMetaEdit" target="_blank">BWF MetaEdit</a> tool and can be compared.</p>
<p class="link"></p>
</div>
<!-- ends Create stream md5s -->
<!-- Get checksum for video/audio stream -->
<label class="recipe" for="get_stream_checksum">Get checksum for video/audio stream</label>
<input type="checkbox" id="get_stream_checksum">
<div class="hiding">
<h3>Get checksum for video/audio stream</h3>
<p><code>ffmpeg -loglevel error -i <em>input_file</em> -map 0:v:0 -f hash -hash md5 -</code></p>
<p>This script will perform a fixity check on a specified audio or video stream of the file, useful for checking that the content within a video has not changed even if the container format has changed.</p>
<dl>
<dt>ffmpeg</dt><dd>starts the command</dd>
<dt>-loglevel error</dt><dd>sets the verbosity of logging to show all errors</dd>
<dt>-i <em>input_file</em></dt><dd>path, name and extension of the input file</dd>
<dt>-map 0:v:0</dt><dd>designated the first video stream as the stream on which to perform this hash generation operation. <code>-map 0</code> can be used to run the operation on all streams.</dd>
<dt>-f hash -hash md5</dt><dd>produce a checksum hash, and set the hash algorithm to md5. See the official <a href="https://ffmpeg.org/ffmpeg-formats.html#hash">documentation on hash</a> for other algorithms.</dd>
<dt>-</dt><dd>FFmpeg syntax requires a specified output, and <code>-</code> is just a place holder. No file is actually created.</dd>
</dl>
<p class="link"></p>
</div>
<!-- ends Get checksum for video/audio stream -->
<!-- QCTools Report -->
<label class="recipe" for="qctools">QCTools report (with audio)</label>
<input type="checkbox" id="qctools">
@@ -2396,6 +2438,81 @@
</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 -->
<!-- Check for CD Emphasis -->
<label class="recipe" for="cd-emph-check">Check/Compensate for CD Emphasis</label>
<input type="checkbox" id="cd-emph-check">
<div class="hiding">
<h3>Check/Compensate for CD Emphasis</h3>
<p>While somewhat rare, certain CDs had 'emphasis' applied as a form of noise reduction. This seems to mostly affect early (1980s) era CDs and some CDs pressed in Japan. Emphasis is part of the <a href="https://en.wikipedia.org/wiki/Compact_Disc_Digital_Audio#Standard">Red Book standard</a> and, if present, must be compensated for to ensure accurate playback. CDs that use emphasis contain flags on tracks that tell the CD player to de-emphasize the audio on playback. When ripping a CD with emphasis, it is important to take this into account and either apply de-emphasis while ripping, or if storing a 'flat' copy, create another de-emphasized listening copy.</p>
<p>The following commands will output information about the presence of emphasis when run on a target CD:</p>
<p><strong>Cdda2wav:</strong> <code>cdda2wav -J</code></p>
<p><strong>CD Paranoia:</strong> <code>cdparanoia -Q</code></p>
<p>In order to compensate for emphasis during ripping while using Cdda2wav, the <code>-T</code> flag can be added to the <a href="#cdda2wav">standard ripping command</a>. For a recipe to compensate for a flat rip, see the section on <a href="#cd_eq">de-emphasizing with FFmpeg</a>.
<p class="link"></p>
</div>
<!-- Check for CD Emphasis -->
</div>
<!-- ends CDDA Tools -->
<div class="well">
<h2 id="imagemagick">ImageMagick</h2>
@@ -2443,7 +2560,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>
@@ -2543,6 +2660,7 @@
<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" -->