Compare commits

...

15 Commits

Author SHA1 Message Date
Reto Kromer
3374812782 Merge pull request #225 (check if connected to the web) 2017-08-25 19:01:26 +02:00
Reto Kromer
9c871d760a better description 2017-08-25 16:25:40 +02:00
Reto Kromer
22fa09470b new version 2017-08-25 15:53:28 +02:00
Reto Kromer
9bae51d6a4 delete space 2017-08-25 15:17:38 +02:00
Reto Kromer
b598ed1040 check if connected to the web 2017-08-25 15:15:04 +02:00
Katherine Frances Nagels
23148d4721 Merge pull request #224 from amiaopensource/rectangular
change `modified_e_weighted` to `rectangular`
2017-08-24 11:47:12 +12:00
Reto Kromer
df422912d6 change modified_e_weighted to rectangular 2017-08-23 13:54:21 +02:00
Katherine Frances Nagels
e5f6f5cf2d Merge pull request #223 from amiaopensource/HTML_fixes
HTML fixes
2017-08-21 19:47:33 +12:00
Reto Kromer
96c382943b HTML fixes 2017-08-21 09:41:50 +02:00
Katherine Frances Nagels
ef6e5d07dc Merge pull request #222 from jamessam/gh-pages
add note about dither methods to the audio recipes.
2017-08-21 12:49:09 +12:00
jamessam
bf260c2ee2 redo explanations 2017-08-20 16:48:31 -07:00
jamessam
7f1a765dd8 add note about dither methods to the audio recipes. Recently, I noticed a strange pheonomenon with the previous dither method where the FFMPEG resampler would greatly increase the gain. 2017-08-20 15:46:41 -07:00
Kieran O'Leary
6c85518288 Merge pull request #221 from amiaopensource/kieranjol-typo
split audio/video tracks - match command line with explanation
2017-08-16 01:14:01 +01:00
Kieran O'Leary
63abcd36d0 split audio/video tracks - match command line with explanation
explanation said `0✌️0`, command line said `0:v`
2017-08-16 01:09:00 +01:00
Kieran O'Leary
905b75547b batch processing mac/linux: adds find command - for #207 (#220) 2017-08-15 17:53:47 +02:00
2 changed files with 23 additions and 16 deletions

View File

