mirror of
https://github.com/amiaopensource/ffmprovisr.git
synced 2025-10-20 04:40:14 +02:00
Compare commits
18 Commits
v2020-11-1
...
v2021-08-1
Author | SHA1 | Date | |
---|---|---|---|
|
bf93a20da8 | ||
|
3c393a688e | ||
|
961f401c34 | ||
|
f3cc3b518f | ||
|
3555a9b61e | ||
|
9a36ef66ba | ||
|
e7d8dd58b9 | ||
|
a25c20a855 | ||
|
c0d3761ce5 | ||
|
869ffda8c4 | ||
|
789329b415 | ||
|
23e0097b54 | ||
|
ca86a0eca4 | ||
|
bc0edae268 | ||
|
87314cef76 | ||
|
77a7a2b3dc | ||
|
f0aab69f0f | ||
|
5c0b98bded |
42
index.html
42
index.html
@@ -58,12 +58,13 @@
|
||||
<a href="https://creativecommons.org/licenses/by/4.0/" target="_blank"><img alt="Creative Commons License" src="img/cc.png"></a><br>
|
||||
This work is licensed under a <a href="https://creativecommons.org/licenses/by/4.0/" target="_blank">Creative Commons Attribution 4.0 International License</a>.
|
||||
</p>
|
||||
<h3>Sister projects</h3>
|
||||
<h3>Sibling projects</h3>
|
||||
<p><a href="https://dd388.github.io/crals/" target="_blank">Script Ahoy</a>: Community Resource for Archivists and Librarians Scripting</p>
|
||||
<p><a href="https://datapraxis.github.io/sourcecaster/" target="_blank">The Sourcecaster</a>: an app that helps you use the command line to work through common challenges that come up when working with digital primary sources.</p>
|
||||
<p><a href="https://pugetsoundandvision.github.io/micropops/" target="_blank">Micropops</a>: One liners and automation tools from Moving Image Preservation of Puget Sound</p>
|
||||
<p><a href="https://amiaopensource.github.io/cable-bible/" target="_blank">Cable Bible</a>: A Guide to Cables and Connectors Used for Audiovisual Tech</p>
|
||||
<p><a href="https://eaasi.gitlab.io/qemu-qed/" target="_blank">QEMU QED</a>: instructions for using QEMU (Quick EMUlator), a command line application for computer emulation and virtualization</p>
|
||||
<p><a href="https://eaasi.gitlab.io/program_docs/qemu-qed/" target="_blank">QEMU QED</a>: instructions for using QEMU (Quick EMUlator), a command line application for computer emulation and virtualization</p>
|
||||
<p><a href="https://amiaopensource.github.io/ffmpeg-artschool/" target="_blank">ffmpeg-artschool</a>: An AMIA workshop featuring scripts, exercises, and activities to make art using FFmpeg</p>
|
||||
</div>
|
||||
|
||||
<div class="well">
|
||||
@@ -337,6 +338,38 @@
|
||||
</div>
|
||||
<!-- ends Transcode to H.264 -->
|
||||
|
||||
<!-- Transcode to H.264 or H.265 using the GPU -->
|
||||
<label class="recipe" for="transcode_gpu">Transcode to H.264/H.265 using the GPU</label>
|
||||
<input type="checkbox" id="transcode_gpu">
|
||||
<div class="hiding">
|
||||
<h5>Transcode to H.264/H.265 using the GPU</h5>
|
||||
<p><code>ffmpeg -i <em>input_file</em> -c:v h264_nvenc -preset llhq -rc:v vbr_hq -cq:v 19 -b:v 8000k -maxrate:v 12000k -profile:v high -c:a copy <em>output_file</em></code></p>
|
||||
<p>This command takes an input file and transcodes it to H.264 using the encoding functionality of an Nvidia GPU (without transcoding the audio). If you're using H.264 with AAC or AC3 audio, you can output to an .mp4 file; if you're using HEVC and/or more exotic audio, you should output to .mkv. While Nvidia's fixed-function hardware can be 10x as performant as encoding on the CPU, it requires a few more parameters in order to optimize quality at lower bitrates.</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>
|
||||
<dt>-c:v <em>h264_nvenc</em></dt><dd>tells FFmpeg to encode the video stream as H.264 using Nvidia's encoder.</dd>
|
||||
<dt>-preset <em>llhq</em></dt><dd>uses the "low latency, high quality" encoding preset, a good default when working with nvenc.</dd>
|
||||
<dt>-rc:v <em>vbr_hq</em></dt><dd>means "variable bitrate, high quality," allowing you to set a minimum and maximum bitrate for the encode.</dd>
|
||||
<dt>-cq:v <em>19</em></dt><dd>is the same as the CRF quality level specified using x264 or other CPU-based encoders, where 0 is lossless, 51 is the worst possible quality, and values from 18-23 are typical.</dd>
|
||||
<dt>-b:v <em>8000k -maxrate:v 12000k</em></dt><dd>corresponds to a minimum bitrate of 8 megabits (8000k) per second, and a maximum of 12 megabits per second. nvenc is not as good at estimating bitrates as CPU-based encoders, and without this data, will occasionally choose a visibly lower bitrate. The 8-12 mbit range is generally a good one for high-quality 1080p h264.</dd>
|
||||
<dt>-profile:v <em>high</em></dt><dd>uses the "high quality" profile of h264, something that's been baked in to the spec for a long time so that older players can declare compatibility; almost all h264 video now uses high.</dd>
|
||||
<dt>-c:a <em>copy</em></dt><dd>will skip reencoding the audio stream, and copy the audio from the source file.</dd>
|
||||
<dt><em>output_file</em></dt><dd>path, name and extension of the output file</dd>
|
||||
</dl>
|
||||
<p>In order to encode to HEVC instead, and optionally transcode the audio, you can try changing the command like this:</p>
|
||||
<p><code>ffmpeg -i <em>input_file</em> -c:v hevc_nvenc -preset llhq -rc:v vbr_hq -cq:v 19 -b:v 5000k -maxrate:v 8000k -profile:v main10 -c:a aac <em>output_file</em></code></p>
|
||||
<dl>
|
||||
<dt>-c:v <em>hevc_nvenc</em></dt><dd>encodes to HEVC (also called H.265), a more efficient codec supported on GPUs from approximately 2015 and newer.</dd>
|
||||
<dt>-b:v <em>5000k -maxrate:v 8000k</em></dt><dd>specifies a slightly lower bitrate than when using h264, per HEVC's greater efficiency.</dd>
|
||||
<dt>-profile:v <em>main10</em></dt><dd>declares the "main10" profile for working with HEVC; one of the primary advantages of this codec is better support for 10-bit video, enabling consumer HDR.</dd>
|
||||
<dt>-c:a <em>aac</em></dt><dd>reencodes the audio to AAC with default parameters, a very common and widely supported format for access copies.</dd>
|
||||
</dl>
|
||||
<p>Much of the information in this entry was taken from <a href="https://superuser.com/a/1236387" target="_blank">this superuser.com post</a> provided by an Nvidia developer, one of the best sources of information on the ffmpeg Nvidia encoders.</p>
|
||||
<p class="link"></p>
|
||||
</div>
|
||||
<!-- ends Transcode to H.264 or H.265 using the GPU -->
|
||||
|
||||
<!-- H.264 from DCP -->
|
||||
<label class="recipe" for="dcp_to_h264">Transcode from DCP to an H.264 access file</label>
|
||||
<input type="checkbox" id="dcp_to_h264">
|
||||
@@ -459,7 +492,6 @@
|
||||
<h5>Transcode to Ogg/Theora</h5>
|
||||
<p><code>ffmpeg -i <em>input_file</em> -acodec libvorbis -b:v 690k <em>output_file</em></code></p>
|
||||
<p>This command takes an input file and transcodes it to Ogg/Theora in an .ogv wrapper with 690k video bitrate.</p>
|
||||
<p><strong>Note:</strong> FFmpeg must be installed with support for Ogg Theora. If you are using Homebrew, you can check with <code>brew info ffmpeg</code> and then update it with <code>brew upgrade ffmpeg --with-theora --with-libvorbis</code> if necessary.</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>
|
||||
@@ -723,7 +755,7 @@
|
||||
<li>In the sound filter <code>atempo</code> the numerator <code>output_fps</code> sets the output speed and the denominator <code>input_fps</code> sets the input speed; both values are given in frames per second.</li>
|
||||
</ul>
|
||||
The different filters in a complex filter can be divided either by comma or semicolon. The quotation marks allow to insert a space between the filters for readability.</dd>
|
||||
<dt>-map "[v]"</dt><dd>maps the video stream and:</dd>
|
||||
<dt>-map "[v]"</dt><dd>maps the video stream and</dd>
|
||||
<dt>-map "[a]"</dt><dd>maps the audio stream together into:</dd>
|
||||
<dt><em>output_file</em></dt><dd>path, name and extension of the output file</dd>
|
||||
</dl>
|
||||
@@ -2335,7 +2367,6 @@
|
||||
<input type="checkbox" id="ocr_on_top">
|
||||
<div class="hiding">
|
||||
<h5>Plays video with OCR on top</h5>
|
||||
<p>Note: ffmpeg must be compiled with the tesseract library for this script to work (<code>--with-tesseract</code> if using the <code>brew install ffmpeg</code> method).</p>
|
||||
<p><code>ffplay input_file -vf "ocr,drawtext=fontfile=/Library/Fonts/Andale Mono.ttf:text=%{metadata\\\:lavfi.ocr.text}:fontcolor=white"</code></p>
|
||||
<dl>
|
||||
<dt>ffplay</dt><dd>starts the command</dd>
|
||||
@@ -2359,7 +2390,6 @@
|
||||
<input type="checkbox" id="ffprobe_ocr">
|
||||
<div class="hiding">
|
||||
<h5>Exports OCR data to screen</h5>
|
||||
<p>Note: FFmpeg must be compiled with the tesseract library for this script to work (<code>--with-tesseract</code> if using the <code>brew install ffmpeg</code> method)</p>
|
||||
<p><code>ffprobe -show_entries frame_tags=lavfi.ocr.text -f lavfi -i "movie=<em>input_file</em>,ocr"</code></p>
|
||||
<dl>
|
||||
<dt>ffprobe</dt><dd>starts the command</dd>
|
||||
|
@@ -173,7 +173,7 @@ Last updated: 2019-12-11
|
||||
|
||||
[The Cable Bible](https://amiaopensource.github.io/cable-bible/): A Guide to Cables and Connectors Used for Audiovisual Tech
|
||||
[FFCommand_Engine](https://github.com/ColorlabMD/FFCommand_Engine): a tool for easier use of FFmpeg binaries
|
||||
[QEMU QED](https://eaasi.gitlab.io/qemu-qed): instructions for using QEMU (Quick EMUlator), a command line application for computer emulation and virtualization
|
||||
[QEMU QED](https://eaasi.gitlab.io/program_docs/qemu-qed/): instructions for using QEMU (Quick EMUlator), a command line application for computer emulation and virtualization
|
||||
[Script Ahoy](http://dd388.github.io/crals/): Community Resource for Archivists and Librarians Scripting
|
||||
[sourcecaster](https://datapraxis.github.io/sourcecaster/): helps you use the command line to work through common challenges that come up when working with digital primary sources.
|
||||
|
||||
|
@@ -16,6 +16,10 @@ ffmpeg -i input_file -map 0 -dn -c:v ffv1 -level 3 -g 1 -slicecrc 1 -slices 16 -
|
||||
ffmpeg -i concat:input_file_1\|input_file_2\|input_file_3 -c:v libx264 -c:a aac output_file.mp4
|
||||
# Transcode to an H.265/HEVC MP4
|
||||
ffmpeg -i input_file -c:v libx265 -pix_fmt yuv420p -c:a copy output_file
|
||||
# Transcode to H.264 using the GPU
|
||||
ffmpeg -i input_file -c:v h264_nvenc -preset llhq -rc:v vbr_hq -cq:v 19 -b:v 8000k -maxrate:v 12000k -profile:v high -c:a copy output_file
|
||||
# Transcode to H.265 using the GPU
|
||||
ffmpeg -i input_file -c:v hevc_nvenc -preset llhq -rc:v vbr_hq -cq:v 19 -b:v 5000k -maxrate:v 8000k -profile:v main10 -c:a copy output_file
|
||||
# Transcode to an Ogg Theora
|
||||
ffmpeg -i input_file -acodec libvorbis -b:v 690k output_file
|
||||
# Convert WAV to MP3
|
||||
|
Reference in New Issue
Block a user