Compare commits

...

3 Commits

Author SHA1 Message Date
Andrew Weaver
18e2c17ab4 Script to open ffmprovisr when installed via homebrew (#181)
- script for opening ffmprovisr from terminal
2017-05-05 17:37:50 +02:00
Andrew Weaver
e4309d6664 add audio bitscope (#180)
* add audio bitscope

* alphabetical

* ch ch ch ch changes
2017-05-04 19:58:24 +02:00
Andrew Weaver
750810d392 Loudness/RIAA Curve (#179)
- start normalization section
- add RIAA
2017-05-03 04:58:20 +02:00
3 changed files with 151 additions and 0 deletions

BIN
img/16_32_abitscope.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 KiB

View File

@@ -631,6 +631,32 @@
<div class="well">
<h4>Filters</h4>
<!-- abitscope -->
<span data-toggle="modal" data-target="#abitscope"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Audio Bitscope">Audio Bitscope</button></span>
<div id="abitscope" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="well">
<h3>Creates a visualization of the bits in an audio stream</h3>
<p><code>ffplay -f lavfi "amovie=<i>input_file</i>,asplit=2[out1][a],[a]abitscope=colors=purple|yellow[out0]"</code></p>
<p>This filter allows visual analysis of the information held in various bit depths of an audio stream. This can aid with identifying when a file that is nominally of a higher bit depth actually has been 'padded' with null information. The provided GIF shows a 16 bit WAV file (left) and then the results of converting that same WAV to 32 bit (right). Note that in the 32 bit version, there is still only information in the first 16 bits.</p>
<dl>
<dt>ffplay -f lavfi</dt><dd>starts the command and tells ffplay that you will be using the lavfi virtual device to create the input</dd>
<dt>amovie=<i>input_file</i></dt><dd>path, name and extension of the input file</dd>
<dt>asplit=2[out1][a]</dt><dd>splits the audio stream in two. One of these [a] will be passed to the filter, and the other [out1] will be the audible stream.</dd>
<dt>[a]abitscope=colors=purple|yellow[out0]</dt><dd>sends stream [a] into the abitscope filter, sets the colors for the channels to purple and yellow, and outputs the results to [out0]. This is what will be the visualization.</dd>
</dl>
<div class="sample-image">
<h4>Comparison of mono 16 bit and mono 16 bit padded to 32 bit.</h4>
<img src="img/16_32_abitscope.gif" alt="bit_scope_comparison">
</div>
<p class="link"></p>
</div>
</div>
</div>
</div>
<!-- ends abitscope -->
<!-- astats -->
<span data-toggle="modal" data-target="#astats"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Play a graphical output showing decibel levels of an input file">Graphic for audio</button></span>
<div id="astats" class="modal fade" tabindex="-1" role="dialog">
@@ -1081,6 +1107,112 @@
<!-- ends append notice to access mp3 -->
</div>
<div class="well">
<h4>Normalize/Equalize Audio</h4>
<!-- loudnorm metadata -->
<span data-toggle="modal" data-target="#loudnorm_metadata"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Calculate Loudness Levels">Calculate Loudness Levels</button></span>
<div id="loudnorm_metadata" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="well">
<h3>Calculate Loudness Levels</h3>
<p><code>ffmpeg -i <i>input_file</i> -af loudnorm=print_format=json -f null -</code></p>
<p>This filter calculates and outputs loudness information in json about an input file (labeled input) as well as what the levels would be if loudnorm were applied in its one pass mode (labeled output). The values generated can be used as inputs for a 'second pass' of the loudnorm filter allowing more accurate loudness normalization than if it is used in a single pass.</p>
<p>These instructions use the loudnorm defaults, which align well with PBS recommendations for target loudness. More information can be found at the <a href=https://ffmpeg.org/ffmpeg-filters.html#loudnorm>loudnorm documentation</a>.</p>
<p>Information about PBS loudness standards can be found in the <a href=http://www-tc.pbs.org/capt/Producing/TOS-2012-Pt2-Distribution.pdf>PBS Technical Operating Specifications</a> document. Information about EBU loudness standards can be found in the <a href=https://tech.ebu.ch/docs/r/r128-2014.pdf>EBU R 128</a> recommendation document.</p>
<dl>
<dt>ffmpeg</dt><dd>starts the command</dd>
<dt><i>input_file</i></dt><dd>path, name and extension of the input file</dd>
<dt>-af loudnorm</dt><dd>activates the loudnorm filter</dd>
<dt>print_format=json</dt><dd>sets the output format for loudness information to json. This format makes it easy to use in a second pass. For a more human readable output, this can be set to <code>print_format=summary</code></dd>
<dt><i>-f null -</i></dt><dd>sets the file output to null (since we are only interested in the metadata generated)</dd>
</dl>
<p class="link"></p>
</div>
</div>
</div>
</div>
<!-- ends loudnorm metadata -->
<!-- one pass loudnorm -->
<span data-toggle="modal" data-target="#loudnorm_one_pass"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="One Pass Loudness Normalization">One Pass Loudness Normalization</button></span>
<div id="loudnorm_one_pass" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="well">
<h3>One Pass Loudness Normalization</h3>
<p><code>ffmpeg -i <i>input_file</i> -af loudnorm=dual_mono=true <i>output_file</i></code></p>
<p>This will normalize the loudness of an input using one pass, which is quicker but less accurate than using two passes. This command uses the loudnorm filter defaults for target loudness. These defaults align well with PBS recommendations, but loudnorm does allow targeting of specific loudness levels. More information can be found at the <a href=https://ffmpeg.org/ffmpeg-filters.html#loudnorm>loudnorm documentation</a>.</p>
<p>Information about PBS loudness standards can be found in the <a href=http://www-tc.pbs.org/capt/Producing/TOS-2012-Pt2-Distribution.pdf>PBS Technical Operating Specifications</a> document. Information about EBU loudness standards can be found in the <a href=https://tech.ebu.ch/docs/r/r128-2014.pdf>EBU R 128</a> recommendation document.</p>
<dl>
<dt>ffmpeg</dt><dd>starts the command</dd>
<dt><i>input_file</i></dt><dd>path, name and extension of the input file</dd>
<dt>-af loudnorm</dt><dd>activates the loudnorm filter with default settings</dd>
<dt>dual_mono=true</dt><dd>(optional) Use this for mono files meant to be played back on stereo systems for correct loudness. Not necessary for multi-track inputs.</dd>
<dt><i>output_file</i></dt><dd>path, name and extension for output file</dd>
</dl>
<p class="link"></p>
</div>
</div>
</div>
</div>
<!-- ends one pass loudnorm -->
<!-- two pass loudnorm -->
<span data-toggle="modal" data-target="#loudnorm_two_pass"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Two Pass Loudness Normalization">Two Pass Loudness Normalization</button></span>
<div id="loudnorm_two_pass" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="well">
<h3>Two Pass Loudness Normalization</h3>
<p><code>ffmpeg -i <i>input_file</i> -af loudnorm=dual_mono=true:measured_I=<i>input_i</i>:measured_TP=<i>input_tp</i>:measured_LRA=<i>input_lra</i>:measured_thresh=<i>input_thresh</i>:offset=<i>target_offset</i>:linear=true <i>output_file</i></code></p>
<p>This command allows using the levels calculated using a <a href=#loudnorm_metadata>first pass of the loudnorm filter</a> to more accurately normalize loudness. This command uses the loudnorm filter defaults for target loudness. These defaults align well with PBS recommendations, but loudnorm does allow targeting of specific loudness levels. More information can be found at the <a href=https://ffmpeg.org/ffmpeg-filters.html#loudnorm>loudnorm documentation</a>.</p>
<p>Information about PBS loudness standards can be found in the <a href=http://www-tc.pbs.org/capt/Producing/TOS-2012-Pt2-Distribution.pdf>PBS Technical Operating Specifications</a> document. Information about EBU loudness standards can be found in the <a href=https://tech.ebu.ch/docs/r/r128-2014.pdf>EBU R 128</a> recommendation document.</p>
<dl>
<dt>ffmpeg</dt><dd>starts the command</dd>
<dt><i>input_file</i></dt><dd>path, name and extension of the input file</dd>
<dt>-af loudnorm</dt><dd>activates the loudnorm filter with default settings</dd>
<dt>dual_mono=true</dt><dd>(optional) use this for mono files meant to be played back on stereo systems for correct loudness. Not necessary for multi-track inputs.</dd>
<dt>measured_I=<i>input_i</i></dt><dd>use the 'input_i' value (integrated loudness) from the first pass in place of input_i</dd>
<dt>measured_TP=<i>input_tp</i></dt><dd>use the 'input_tp' value (true peak) from the first pass in place of input_tp</dd>
<dt>measured_LRA=<i>input_lra</i></dt><dd>use the 'input_lra' value (loudness range) from the first pass in place of input_lra</dd>
<dt>measured_LRA=<i>input_thresh</i></dt><dd>use the 'input_thresh' value (threshold) from the first pass in place of input_thresh</dd>
<dt>offset=<i>target_offset</i></dt><dd>use the 'target_offset' value (offset) from the first pass in place of target_offset</dd>
<dt>linear=true</i></dt><dd>tells loudnorm to use linear normalization</dd>
<dt><i>output_file</i></dt><dd>path, name and extension for output file</dd>
</dl>
<p class="link"></p>
</div>
</div>
</div>
</div>
<!-- ends two pass loudnorm -->
<!-- RIAA equalization -->
<span data-toggle="modal" data-target="#riaa_eq"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="RIAA Equalization">RIAA Equalization</button></span>
<div id="riaa_eq" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="well">
<h3>RIAA Equalization</h3>
<p><code>ffmpeg -i <i>input_file</i> -af aemphasis=type=riaa <i>output_file</i></code></p>
<p>This will apply RIAA equalization to an input file allowing correct listening of audio transferred 'flat' (without EQ) from records that used this EQ curve. For more information about RIAA equalization see the <a href=https://en.wikipedia.org/wiki/RIAA_equalization>Wikipedia page</a> on the subject.</p>
<dl>
<dt>ffmpeg</dt><dd>starts the command</dd>
<dt><i>input_file</i></dt><dd>path, name and extension of the input file</dd>
<dt>-af aemphasis=type=riaa</dt><dd>activates the aemphasis filter and sets it to use RIAA equalization</dd>
<dt><i>output_file</i></dt><dd>path and name of output file</dd>
</dl>
<p class="link"></p>
</div>
</div>
</div>
</div>
<!-- ends RIAA equalization -->
</div><!-- closes the well -->
<div class="well">
<h4>Preservation</h4>

19
scripts/ffmprovisr Executable file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/env bash
if [[ $OSTYPE = darwin* ]] ; then
if [ -d /usr/local/Cellar/ffmprovisr ] ; then
ffmprovisr_path=$(find /usr/local/Cellar/ffmprovisr -iname 'index.html' | sort -M | tail -n1)
fi
if [ -z "${ffmprovisr_path}" ] ; then
ffmprovisr_path='https://amiaopensource.github.io/ffmprovisr/'
fi
open "${ffmprovisr_path}"
elif [[ $OSTYPE = linux-gnu ]] ; then
if [ -d ~/.linuxbrew/Cellar/ffmprovisr ] ; then
ffmprovisr_path=$(find ~/.linuxbrew/Cellar/ffmprovisr -iname 'index.html' | sort -M | tail -n1)
fi
if [ -z "${ffmprovisr_path}" ] ; then
ffmprovisr_path='https://amiaopensource.github.io/ffmprovisr/'
fi
xdg-open "${ffmprovisr_path}"
fi