@@ -319,18 +319,23 @@
<div class="modal-content"> <div class="modal-content">
<div class="well"> <div class="well">
<h3>WAV to MP3</h3> <h3>WAV to MP3</h3>
<p><code>ffmpeg -i <i>input_file</i>.wav -write_id3v1 1 -id3v2_version 3 -dither_method modified_e_weighted -out_sample_rate 48k -qscale:a 1 <i>output_file</i>.mp3</code></p> <p><code>ffmpeg -i <i>input_file</i>.wav -write_id3v1 1 -id3v2_version 3 -dither_method rectangular -out_sample_rate 48k -qscale:a 1 <i>output_file</i>.mp3</code></p>
<p>This will convert your WAV files to MP3s.</p> <p>This will convert your WAV files to MP3s.</p>
<dl> <dl>
<dt>ffmpeg</dt><dd>starts the command</dd> <dt>ffmpeg</dt><dd>starts the command</dd>
<dt>-i <i>input_file</i></dt><dd>path and name of the input file</dd> <dt>-i <i>input_file</i></dt><dd>path and name of the input file</dd>
<dt>-write_id3v1 <i>1</i></dt><dd>Write ID3v1 tag. This will add metadata to the old MP3 format, assuming youve embedded metadata into the WAV file.</dd> <dt>-write_id3v1 <i>1</i></dt><dd>This will write metadata to an ID3v1 tag at the head of the file, assuming youve embedded metadata into the WAV file.</dd>
<dt>-id3v2_version <i>3</i></dt><dd>Write ID3v2 tag. This will add metadata to a newer MP3 format, assuming youve embedded metadata into the WAV file.</dd> <dt>-id3v2_version <i>3</i></dt><dd>This will write metadata to an ID3v2.3 tag at the tail of the file, assuming youve embedded metadata into the WAV file.</dd>
<dt>-dither_method <i>modified_e_weighted</i></dt><dd>Dither makes sure you dont unnecessarily truncate the dynamic range of your audio.</dd> <dt>-dither_method <i>rectangular</i></dt><dd>Dither makes sure you dont unnecessarily truncate the dynamic range of your audio.</dd>
<dt>-out_sample_rate <i>48k</i></dt><dd>Sets the audio sampling frequency to 48 kHz. This can be omitted to use the same sampling frequency as the input.</dd> <dt>-out_sample_rate <i>48k</i></dt><dd>Sets the audio sampling frequency to 48 kHz. This can be omitted to use the same sampling frequency as the input.</dd>
<dt>-qscale:a <i>1</i></dt><dd>This sets the encoder to use a constant quality with a variable bitrate of between 190-250kbit/s. If you would prefer to use a constant bitrate, this could be replaced with <code>-b:a 320k</code> to set to the maximum bitrate allowed by the MP3 format. For more detailed discussion on variable vs constant bitrates see <a href="https://trac.ffmpeg.org/wiki/Encode/MP3" target="_blank">here.</a></dd> <dt>-qscale:a <i>1</i></dt><dd>This sets the encoder to use a constant quality with a variable bitrate of between 190-250kbit/s. If you would prefer to use a constant bitrate, this could be replaced with <code>-b:a 320k</code> to set to the maximum bitrate allowed by the MP3 format. For more detailed discussion on variable vs constant bitrates see <a href="https://trac.ffmpeg.org/wiki/Encode/MP3" target="_blank">here.</a></dd>
<dt><i>output_file</i></dt><dd>path and name of the output file</dd> <dt><i>output_file</i></dt><dd>path and name of the output file</dd>
</dl> </dl>
<p>A couple notes</p>
<ul>
<li>About ID3v2.3 tag: ID3v2.3 is better supported than ID3v2.4, FFmpeg's default ID3v2 setting.</li>
<li>About dither methods: FFmpeg comes with a variety of dither algorithms, outlined in the <a href="https://ffmpeg.org/ffmpeg-resampler.html" target="_blank" rel="noopener noreferrer">official docs</a>, though some may lead to unintended, drastic digital clipping on some systems.</li>
</ul>
<p class="link"></p> <p class="link"></p>
</div> </div>
</div> </div>
@@ -345,17 +350,18 @@
<div class="modal-content"> <div class="modal-content">
<div class="well"> <div class="well">
<h3>WAV to AAC/MP4</h3> <h3>WAV to AAC/MP4</h3>
<p><code>ffmpeg -i <i>input_file</i>.wav -c:a aac -b:a 128k -dither_method modified_e_weighted -ar 44100 <i>output_file</i>.mp4</code></p> <p><code>ffmpeg -i <i>input_file</i>.wav -c:a aac -b:a 128k -dither_method rectangular -ar 44100 <i>output_file</i>.mp4</code></p>
<p>This will convert your WAV file to AAC/MP4.</p> <p>This will convert your WAV file to AAC/MP4.</p>
<dl> <dl>
<dt>ffmpeg</dt><dd>starts the command</dd> <dt>ffmpeg</dt><dd>starts the command</dd>
<dt>-i <i>input_file</i></dt><dd>path and name of the input file</dd> <dt>-i <i>input_file</i></dt><dd>path and name of the input file</dd>
<dt>-c:a aac</dt><dd>sets the audio codec to AAC</dd> <dt>-c:a aac</dt><dd>sets the audio codec to AAC</dd>
<dt>-b:a 128k</dt><dd>sets the bitrate of the audio to 128k</dd> <dt>-b:a 128k</dt><dd>sets the bitrate of the audio to 128k</dd>
<dt>-dither_method modified_e_weighted</dt><dd>Dither makes sure you dont unnecessarily truncate the dynamic range of your audio.</dd> <dt>-dither_method rectangular</dt><dd>Dither makes sure you dont unnecessarily truncate the dynamic range of your audio.</dd>
<dt>-ar 44100</dt><dd>sets the audio sampling frequency to 44100 Hz, or 44.1 kHz, or “CD quality”</dd> <dt>-ar 44100</dt><dd>sets the audio sampling frequency to 44100 Hz, or 44.1 kHz, or “CD quality”</dd>
<dt><i>output_file</i></dt><dd>path and name of the output file</dd> <dt><i>output_file</i></dt><dd>path and name of the output file</dd>
</dl> </dl>
<p>A note about dither methods. FFmpeg comes with a variety of dither algorithms, outlined in the <a href="https://ffmpeg.org/ffmpeg-resampler.html" target="_blank" rel="noopener noreferrer">official docs</a>, though some may lead to unintended, not-subtle digital clipping on some systems.</p>
<p class="link"></p> <p class="link"></p>
</div> </div>
</div> </div>
@@ -1267,6 +1273,8 @@
<p>The basic pattern will look similar to this:<br> <p>The basic pattern will look similar to this:<br>
<code>for item in *.ext; do ffmpeg -i $item <i>(ffmpeg options here)</i> "${item%.ext}_suffix.ext"</code></p> <code>for item in *.ext; do ffmpeg -i $item <i>(ffmpeg options here)</i> "${item%.ext}_suffix.ext"</code></p>
<p>e.g., if an input file is bestmovie002.avi, its output will be bestmovie002_suffix.avi.</p> <p>e.g., if an input file is bestmovie002.avi, its output will be bestmovie002_suffix.avi.</p>
<p>Variation: recursively process all MXF files in subdirectories using <code>find</code> instead of <code>for</code>:</p>
<p><code>find input_directory -iname "*.mxf" -exec ffmpeg -i {} -map 0 -c copy {}.mov \;</code></p>
<p class="link"></p> <p class="link"></p>
</div> </div>
</div> </div>
@@ -1851,7 +1859,7 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
<div class="modal-content"> <div class="modal-content">
<div class="well"> <div class="well">
<h3>Split audio and video tracks</h3> <h3>Split audio and video tracks</h3>
<p><code>ffmpeg -i <i>input_file</i> -map <i>0:v video_output_file</i> -map <i>0:a audio_output_file</i></code></p> <p><code>ffmpeg -i <i>input_file</i> -map <i>0:v:0 video_output_file</i> -map <i>0:a:0 audio_output_file</i></code></p>
<p>This command splits the original input file into a video and audio stream. The -map command identifies which streams are mapped to which file. To ensure that youre mapping the right streams to the right file, run ffprobe before writing the script to identify which streams are desired.</p> <p>This command splits the original input file into a video and audio stream. The -map command identifies which streams are mapped to which file. To ensure that youre mapping the right streams to the right file, run ffprobe before writing the script to identify which streams are desired.</p>
<dl> <dl>
<dt>ffmpeg</dt><dd>starts the command</dd> <dt>ffmpeg</dt><dd>starts the command</dd>

