mirror of
https://github.com/amiaopensource/ffmprovisr.git
synced 2025-10-23 14:19:11 +02:00
Compare commits
15 Commits
v2017-08-0
...
v2017-08-2
Author | SHA1 | Date | |
---|---|---|---|
|
3374812782 | ||
|
9c871d760a | ||
|
22fa09470b | ||
|
9bae51d6a4 | ||
|
b598ed1040 | ||
|
23148d4721 | ||
|
df422912d6 | ||
|
e5f6f5cf2d | ||
|
96c382943b | ||
|
ef6e5d07dc | ||
|
bf260c2ee2 | ||
|
7f1a765dd8 | ||
|
6c85518288 | ||
|
63abcd36d0 | ||
|
905b75547b |
22
index.html
22
index.html
@@ -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 you’ve 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 you’ve 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 you’ve 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 you’ve embedded metadata into the WAV file.</dd>
|
||||||
<dt>-dither_method <i>modified_e_weighted</i></dt><dd>Dither makes sure you don’t unnecessarily truncate the dynamic range of your audio.</dd>
|
<dt>-dither_method <i>rectangular</i></dt><dd>Dither makes sure you don’t 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 don’t unnecessarily truncate the dynamic range of your audio.</dd>
|
<dt>-dither_method rectangular</dt><dd>Dither makes sure you don’t 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 you’re 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 you’re 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>
|
||||||
|
@@ -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
|
||||||
|
Reference in New Issue
Block a user