View File

@@ -1,14 +1,14 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# This allows to open ffmprovisr locally from the terminal. # This allows to open the online version of the ffmprovisr, when the computer is
# connected to the Web, and the local version otherwise.
if [[ "$(uname -s)" = "Darwin" ]] ; then if [[ "$(uname -s)" = "Darwin" ]] ; then
default_browser=$(plutil -convert json ~/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist -r -o - | grep https -b1 | tail -n1 | cut -d'"' -f4) default_browser=$(plutil -convert json ~/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist -r -o - | grep https -b1 | tail -n1 | cut -d'"' -f4)
if [ -d /usr/local/Cellar/ffmprovisr ] ; then if ping -c 1 amiaopensource.github.io >/dev/null 2>&1 ; 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/' ffmprovisr_path='https://amiaopensource.github.io/ffmprovisr/'
else
ffmprovisr_path=$(find /usr/local/Cellar/ffmprovisr -iname 'index.html' | sort -M | tail -n1)
fi fi
if [ -n "${default_browser}" ] ; then if [ -n "${default_browser}" ] ; then
open -b "${default_browser}" "${ffmprovisr_path}" open -b "${default_browser}" "${ffmprovisr_path}"
@@ -16,11 +16,10 @@ if [[ "$(uname -s)" = "Darwin" ]] ; then
open "${ffmprovisr_path}" open "${ffmprovisr_path}"
fi fi
elif [[ "$(uname -s)" = "Linux" ]] ; then elif [[ "$(uname -s)" = "Linux" ]] ; then
if [ -d ~/.linuxbrew/Cellar/ffmprovisr ] ; then if ping -c 1 amiaopensource.github.io >/dev/null 2>&1 ; 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/' ffmprovisr_path='https://amiaopensource.github.io/ffmprovisr/'
else
ffmprovisr_path=$(find ~/.linuxbrew/Cellar/ffmprovisr -iname 'index.html' | sort -M | tail -n1)
fi fi
xdg-open "${ffmprovisr_path}" xdg-open "${ffmprovisr_path}"
fi fi