removes reliance on bootstrap; moves necessary code to css/js

This commit is contained in:
Ashley Blewer 2017-10-18 16:02:04 -04:00
parent c552ffe699
commit 48a51a6f6a
5 changed files with 2056 additions and 1963 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,6 @@
html, body {
line-height: 1.5;
font-size: 16px;
color: #888888;
background-color: #060606;
margin: 0;
@ -109,6 +110,10 @@ h3 {
}
code {
padding: 2px 4px;
color: #c7254e;
background-color: #f9f2f4;
border-radius: 4px;
word-break: break-all;
word-wrap: break-word;
}
@ -146,17 +151,20 @@ div {
background-color: #383838;
padding: 14px;
font-family: "Montserrat";
font-size: 1.2em;
font-weight: bold;
letter-spacing: 0.1em;
border: 1px solid black;
width: 100%;
cursor: pointer;
position: relative;
padding-left: 2.8em;
transition: all .5s ease-out;
}
.recipe {
display: block;
width: 90%;
}
.recipe:hover, .contents-list:hover {
background-color: #449d44;
}
@ -188,7 +196,6 @@ div {
.codeblock {
font-family: monospace
padding: 2px 4px;
font-size: 90%;
color: #c7254e;
background-color: #f9f2f4;
border-radius: 4px;
@ -201,3 +208,30 @@ div {
.footnote {
font-size: 90%;
}
.well {
padding: 1em;
margin-bottom: 0.5em;
background-color: #151515;
border: 1px solid #030303;
border-radius: 8px;
box-shadow: inset 0 1px 1px rgba(0,0,0,0.05);
}
.hiding {
opacity: 0;
height: 0;
overflow: hidden;
}
input {
position: absolute;
left: -999em
}
input[type=checkbox]:checked + div {
opacity: 1;
height: auto;
overflow: hidden;
transition: opacity .5s linear, height .5s linear;
}

View File

@ -4,22 +4,19 @@
<title>ffmprovisr</title>
<meta name="viewport" charset="utf-8" content="text/html, width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Montserrat%7CMerriweather" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/css.css">
<link rel="icon" href="img/vhs.ico">
<script src="js/jquery.min.js"></script>
<script src="js/js.js"></script>
<script src="js/bootstrap.min.js"></script>
</head>
<body>
<div class="grid">
<div class="header">
<h1>➺ ffmprovisr ❥</h1>
</div>
<nav class="sidebar">
<nav class="sidebar well">
<h2 class="heading">Table of Contents</h2>
<p class="link"></p>
<a href="#about"><div class="contents-list">About this resource</div></a>
@ -28,7 +25,7 @@
<a href="#rewrap"><div class="contents-list">Change container (rewrap)</div></a>
<a href="#transcode"><div class="contents-list">Change codec (transcode)</div></a>
<a href="#video-properties"><div class="contents-list">Change video properties</div></a>
<a href="#audio-files"><div class="contents-list">Change or view audio properties</div></a>
<a href="#audio-files"><div class="contents-list">Change/view audio properties</div></a>
<a href="#join-trim"><div class="contents-list">Join/trim/create an excerpt</div></a>
<a href="#interlacing"><div class="contents-list">Work with interlaced video</div></a>
<a href="#overlay"><div class="contents-list">Overlay timecode or text on a video</div></a>
@ -68,8 +65,9 @@
<h2 id="basics">Learn about FFmpeg basics</h2>
<!-- Basic structure of an FFmpeg command -->
<div class="recipe" data-toggle="collapse" data-target="#basic-structure">Basic structure of an FFmpeg command</div>
<div id="basic-structure" class="collapse">
<label class="recipe" for="basic-structure">Basic structure of an FFmpeg command</label>
<input type="checkbox" name="one" id="basic-structure">
<div class="hiding">
<h3>Basic structure of an FFmpeg command</h3>
<p class="link"></p>
<p>At its basis, an FFmpeg command is relatively simple. After you have installed FFmpeg (see instructions <a href="https://avpres.net/FFmpeg/#ch1" target="_blank">here</a>), the program is invoked simply by typing <code>ffmpeg</code> at the command prompt.</p>
@ -84,7 +82,6 @@
<dt><i>output_file.ext</i></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>
</dl>
</div>
<!-- End Basic structure of an FFmpeg command -->
@ -93,8 +90,9 @@
<h2 id="concepts">Learn about more advanced FFmpeg concepts</h2>
<!-- Filtergraph explanation -->
<div class="recipe" data-toggle="collapse" data-target="#filtergraphs">Filtergraphs</div>
<div id="filtergraphs" class="collapse">
<label class="recipe" for="filtergraphs">Filtergraphs</label>
<input type="checkbox" name="one" id="filtergraphs">
<div class="hiding">
<h3>Filtergraphs</h3>
<p class="link"></p>
<p>Many FFmpeg commands use filters that manipulate the video or audio stream in some way: for example, <a href="http://ffmpeg.org/ffmpeg-filters.html#hflip" target="_blank">hflip</a> to horizontally flip a video, or <a href="http://ffmpeg.org/ffmpeg-filters.html#amerge-1" target="_blank">amerge</a> to merge two or more audio tracks into a single stream.</p>
@ -126,8 +124,9 @@
<h2 id="rewrap">Change container (rewrap)</h2>
<!-- Basic rewrap command -->
<div class="recipe" data-toggle="collapse" data-target="#basic-rewrap">Basic rewrap command</div>
<div id="basic-rewrap" class="collapse">
<label class="recipe" for="basic-rewrap">Basic rewrap command</label>
<input type="checkbox" name="one" id="basic-rewrap">
<div class="hiding">
<h3>Rewrap a file</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_file.ext</i> -c copy -map 0 <i>output_file.ext</i></code></p>
@ -149,8 +148,9 @@
<!-- End Basic rewrap command -->
<!-- MKV to MP4 -->
<div class="recipe" data-toggle="collapse" data-target="#mkv_to_mp4">Convert Matroska (MKV) to MP4</div>
<div id="mkv_to_mp4" class="collapse">
<label class="recipe" for="mkv_to_mp4">Convert Matroska (MKV) to MP4</label>
<input type="checkbox" name="one" id="mkv_to_mp4">
<div class="hiding">
<h3>MKV to MP4</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_file</i>.mkv -c:v copy -c:a aac <i>output_file</i>.mp4</code></p>
@ -174,8 +174,9 @@
<h2 id="transcode">Change codec (transcode)</h2>
<!-- Transcode to ProRes -->
<div class="recipe" data-toggle="collapse" data-target="#to_prores">Transcode to deinterlaced Apple ProRes LT</div>
<div id="to_prores" class="collapse">
<label class="recipe" for="to_prores">Transcode to deinterlaced Apple ProRes LT</label>
<input type="checkbox" name="one" id="to_prores">
<div class="hiding">
<h3>Transcode into a deinterlaced Apple ProRes LT</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_file</i> -c:v prores -profile:v 1 -vf yadif -c:a pcm_s16le <i>output_file</i>.mov</code></p>
@ -205,8 +206,9 @@
<!-- ends Transcode to ProRes -->
<!-- Transcode to H.264 -->
<div class="recipe" data-toggle="collapse" data-target="#transcode_h264">Transcode to an H.264 access file</div>
<div id="transcode_h264" class="collapse">
<label class="recipe" for="transcode_h264">Transcode to an H.264 access file</label>
<input type="checkbox" name="one" id="transcode_h264">
<div class="hiding">
<h3>Transcode to H.264</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_file</i> -c:v libx264 -pix_fmt yuv420p -c:a copy <i>output_file</i></code></p>
@ -232,8 +234,9 @@
<!-- ends Transcode to H.264 -->
<!-- H.264 from DCP -->
<div class="recipe" data-toggle="collapse" data-target="#dcp_to_h264">Transcode from DCP to an H.264 access file</div>
<div id="dcp_to_h264" class="collapse">
<label class="recipe" for="dcp_to_h264">Transcode from DCP to an H.264 access file</label>
<input type="checkbox" name="one" id="dcp_to_h264">
<div class="hiding">
<h3>H.264 from DCP</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_video_file</i>.mxf -i <i>input_audio_file</i>.mxf -c:v libx264 -pix_fmt yuv420p -c:a aac <i>output_file.mp4</i></code></p>
@ -258,8 +261,9 @@
<!-- ends H.264 from DCP -->
<!-- Transcode to FFV1.mkv -->
<div class="recipe" data-toggle="collapse" data-target="#create_FFV1_mkv">Transcode your file with the FFV1 Version 3 Codec in a Matroska container</div>
<div id="create_FFV1_mkv" class="collapse">
<label class="recipe" for="create_FFV1_mkv">Transcode your file with the FFV1 Version 3 Codec in a Matroska container</label>
<input type="checkbox" name="one" id="create_FFV1_mkv">
<div class="hiding">
<h3>Create FFV1 Version 3 video in a Matroska container with framemd5 of input</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_file</i> -map 0 -dn -c:v ffv1 -level 3 -g 1 -slicecrc 1 -slices 16 -c:a copy <i>output_file</i>.mkv -f framemd5 -an <i>framemd5_output_file</i></code></p>
@ -284,8 +288,9 @@
<!-- ends Transcode to FFV1.mkv-->
<!-- Rip DVD -->
<div class="recipe" data-toggle="collapse" data-target="#dvd_to_file">Convert DVD to H.264</div>
<div id="dvd_to_file" class="collapse">
<label class="recipe" for="dvd_to_file">Convert DVD to H.264</label>
<input type="checkbox" name="one" id="dvd_to_file">
<div class="hiding">
<h3>Convert DVD to H.264</h3>
<p class="link"></p>
<p><code>ffmpeg -i concat:<i>input_file1</i>\|<i>input_file2</i>\|<i>input_file3</i> -c:v libx264 -c:a copy <i>output_file</i>.mp4</code></p>
@ -316,8 +321,9 @@
<!-- ends rip DVD -->
<!-- Transcode to H.265 -->
<div class="recipe" data-toggle="collapse" data-target="#transcode_h265">Transcode to an H.265/HEVC MP4</div>
<div id="transcode_h265" class="collapse">
<label class="recipe" for="transcode_h265">Transcode to an H.265/HEVC MP4</label>
<input type="checkbox" name="one" id="transcode_h265">
<div class="hiding">
<h3>Transcode to H.265/HEVC</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_file</i> -c:v libx265 -pix_fmt yuv420p -c:a copy <i>output_file</i></code></p>
@ -346,8 +352,9 @@
<!-- Here comes audio-only transcoding -->
<!-- WAV to MP3 -->
<div class="recipe" data-toggle="collapse" data-target="#wav_to_mp3">Convert WAV to MP3</div>
<div id="wav_to_mp3" class="collapse">
<label class="recipe" for="wav_to_mp3">Convert WAV to MP3</label>
<input type="checkbox" name="one" id="wav_to_mp3">
<div class="hiding">
<h3>WAV to MP3</h3>
<p class="link"></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>
@ -371,8 +378,9 @@
<!-- ends WAV to MP3 -->
<!-- append notice to access mp3 -->
<div class="recipe" data-toggle="collapse" data-target="#append_mp3">Generate two access MP3s (with and without copyright).</div>
<div id="append_mp3" class="collapse">
<label class="recipe" for="append_mp3">Generate two access MP3s (with and without copyright).</label>
<input type="checkbox" name="one" id="append_mp3">
<div class="hiding">
<h3>Generate two access MP3s from input. One with appended audio (such as a copyright notice) and one unmodified.</h3>
<p class="link"></p>
<p> <code>ffmpeg -i <i>input_file</i> -i <i>input_file_to_append</i> -filter_complex "[0:a:0]asplit=2[a][b];[b]afifo[bb];[1:a:0][bb]concat=n=2:v=0:a=1[concatout]" -map "[a]" -codec:a libmp3lame -dither_method modified_e_weighted -qscale:a 2 <i>output_file.mp3</i> -map "[concatout]" -codec:a libmp3lame -dither_method modified_e_weighted -qscale:a 2 <i>output_file_appended.mp3</i></code></p>
@ -396,8 +404,9 @@
<!-- ends append notice to access mp3 -->
<!-- WAV to AAC/MP4 -->
<div class="recipe" data-toggle="collapse" data-target="#wav_to_mp4">Convert WAV to AAC/MP4</div>
<div id="wav_to_mp4" class="collapse">
<label class="recipe" for="wav_to_mp4">Convert WAV to AAC/MP4</label>
<input type="checkbox" name="one" id="wav_to_mp4">
<div class="hiding">
<h3>WAV to AAC/MP4</h3>
<p class="link"></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>
@ -420,8 +429,9 @@
<h2 id="video-properties">Change video properties</h2>
<!-- 4:3 to 16:9 -->
<div class="recipe" data-toggle="collapse" data-target="#SD_HD">Transform 4:3 aspect ratio into 16:9 with pillarbox</div>
<div id="SD_HD" class="collapse">
<label class="recipe" for="SD_HD">Transform 4:3 aspect ratio into 16:9 with pillarbox</label>
<input type="checkbox" name="one" id="SD_HD">
<div class="hiding">
<h3>Transform 4:3 aspect ratio into 16:9 with pillarbox</h3>
<p class="link"></p>
<p>Transform a video file with 4:3 aspect ratio into a video file with 16:9 aspect ratio by correct pillarboxing.</p>
@ -438,8 +448,9 @@
<!-- ends 4:3 to 16:9 -->
<!-- 16:9 to 4:3 -->
<div class="recipe" data-toggle="collapse" data-target="#HD_SD">Transform 16:9 aspect ratio video into 4:3 with letterbox</div>
<div id="HD_SD" class="collapse">
<label class="recipe" for="HD_SD">Transform 16:9 aspect ratio video into 4:3 with letterbox</label>
<input type="checkbox" id="HD_SD">
<div class="hiding">
<h3>Transform 16:9 aspect ratio video into 4:3 with letterbox</h3>
<p class="link"></p>
<p>Transform a video file with 16:9 aspect ratio into a video file with 4:3 aspect ratio by correct letterboxing.</p>
@ -457,8 +468,9 @@
<!-- ends 16:9 to 4:3 -->
<!-- SD to HD -->
<div class="recipe" data-toggle="collapse" data-target="#SD_HD_2">Transform SD to HD with pillarbox</div>
<div id="SD_HD_2" class="collapse">
<label class="recipe" for="SD_HD_2">Transform SD to HD with pillarbox</label>
<input type="checkbox" id="SD_HD_2">
<div class="hiding">
<h3>Transform SD into HD with pillarbox</h3>
<p class="link"></p>
<p>Transform a SD video file with 4:3 aspect ratio into an HD video file with 16:9 aspect ratio by correct pillarboxing.</p>
@ -480,8 +492,9 @@
<!-- ends SD to HD -->
<!-- Change display aspect ratio without re-encoding video-->
<div class="recipe" data-toggle="collapse" data-target="#change_DAR">Change display aspect ratio without re-encoding</div>
<div id="change_DAR" class="collapse">
<label class="recipe" for="change_DAR">Change display aspect ratio without re-encoding</label>
<input type="checkbox" id="change_DAR">
<div class="hiding">
<h3>Change Display Aspect Ratio without reencoding video</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_file</i> -c:v copy -aspect 4:3 <i>output_file</i></code></p>
@ -496,8 +509,9 @@
<!-- ends Change display aspect ratio without re-encoding video -->
<!-- Convert colourspace -->
<div class="recipe" data-toggle="collapse" data-target="#convert-colourspace">Convert colourspace of video</div>
<div id="convert-colourspace" class="collapse">
<label class="recipe" for="convert-colourspace">Convert colourspace of video</label>
<input type="checkbox" id="convert-colourspace">
<div class="hiding">
<h3>Transcode video to a different colourspace</h3>
<p class="link"></p>
<p>This command uses a filter to convert the video to a different colour space.</p>
@ -548,8 +562,9 @@
<!-- ends Convert colourspace -->
<!-- Modify speed -->
<div class="recipe" data-toggle="collapse" data-target="#modify_speed">Modify image and sound speed</div>
<div id="modify_speed" class="collapse">
<label class="recipe" for="modify_speed">Modify image and sound speed</label>
<input type="checkbox" id="modify_speed">
<div class="hiding">
<h3>Modify image and sound speed</h3>
<p class="link"></p>
<p>E.g. for converting 24fps to 25fps with audio pitch compensation for PAL access copies. (Thanks @kieranjol!)</p>
@ -571,8 +586,9 @@
<!-- ends Modify speed -->
<!-- Make stream properties explicate -->
<div class="recipe" data-toggle="collapse" data-target="#clarify_stream">Clarify stream properties</div>
<div id="clarify_stream" class="collapse">
<label class="recipe" for="clarify_stream">Clarify stream properties</label>
<input type="checkbox" id="clarify_stream">
<div class="hiding">
<h3>Set stream properties</h3>
<p class="link"></p>
<h2>Find undetermined or unknown stream properties</h2>
@ -611,8 +627,9 @@
<h2 id="audio-files">Change or view audio properties</h2>
<!-- Extract audio from an AV file -->
<div class="recipe" data-toggle="collapse" data-target="#extract_audio">Extract audio without loss from an AV file</div>
<div id="extract_audio" class="collapse">
<label class="recipe" for="extract_audio">Extract audio without loss from an AV file</label>
<input type="checkbox" id="extract_audio">
<div class="hiding">
<h3>Extract audio from an AV file</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_file</i> -c:a copy -vn <i>output_file</i></code></p>
@ -628,8 +645,9 @@
<!-- ends Extract audio from am AV file -->
<!-- Combine audio tracks -->
<div class="recipe" data-toggle="collapse" data-target="#combine_audio">Combine audio tracks</div>
<div id="combine_audio" class="collapse">
<label class="recipe" for="combine_audio">Combine audio tracks</label>
<input type="checkbox" id="combine_audio">
<div class="hiding">
<h3>Combine audio tracks into one in a video file</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_file</i> -filter_complex "[0:a:0][0:a:1]amerge[out]" -map 0:v -map "[out]" -c:v copy -shortest <i>output_file</i></code></p>
@ -651,8 +669,9 @@
<!-- ends Combine audio tracks -->
<!-- phase shift -->
<div class="recipe" data-toggle="collapse" data-target="#phase_shift">Inverses the audio phase of the second channel</div>
<div id="phase_shift" class="collapse">
<label class="recipe" for="phase_shift">Inverses the audio phase of the second channel</label>
<input type="checkbox" id="phase_shift">
<div class="hiding">
<h3>Flip audio phase shift</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_file</i> -af pan="stereo|c0=c0|c1=-1*c1" <i>output_file</i></code></p>
@ -669,8 +688,9 @@
<!-- ends phase shift -->
<!-- loudnorm metadata -->
<div class="recipe" data-toggle="collapse" data-target="#loudnorm_metadata">Calculate Loudness Levels</div>
<div id="loudnorm_metadata" class="collapse">
<label class="recipe" for="loudnorm_metadata">Calculate Loudness Levels</label>
<input type="checkbox" id="loudnorm_metadata">
<div class="hiding">
<h3>Calculate Loudness Levels</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_file</i> -af loudnorm=print_format=json -f null -</code></p>
@ -688,8 +708,9 @@
<!-- ends loudnorm metadata -->
<!-- RIAA equalization -->
<div class="recipe" data-toggle="collapse" data-target="#riaa_eq">RIAA Equalization</div>
<div id="riaa_eq" class="collapse">
<label class="recipe" for="riaa_eq">RIAA Equalization</label>
<input type="checkbox" id="riaa_eq">
<div class="hiding">
<h3>RIAA Equalization</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_file</i> -af aemphasis=type=riaa <i>output_file</i></code></p>
@ -704,8 +725,9 @@
<!-- ends RIAA equalization -->
<!-- one pass loudnorm -->
<div class="recipe" data-toggle="collapse" data-target="#loudnorm_one_pass">One Pass Loudness Normalization</div>
<div id="loudnorm_one_pass" class="collapse">
<label class="recipe" for="loudnorm_one_pass">One Pass Loudness Normalization</label>
<input type="checkbox" id="loudnorm_one_pass">
<div class="hiding">
<h3>One Pass Loudness Normalization</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_file</i> -af loudnorm=dual_mono=true -ar 48k <i>output_file</i></code></p>
@ -723,8 +745,9 @@
<!-- ends one pass loudnorm -->
<!-- two pass loudnorm -->
<div class="recipe" data-toggle="collapse" data-target="#loudnorm_two_pass">Two Pass Loudness Normalization</div>
<div id="loudnorm_two_pass" class="collapse">
<label class="recipe" for="loudnorm_two_pass">Two Pass Loudness Normalization</label>
<input type="checkbox" id="loudnorm_two_pass">
<div class="hiding">
<h3>Two Pass Loudness Normalization</h3>
<p class="link"></p>
<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 -ar 48k <i>output_file</i></code></p>
@ -748,8 +771,9 @@
<!-- ends two pass loudnorm -->
<!-- Fix A/V async 1 -->
<div class="recipe" data-toggle="collapse" data-target="#avsync_aresample">Fix A/V sync issues by resampling audio</div>
<div id="avsync_aresample" class="collapse">
<label class="recipe" for="avsync_aresample">Fix A/V sync issues by resampling audio</label>
<input type="checkbox" id="avsync_aresample">
<div class="hiding">
<h3>Fix AV Sync: Resample audio</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_file</i> -c:v copy -c:a pcm_s16le -af "aresample=async=1000" <i>output_file</i></code></p>
@ -769,8 +793,9 @@
<h2 id="join-trim">Join, trim, or excerpt a video</h2>
<!-- Join files together -->
<div class="recipe" data-toggle="collapse" data-target="#join_files">Join (concatenate) two or more files into a single file</div>
<div id="join_files" class="collapse">
<label class="recipe" for="join_files">Join (concatenate) two or more files into a single file</label>
<input type="checkbox" id="join_files">
<div class="hiding">
<h3>Join files together</h3>
<p class="link"></p>
<p><code>ffmpeg -f concat -i mylist.txt -c copy <i>output_file</i></code></p>
@ -795,8 +820,9 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
<!-- ends Join files together -->
<!-- Split file into segments -->
<div class="recipe" data-toggle="collapse" data-target="#segment_file">Split one file into several smaller segments</div>
<div id="segment_file" class="collapse">
<label class="recipe" for="segment_file">Split one file into several smaller segments</label>
<input type="checkbox" id="segment_file">
<div class="hiding">
<h3>Split file into segments</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_file</i> -c copy -map 0 -f segment -segment_time 60 -reset_timestamps 1 <i>output_file-%03d.mkv</i></code></p>
@ -825,8 +851,9 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
<!-- ends Split file into segments -->
<!-- Trim -->
<div class="recipe" data-toggle="collapse" data-target="#trim">Trim video</div>
<div id="trim" class="collapse">
<label class="recipe" for="trim">Trim video</label>
<input type="checkbox" id="trim">
<div class="hiding">
<h3>Trim a video without re-encoding</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_file</i> -ss 00:02:00 -to 00:55:00 -c copy -map 0 <i>output_file</i></code></p>
@ -851,8 +878,9 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
<!-- ends Trim -->
<!-- Excerpt from beginning -->
<div class="recipe" data-toggle="collapse" data-target="#excerpt_from_start">Create an excerpt, starting from the beginning of the file</div>
<div id="excerpt_from_start" class="collapse">
<label class="recipe" for="excerpt_from_start">Create an excerpt, starting from the beginning of the file</label>
<input type="checkbox" id="excerpt_from_start">
<div class="hiding">
<h3>Excerpt from beginning</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_file</i> -t <i>5</i> -c copy -map 0 <i>output_file</i></code></p>
@ -869,8 +897,9 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
<!-- ends Excerpt from beginning -->
<!-- Excerpt to end -->
<div class="recipe" data-toggle="collapse" data-target="#excerpt_to_end">Create a new video file with the first five seconds trimmed off the original</div>
<div id="excerpt_to_end" class="collapse">
<label class="recipe" for="excerpt_to_end">Create a new video file with the first five seconds trimmed off the original</label>
<input type="checkbox" id="excerpt_to_end">
<div class="hiding">
<h3>Excerpt to end</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_file</i> -ss <i>5</i> -c copy -map 0 <i>output_file</i></code></p>
@ -887,8 +916,9 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
<!-- ends Excerpt to end -->
<!-- Excerpt from end -->
<div class="recipe" data-toggle="collapse" data-target="#excerpt_from_end">Create a new video file with the final five seconds of the original</div>
<div id="excerpt_from_end" class="collapse">
<label class="recipe" for="excerpt_from_end">Create a new video file with the final five seconds of the original</label>
<input type="checkbox" id="excerpt_from_end">
<div class="hiding">
<h3>Excerpt from end</h3>
<p class="link"></p>
<p><code>ffmpeg -sseof <i>-5</i> -i <i>input_file</i> -c copy -map 0 <i>output_file</i></code></p>
@ -909,8 +939,9 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
<h2 id="interlacing">Work with interlaced video</h2>
<!-- NTSC to H.264 -->
<div class="recipe" data-toggle="collapse" data-target="#ntsc_to_h264">Upscaled, pillar-boxed HD H.264 access files from SD NTSC source</div>
<div id="ntsc_to_h264" class="collapse">
<label class="recipe" for="ntsc_to_h264">Upscaled, pillar-boxed HD H.264 access files from SD NTSC source</label>
<input type="checkbox" id="ntsc_to_h264">
<div class="hiding">
<h3>Upscaled, Pillar-boxed HD H.264 Access Files from SD NTSC source</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_file</i> -c:v libx264 -filter:v "yadif, scale=1440:1080:flags=lanczos, pad=1920:1080:(ow-iw)/2:(oh-ih)/2, format=yuv420p" <i>output_file</i></code></p>
@ -932,8 +963,9 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
<!-- ends NTSC to H.264 -->
<!-- Deinterlace video -->
<div class="recipe" data-toggle="collapse" data-target="#deinterlace">Deinterlace video</div>
<div id="deinterlace" class="collapse">
<label class="recipe" for="deinterlace">Deinterlace video</label>
<input type="checkbox" id="deinterlace">
<div class="hiding">
<h3>Deinterlace a video</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_file</i> -c:v libx264 -vf "yadif,format=yuv420p" <i>output_file</i></code></p>
@ -966,8 +998,9 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
<!-- ends Deinterlace video -->
<!-- Inverse telecine -->
<div class="recipe" data-toggle="collapse" data-target="#inverse-telecine">Inverse telecine</div>
<div id="inverse-telecine" class="collapse">
<label class="recipe" for="inverse-telecine">Inverse telecine</label>
<input type="checkbox" id="inverse-telecine">
<div class="hiding">
<h3>Inverse telecine a video file</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_file</i> -c:v libx264 -vf "fieldmatch,yadif,decimate" <i>output_file</i></code></p>
@ -996,8 +1029,9 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
<!-- ends Inverse telecine -->
<!-- Set field order -->
<div class="recipe" data-toggle="collapse" data-target="#set_field_order">Set field order for interlaced video</div>
<div id="set_field_order" class="collapse">
<label class="recipe" for="set_field_order">Set field order for interlaced video</label>
<input type="checkbox" id="set_field_order">
<div class="hiding">
<h3>Change field order of an interlaced video</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_file</i> -c:v <i>video_codec</i> -filter:v setfield=tff <i>output_file</i></code></p>
@ -1012,8 +1046,9 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
<!-- ends Set field order -->
<!-- Check interlacement -->
<div class="recipe" data-toggle="collapse" data-target="#check_interlacement">Identify interlacement patterns in a video file</div>
<div id="check_interlacement" class="collapse">
<label class="recipe" for="check_interlacement">Identify interlacement patterns in a video file</label>
<input type="checkbox" id="check_interlacement">
<div class="hiding">
<h3>Check video file interlacement patterns</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input file</i> -filter:v idet -f null -</code></p>
@ -1032,8 +1067,9 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
<h2 id="overlay">Overlay timecode or text</h2>
<!-- Text Watermark -->
<div class="recipe" data-toggle="collapse" data-target="#text_watermark">Create opaque centered text watermark</div>
<div id="text_watermark" class="collapse">
<label class="recipe" for="text_watermark">Create opaque centered text watermark</label>
<input type="checkbox" id="text_watermark">
<div class="hiding">
<h3>Create centered, transparent text watermark</h3>
<p class="link"></p>
<p>E.g For creating access copies with your institutions name</p>
@ -1057,8 +1093,9 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
<!-- ends Text watermark -->
<!-- Transparent Image Watermark -->
<div class="recipe" data-toggle="collapse" data-target="#image_watermark">Overlay image watermark on video</div>
<div id="image_watermark" class="collapse">
<label class="recipe" for="image_watermark">Overlay image watermark on video</label>
<input type="checkbox" id="image_watermark">
<div class="hiding">
<h3>Overlay image watermark on video</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_video file</i> -i <i>input_image_file</i> -filter_complex overlay=main_w-overlay_w-5:5 <i>output_file</i></code></p>
@ -1073,8 +1110,9 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
<!-- ends Image Watermark -->
<!-- Burn in timecode-->
<div class="recipe" data-toggle="collapse" data-target="#burn_in_timecode">Burn in timecode</div>
<div id="burn_in_timecode" class="collapse">
<label class="recipe" for="burn_in_timecode">Burn in timecode</label>
<input type="checkbox" id="burn_in_timecode">
<div class="hiding">
<h3>Create a burnt in timecode on your image</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_file</i> -vf drawtext="fontfile=<i>font_path</i>:fontsize=<i>font_size</i>:timecode=<i>starting_timecode</i>:fontcolor=<i>font_colour</i>:box=1:boxcolor=<i>box_colour</i>:rate=<i>timecode_rate</i>:x=(w-text_w)/2:y=h/1.2" <i>output_file</i></code></p>
@ -1103,8 +1141,9 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
<h2 id="create-images">Create thumbnails or GIFs</h2>
<!-- One thumbnail -->
<div class="recipe" data-toggle="collapse" data-target="#one_thumbnail">Export one thumbnail per video file</div>
<div id="one_thumbnail" class="collapse">
<label class="recipe" for="one_thumbnail">Export one thumbnail per video file</label>
<input type="checkbox" id="one_thumbnail">
<div class="hiding">
<h3>One thumbnail</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_file</i> -ss 00:00:20 -vframes 1 thumb.png</code></p>
@ -1120,8 +1159,9 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
<!-- ends One thumbnail -->
<!-- Multi thumbnail -->
<div class="recipe" data-toggle="collapse" data-target="#multi_thumbnail">Export many thumbnails per video file</div>
<div id="multi_thumbnail" class="collapse">
<label class="recipe" for="multi_thumbnail">Export many thumbnails per video file</label>
<input type="checkbox" id="multi_thumbnail">
<div class="hiding">
<h3>Many thumbnails</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_file</i> -vf fps=1/60 out%d.png</code></p>
@ -1137,8 +1177,9 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
<!-- ends Multi thumbnail -->
<!-- Images to GIF -->
<div class="recipe" data-toggle="collapse" data-target="#img_to_gif">Create GIF from still images</div>
<div id="img_to_gif" class="collapse">
<label class="recipe" for="img_to_gif">Create GIF from still images</label>
<input type="checkbox" id="img_to_gif">
<div class="hiding">
<h3>Images to GIF</h3>
<p class="link"></p>
<p><code>ffmpeg -f image2 -framerate 9 -pattern_type glob -i <i>"input_image_*.jpg"</i> -vf scale=250x250 <i>output_file</i>.gif</code></p>
@ -1157,8 +1198,9 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
<!-- ends Images to GIF -->
<!-- Create GIF -->
<div class="recipe" data-toggle="collapse" data-target="#create_gif">Create GIF from a video</div>
<div id="create_gif" class="collapse">
<label class="recipe" for="create_gif">Create GIF from a video</label>
<input type="checkbox" id="create_gif">
<div class="hiding">
<h3>Create GIF</h3>
<p class="link"></p>
<p>Create high quality GIF</p>
@ -1193,8 +1235,9 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
<h2 id="create-video">Create a video from images</h2>
<!-- Images to video -->
<div class="recipe" data-toggle="collapse" data-target="#images_2_video">Transcode an image sequence into uncompressed 10-bit video</div>
<div id="images_2_video" class="collapse">
<label class="recipe" for="images_2_video">Transcode an image sequence into uncompressed 10-bit video</label>
<input type="checkbox" id="images_2_video">
<div class="hiding">
<h3>Transcode an image sequence into uncompressed 10-bit video</h3>
<p class="link"></p>
<p><code>ffmpeg -f image2 -framerate 24 -i <i>input_file_%06d.ext</i> -c:v v210 <i>output_file</i></code></p>
@ -1211,8 +1254,9 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
<!-- ends Images to video -->
<!-- Create video from image and audio -->
<div class="recipe" data-toggle="collapse" data-target="#image-audio">Create video from image and audio</div>
<div id="image-audio" class="collapse">
<label class="recipe" for="image-audio">Create video from image and audio</label>
<input type="checkbox" id="image-audio">
<div class="hiding">
<h3>Create a video from an image and audio file.</h3>
<p class="link"></p>
<p><code>ffmpeg -r 1 -loop 1 -i <i>image_file</i> -i <i>audio_file</i> -acodec copy -shortest -vf scale=1280:720 <i>output_file</i></code></p>
@ -1236,8 +1280,9 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
<h2 id="filters-scopes">Use filters or scopes</h2>
<!-- abitscope -->
<div class="recipe" data-toggle="collapse" data-target="#abitscope">Audio Bitscope</div>
<div id="abitscope" class="collapse">
<label class="recipe" for="abitscope">Audio Bitscope</label>
<input type="checkbox" id="abitscope">
<div class="hiding">
<h3>Creates a visualization of the bits in an audio stream</h3>
<p class="link"></p>
<p><code>ffplay -f lavfi "amovie=<i>input_file</i>, asplit=2[out1][a], [a]abitscope=colors=purple|yellow[out0]"</code></p>
@ -1258,8 +1303,9 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
<!-- ends abitscope -->
<!-- astats -->
<div class="recipe" data-toggle="collapse" data-target="#astats">Play a graphical output showing decibel levels of an input file</div>
<div id="astats" class="collapse">
<label class="recipe" for="astats">Play a graphical output showing decibel levels of an input file</label>
<input type="checkbox" id="astats">
<div class="hiding">
<h3>Plays a graphical output showing decibel levels of an input file</h3>
<p class="link"></p>
<p><code>ffplay -f lavfi "amovie='input.mp3', astats=metadata=1:reset=1, adrawgraph=lavfi.astats.Overall.Peak_level:max=0:min=-30.0:size=700x256:bg=Black[out]"</code></p>
@ -1286,8 +1332,9 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
<!-- ends astats -->
<!-- BRNG -->
<div class="recipe" data-toggle="collapse" data-target="#brng">Identify pixels out of broadcast range</div>
<div id="brng" class="collapse">
<label class="recipe" for="brng">Identify pixels out of broadcast range</label>
<input type="checkbox" id="brng">
<div class="hiding">
<h3>Shows all pixels outside of broadcast range</h3>
<p class="link"></p>
<p><code>ffplay -f lavfi "movie='<i>input.mp4</i>', signalstats=out=brng:color=cyan[out]"</code></p>
@ -1310,8 +1357,9 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
<!-- ends BRNG -->
<!-- Vectorscope -->
<div class="recipe" data-toggle="collapse" data-target="#vectorscope">Vectorscope from video to screen</div>
<div id="vectorscope" class="collapse">
<label class="recipe" for="vectorscope">Vectorscope from video to screen</label>
<input type="checkbox" id="vectorscope">
<div class="hiding">
<h3>Plays vectorscope of video</h3>
<p class="link"></p>
<p><code>ffplay <i>input_file</i> -vf "split=2[m][v], [v]vectorscope=b=0.7:m=color3:g=green[v], [m][v]overlay=x=W-w:y=H-h"</code></p>
@ -1331,8 +1379,9 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
<!-- ends Vectorscope -->
<!--Side by Side Videos/Temporal Difference Filter-->
<div class="recipe" data-toggle="collapse" data-target="#tempdif">Side by Side Videos/Temporal Difference Filter</div>
<div id="tempdif" class="collapse">
<label class="recipe" for="tempdif">Side by Side Videos/Temporal Difference Filter</label>
<input type="checkbox" id="tempdif">
<div class="hiding">
<h3>This will play two input videos side by side while also applying the temporal difference filter to them</h3>
<p class="link"></p>
<p><code>ffmpeg -i input01 -i input02 -filter_complex "[0:v:0]tblend=all_mode=difference128[a];[1:v:0]tblend=all_mode=difference128[b];[a][b]hstack[out]" -map [out] -f nut -c:v rawvideo - | ffplay -</code></p>
@ -1364,8 +1413,9 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
<h2 id="metadata">View or strip metadata</h2>
<!-- Pull specs -->
<div class="recipe" data-toggle="collapse" data-target="#pull_specs">Pull specs from video file</div>
<div id="pull_specs" class="collapse">
<label class="recipe" for="pull_specs">Pull specs from video file</label>
<input type="checkbox" id="pull_specs">
<div class="hiding">
<h3>Pull specs from video file</h3>
<p class="link"></p>
<p><code>ffprobe -i <i>input_file</i> -show_format -show_streams -show_data -print_format xml</code></p>
@ -1383,8 +1433,9 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
<!-- ends Pull specs -->
<!-- Strip metadata -->
<div class="recipe" data-toggle="collapse" data-target="#strip_metadata">Strip metadata</div>
<div id="strip_metadata" class="collapse">
<label class="recipe" for="strip_metadata">Strip metadata</label>
<input type="checkbox" id="strip_metadata">
<div class="hiding">
<h3>Strips metadata from video file</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_file</i> -map_metadata -1 -c:v copy -c:a copy <i>output_file</i></code></p>
@ -1404,8 +1455,9 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
<h2 id="preservation">Preservation tasks</h2>
<!-- batch processing (Mac/Linux) -->
<div class="recipe" data-toggle="collapse" data-target="#batch_processing_bash">Batch processing (Mac/Linux)</div>
<div id="batch_processing_bash" class="collapse">
<label class="recipe" for="batch_processing_bash">Batch processing (Mac/Linux)</label>
<input type="checkbox" id="batch_processing_bash">
<div class="hiding">
<h3>Create Bash script to batch process with FFmpeg</h3>
<p class="link"></p>
<p>Bash scripts are plain text files saved with a .sh extension. This entry explains how they work with the example of a bash script named “Rewrap-MXF.sh”, which rewraps .mxf files in a given directory to .mov files.</p>
@ -1433,8 +1485,9 @@ e.g.: <code>ffmpeg -f concat -safe 0 -i mylist.txt -c copy <i>output_file</i></c
<!-- ends batch processing (Mac/Linux) -->
<!-- batch processing (Windows) -->
<div class="recipe" data-toggle="collapse" data-target="#batch_processing_win">Batch processing (Windows)</div>
<div id="batch_processing_win" class="collapse">
<label class="recipe" for="batch_processing_win">Batch processing (Windows)</label>
<input type="checkbox" id="batch_processing_win">
<div class="hiding">
<h3>Create PowerShell script to batch process with FFmpeg</h3>
<p class="link"></p>
<p>As of Windows 10, it is possible to run Bash via <a href="https://msdn.microsoft.com/en-us/commandline/wsl/about" target="_blank">Bash on Ubuntu on Windows</a>, allowing you to use <a href="index.html#batch_processing_bash">bash scripting</a>. To enable Bash on Windows, see <a href="https://msdn.microsoft.com/en-us/commandline/wsl/install_guide" target="_blank">these instructions</a>.</p>
@ -1466,8 +1519,9 @@ ffmpeg -i $file -map 0 -c copy $output
<!-- ends batch processing (Windows) -->
<!-- Create frame md5s -->
<div class="recipe" data-toggle="collapse" data-target="#create_frame_md5s_v">Create MD5 checksums (video frames)</div>
<div id="create_frame_md5s_v" class="collapse">
<label class="recipe" for="create_frame_md5s_v">Create MD5 checksums (video frames)</label>
<input type="checkbox" id="create_frame_md5s_v">
<div class="hiding">
<h3>Create MD5 checksums (video frames)</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_file</i> -f framemd5 -an <i>output_file</i></code></p>
@ -1484,8 +1538,9 @@ ffmpeg -i $file -map 0 -c copy $output
<!-- ends Create frame md5s -->
<!-- Create frame md5s (audio) -->
<div class="recipe" data-toggle="collapse" data-target="#create_frame_md5s_a">Create MD5 checksums (audio samples)</div>
<div id="create_frame_md5s_a" class="collapse">
<label class="recipe" for="create_frame_md5s_a">Create MD5 checksums (audio samples)</label>
<input type="checkbox" id="create_frame_md5s_a">
<div class="hiding">
<h3>Create MD5 checksums (audio samples)</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_file</i> -af "asetnsamples=n=48000" -f framemd5 -vn <i>output_file</i></code></p>
@ -1509,8 +1564,9 @@ ffmpeg -i $file -map 0 -c copy $output
<!-- ends Create frame md5s (audio) -->
<!-- QCTools Report -->
<div class="recipe" data-toggle="collapse" data-target="#qctools">QCTools report (with audio)</div>
<div id="qctools" class="collapse">
<label class="recipe" for="qctools">QCTools report (with audio)</label>
<input type="checkbox" id="qctools">
<div class="hiding">
<h3>Creates a QCTools report</h3>
<p class="link"></p>
<p><code>ffprobe -f lavfi -i "movie=<i>input_file</i>:s=v+a[in0][in1], [in0]signalstats=stat=tout+vrep+brng, cropdetect=reset=1:round=1, idet=half_life=1, split[a][b];[a]field=top[a1];[b]field=bottom, split[b1][b2];[a1][b1]psnr[c1];[c1][b2]ssim[out0];[in1]ebur128=metadata=1, astats=metadata=1:reset=1:length=0.4[out1]" -show_frames -show_versions -of xml=x=1:q=1 -noprivate | gzip > <i>input_file</i>.qctools.xml.gz</code></p>
@ -1533,8 +1589,9 @@ ffmpeg -i $file -map 0 -c copy $output
<!-- ends QCTools Report -->
<!-- QCTools Report (no audio) -->
<div class="recipe" data-toggle="collapse" data-target="#qctools_no_audio">QCTools report (no audio)</div>
<div id="qctools_no_audio" class="collapse">
<label class="recipe" for="qctools_no_audio">QCTools report (no audio)</label>
<input type="checkbox" id="qctools_no_audio">
<div class="hiding">
<h3>Creates a QCTools report</h3>
<p class="link"></p>
<p><code>ffprobe -f lavfi -i "movie=<i>input_file</i>,signalstats=stat=tout+vrep+brng, cropdetect=reset=1:round=1, idet=half_life=1, split[a][b];[a]field=top[a1];[b]field=bottom,split[b1][b2];[a1][b1]psnr[c1];[c1][b2]ssim" -show_frames -show_versions -of xml=x=1:q=1 -noprivate | gzip > <i>input_file</i>.qctools.xml.gz</code></p>
@ -1557,8 +1614,9 @@ ffmpeg -i $file -map 0 -c copy $output
<!-- ends QCTools Report (no audio) -->
<!-- Check FFV1 fixity -->
<div class="recipe" data-toggle="collapse" data-target="#check_FFV1_fixity">Check FFV1 fixity</div>
<div id="check_FFV1_fixity" class="collapse">
<label class="recipe" for="check_FFV1_fixity">Check FFV1 fixity</label>
<input type="checkbox" id="check_FFV1_fixity">
<div class="hiding">
<h3>Check FFV1 Version 3 fixity</h3>
<p class="link"></p>
<p><code>ffmpeg -report -i <i>input_file</i> -f null -</code></p>
@ -1575,8 +1633,9 @@ ffmpeg -i $file -map 0 -c copy $output
<!-- ends Check FFV1 Fixity -->
<!-- Read/Extract EIA-608 Closed Captions -->
<div class="recipe" data-toggle="collapse" data-target="#readeia608">Read/Extract EIA-608 Closed Captioning</div>
<div id="readeia608" class="collapse">
<label class="recipe" for="readeia608">Read/Extract EIA-608 Closed Captioning</label>
<input type="checkbox" id="readeia608">
<div class="hiding">
<h3>Read/Extract EIA-608 (Line 21) closed captioning</h3>
<p class="link"></p>
<p><code>ffprobe -f lavfi -i movie=<i>input_file</i>,readeia608 -show_entries frame=pkt_pts_time:frame_tags=lavfi.readeia608.0.line,lavfi.readeia608.0.cc,lavfi.readeia608.1.line,lavfi.readeia608.1.cc -of csv > <i>input_file</i>.csv</code></p>
@ -1603,8 +1662,9 @@ ffmpeg -i $file -map 0 -c copy $output
<h2 id="test-files">Generate test files</h2>
<!-- Mandelbrot -->
<div class="recipe" data-toggle="collapse" data-target="#mandelbrot">Make a mandelbrot test pattern video</div>
<div id="mandelbrot" class="collapse">
<label class="recipe" for="mandelbrot">Make a mandelbrot test pattern video</label>
<input type="checkbox" id="mandelbrot">
<div class="hiding">
<h3>Makes a mandelbrot test pattern video</h3>
<p class="link"></p>
<p><code>ffmpeg -f lavfi -i mandelbrot=size=1280x720:rate=25 -c:v libx264 -t 10 <i>output_file</i></code></p>
@ -1620,8 +1680,9 @@ ffmpeg -i $file -map 0 -c copy $output
<!-- ends Mandelbrot -->
<!-- SMPTE bars -->
<div class="recipe" data-toggle="collapse" data-target="#smpte_bars">Make a SMPTE bars test pattern video</div>
<div id="smpte_bars" class="collapse">
<label class="recipe" for="smpte_bars">Make a SMPTE bars test pattern video</label>
<input type="checkbox" id="smpte_bars">
<div class="hiding">
<h3>Makes a SMPTE bars test pattern video</h3>
<p class="link"></p>
<p><code>ffmpeg -f lavfi -i smptebars=size=720x576:rate=25 -c:v prores -t 10 <i>output_file</i></code></p>
@ -1637,8 +1698,9 @@ ffmpeg -i $file -map 0 -c copy $output
<!-- ends SMPTE bars -->
<!-- Test pattern video -->
<div class="recipe" data-toggle="collapse" data-target="#test">Make a test pattern video</div>
<div id="test" class="collapse">
<label class="recipe" for="test">Make a test pattern video</label>
<input type="checkbox" id="test">
<div class="hiding">
<h3>Make a test pattern video</h3>
<p class="link"></p>
<p><code>ffmpeg -f lavfi -i testsrc=size=720x576:rate=25 -c:v v210 -t 10 <i>output_file</i></code></p>
@ -1655,8 +1717,9 @@ ffmpeg -i $file -map 0 -c copy $output
<!-- ends Test pattern video -->
<!-- Play HD SMPTE bars -->
<div class="recipe" data-toggle="collapse" data-target="#play_hd_smpte">Play HD SMPTE bars</div>
<div id="play_hd_smpte" class="collapse">
<label class="recipe" for="play_hd_smpte">Play HD SMPTE bars</label>
<input type="checkbox" id="play_hd_smpte">
<div class="hiding">
<h3>Play HD SMPTE bars</h3>
<p class="link"></p>
<p>Test an HD video projector by playing the SMPTE colour bars pattern.</p>
@ -1670,8 +1733,9 @@ ffmpeg -i $file -map 0 -c copy $output
<!-- ends Play HD SMPTE bars -->
<!-- Play VGA SMPTE bars -->
<div class="recipe" data-toggle="collapse" data-target="#play_vga_smpte">Play VGA SMPTE bars</div>
<div id="play_vga_smpte" class="collapse">
<label class="recipe" for="play_vga_smpte">Play VGA SMPTE bars</label>
<input type="checkbox" id="play_vga_smpte">
<div class="hiding">
<h3>Play VGA SMPTE bars</h3>
<p class="link"></p>
<p>Test a VGA (SD) video projector by playing the SMPTE colour bars pattern.</p>
@ -1685,8 +1749,9 @@ ffmpeg -i $file -map 0 -c copy $output
<!-- ends Play VGA SMPTE bars -->
<!-- Sine wave -->
<div class="recipe" data-toggle="collapse" data-target="#sine_wave">Generate a sine wave test audio file</div>
<div id="sine_wave" class="collapse">
<label class="recipe" for="sine_wave">Generate a sine wave test audio file</label>
<input type="checkbox" id="sine_wave">
<div class="hiding">
<h3>Sine wave</h3>
<p class="link"></p>
<p>Generate a test audio file playing a sine wave.</p>
@ -1702,8 +1767,9 @@ ffmpeg -i $file -map 0 -c copy $output
<!-- ends Sine wave -->
<!-- SMPTE bars + Sine wave -->
<div class="recipe" data-toggle="collapse" data-target="#smpte_bars_and_sine_wave">SMPTE bars + Sine wave audio</div>
<div id="smpte_bars_and_sine_wave" class="collapse">
<label class="recipe" for="smpte_bars_and_sine_wave">SMPTE bars + Sine wave audio</label>
<input type="checkbox" id="smpte_bars_and_sine_wave">
<div class="hiding">
<h3>SMPTE bars + Sine wave audio</h3>
<p class="link"></p>
<p>Generate a SMPTE bars test video + a 1kHz sine wave as audio testsignal.</p>
@ -1723,8 +1789,9 @@ ffmpeg -i $file -map 0 -c copy $output
<!-- ends SMPTE bars + Sine wave -->
<!-- Broken File -->
<div class="recipe" data-toggle="collapse" data-target="#broken_file">Make a broken file</div>
<div id="broken_file" class="collapse">
<label class="recipe" for="broken_file">Make a broken file</label>
<input type="checkbox" id="broken_file">
<div class="hiding">
<h3>Makes a broken test file</h3>
<p class="link"></p>
<p>Modifies an existing, functioning file and intentionally breaks it for testing purposes.</p>
@ -1744,8 +1811,9 @@ ffmpeg -i $file -map 0 -c copy $output
<h2 id="ocr">Use OCR</h2>
<!-- Show OCR -->
<div class="recipe" data-toggle="collapse" data-target="#ocr_on_top">Play video with OCR</div>
<div id="ocr_on_top" class="collapse">
<label class="recipe" for="ocr_on_top">Play video with OCR</label>
<input type="checkbox" id="ocr_on_top">
<div class="hiding">
<h3>Plays video with OCR on top</h3>
<p class="link"></p>
<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>
@ -1767,8 +1835,9 @@ ffmpeg -i $file -map 0 -c copy $output
<!-- ends Show OCR -->
<!-- Export OCR -->
<div class="recipe" data-toggle="collapse" data-target="#ffprobe_ocr">Export OCR from video to screen</div>
<div id="ffprobe_ocr" class="collapse">
<label class="recipe" for="ffprobe_ocr">Export OCR from video to screen</label>
<input type="checkbox" id="ffprobe_ocr">
<div class="hiding">
<h3>Exports OCR data to screen</h3>
<p class="link"></p>
<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>
@ -1788,8 +1857,9 @@ ffmpeg -i $file -map 0 -c copy $output
<h2 id="perceptual-similarity">Compare perceptual similarity of videos</h2>
<!-- Compare Video Fingerprints -->
<div class="recipe" data-toggle="collapse" data-target="#compare_video_fingerprints">Compare Video Fingerprints</div>
<div id="compare_video_fingerprints" class="collapse">
<label class="recipe" for="compare_video_fingerprints">Compare Video Fingerprints</label>
<input type="checkbox" id="compare_video_fingerprints">
<div class="hiding">
<h3>Compare two video files for content similarity using perceptual hashing</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_one</i> -i <i>input_two</i> -filter_complex signature=detectmode=full:nb_inputs=2 -f null -</code></p>
@ -1805,8 +1875,9 @@ ffmpeg -i $file -map 0 -c copy $output
<!-- ends Compare Video Fingerprints -->
<!-- Generate Video Fingerprint -->
<div class="recipe" data-toggle="collapse" data-target="#generate_video_fingerprint">Generate Video Fingerprint</div>
<div id="generate_video_fingerprint" class="collapse">
<label class="recipe" for="generate_video_fingerprint">Generate Video Fingerprint</label>
<input type="checkbox" id="generate_video_fingerprint">
<div class="hiding">
<h3>Generate a perceptual hash for an input video file</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input</i> -vf signature=format=xml:filename="output.xml" -an -f null -</code></p>
@ -1825,8 +1896,9 @@ ffmpeg -i $file -map 0 -c copy $output
<h2 id="other">Other</h2>
<!-- Play image sequence -->
<div class="recipe" data-toggle="collapse" data-target="#play_im_seq">Play an image sequence</div>
<div id="play_im_seq" class="collapse">
<label class="recipe" for="play_im_seq">Play an image sequence</label>
<input type="checkbox" id="play_im_seq">
<div class="hiding">
<h3>Play an image sequence</h3>
<p class="link"></p>
<p>Play an image sequence directly as moving images, without having to create a video first.</p>
@ -1846,8 +1918,9 @@ ffmpeg -i $file -map 0 -c copy $output
<!-- ends Play image sequence -->
<!-- Split audio and video tracks -->
<div class="recipe" data-toggle="collapse" data-target="#split_audio_video">Split audio and video tracks</div>
<div id="split_audio_video" class="collapse">
<label class="recipe" for="split_audio_video">Split audio and video tracks</label>
<input type="checkbox" id="split_audio_video">
<div class="hiding">
<h3>Split audio and video tracks</h3>
<p class="link"></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>
@ -1864,8 +1937,9 @@ ffmpeg -i $file -map 0 -c copy $output
<!-- ends Split audio and video tracks -->
<!-- Flip image -->
<div class="recipe" data-toggle="collapse" data-target="#flip_image">Flip video image</div>
<div id="flip_image" class="collapse">
<label class="recipe" for="flip_image">Flip video image</label>
<input type="checkbox" id="flip_image">
<div class="hiding">
<h3>Flip the video image horizontally and/or vertically</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_file</i> -filter:v "hflip,vflip" -c:a copy <i>output_file</i></code></p>
@ -1881,8 +1955,9 @@ ffmpeg -i $file -map 0 -c copy $output
<!-- ends Flip image -->
<!-- Create ISO -->
<div class="recipe" data-toggle="collapse" data-target="#create_iso">Create ISO files for DVD access</div>
<div id="create_iso" class="collapse">
<label class="recipe" for="create_iso">Create ISO files for DVD access</label>
<input type="checkbox" id="create_iso">
<div class="hiding">
<h3>Create ISO files for DVD access</h3>
<p class="link"></p>
<p>Create an ISO file that can be used to burn a DVD. Please note, you will have to install dvdauthor. To install dvd author using Homebrew run: <code>brew install dvdauthor</code></p>
@ -1899,8 +1974,9 @@ ffmpeg -i $file -map 0 -c copy $output
<!-- ends Create ISO -->
<!-- Scene Detection using YDIF -->
<div class="recipe" data-toggle="collapse" data-target="#csv-ydif">CSV with timecodes and YDIF</div>
<div id="csv-ydif" class="collapse">
<label class="recipe" for="csv-ydif">CSV with timecodes and YDIF</label>
<input type="checkbox" id="csv-ydif">
<div class="hiding">
<h3>Exports CSV for scene detection using YDIF</h3>
<p class="link"></p>
<p><code>ffprobe -f lavfi -i movie=<i>input_file</i>,signalstats -show_entries frame=pkt_pts_time:frame_tags=lavfi.signalstats.YDIF -of csv</code></p>
@ -1919,8 +1995,9 @@ ffmpeg -i $file -map 0 -c copy $output
<!-- ends sample Scene Detection using YDIF -->
<!-- Cover head switching noise -->
<div class="recipe" data-toggle="collapse" data-target="#cover_head">Cover head switching noise</div>
<div id="cover_head" class="collapse">
<label class="recipe" for="cover_head">Cover head switching noise</label>
<input type="checkbox" id="cover_head">
<div class="hiding">
<h3>Cover head switching noise</h3>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_file</i> -filter:v drawbox=w=iw:h=7:y=ih-h:t=max <i>output_file</i></code></p>
@ -1943,8 +2020,9 @@ ffmpeg -i $file -map 0 -c copy $output
<!-- ends Cover head switching noise -->
<!-- Record and live-stream simultaneously -->
<div class="recipe" data-toggle="collapse" data-target="#record-and-stream">Record and live-stream simultaneously</div>
<div id="record-and-stream" class="collapse">
<label class="recipe" for="record-and-stream">Record and live-stream simultaneously</label>
<input type="checkbox" id="record-and-stream">
<div class="hiding">
<h3>Record and live-stream simultaneously</h3>
<p class="link"></p>
<p><code>ffmpeg -re -i <i>${INPUTFILE}</i> -map 0 -flags +global_header -vf scale="1280:-1,format=yuv420p" -pix_fmt yuv420p -level 3.1 -vsync passthrough -crf 26 -g 50 -bufsize 3500k -maxrate 1800k -c:v libx264 -c:a aac -b:a 128000 -r:a 44100 -ac 2 -t ${STREAMDURATION} -f tee <i>"[movflags=+faststart]${TARGETFILE}|[f=flv]${STREAMTARGET}"</i></code></p>
@ -1983,8 +2061,9 @@ ffmpeg -i $file -map 0 -c copy $output
<!-- END Record and live-stream at the same time -->
<!-- View Subprogram Info -->
<div class="recipe" data-toggle="collapse" data-target="#view_subprogram_info">View FFmpeg subprogram information</div>
<div id="view_subprogram_info" class="collapse">
<label class="recipe" for="view_subprogram_info">View FFmpeg subprogram information</label>
<input type="checkbox" id="view_subprogram_info">
<div class="hiding">
<h3>View information about a specific decoder, encoder, demuxer, muxer, or filter</h3>
<p class="link"></p>
<p><code>ffmpeg -h <i>type=name</i></code></p>
@ -2005,16 +2084,15 @@ ffmpeg -i $file -map 0 -c copy $output
</div>
<!-- ends View Subprogram info -->
</div>
<!-- sample example -->
<!-- <div class="recipe" data-toggle="collapse" data-target="#*****unique name*****">*****Title****</div>
<!-- <label class="recipe" for="*****unique name*****">*****Title****</label>
<input type="checkbox" id="*****unique name*****">
<div class="hiding">
Change the above data-target field, the hover-over description, the button text, and the below div ID
<div id="*****unique name*****" class="collapse">
<h3>*****Longer title*****</h3>
<p class="link"></p>
<p class="link"></p>
<p><code>ffmpeg -i <i>input_file</i> *****code goes here***** <i>output_file</i></code></p>
<p>This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info! This is all about info!</p>
<dl>
@ -2026,12 +2104,10 @@ ffmpeg -i $file -map 0 -c copy $output
</div> -->
<!-- ends sample example -->
</div>
<!-- ends "content" -->
</div><!-- ends "content" -->
<footer class="footer">
<p>Made with ♥ at <a href="http://wiki.curatecamp.org/index.php/Association_of_Moving_Image_Archivists_%26_Digital_Library_Federation_Hack_Day_2015" target="_blank">AMIA #AVhack15</a>! Contribute to the project via <a href="https://github.com/amiaopensource/ffmprovisr">our GitHub page</a>!</p>
</footer>
</div> <!-- class="grid" -->
</body>
</html>

6
js/bootstrap.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,21 +1,17 @@
$(document).ready(function() {
$(function () {
$('[data-toggle="tooltip"]').tooltip()
});
// open recipe window if a hash is found in URL
if(window.location.hash) {
id = window.location.hash
$(id).collapse('show');
$('html, body').animate({ scrollTop: $(id).offset().top}, 1000);
id = window.location.hash.substring(1)
document.getElementById(id).checked = true;
$('html, body').animate({ scrollTop: $(window.location.hash).offset().top}, 1000);
$(id + " .link").empty();
$(id + " .link").append("<small>Link to this command: <a href="+window.location.href+">"+window.location.href+"</a></small>");
}
// add hash URL when recipe is opened
$('span[data-toggle="collapse"]').on("click", function(){
id = $(this).attr("data-target");
$('label[class="recipe"]').on("click", function(){
id = $(this).attr("for");
window.location.hash = id
$(id + " .link").empty();
$(id + " .link").append("<small>Link to this command: <a href="+window.location.href+">"+window.location.href+"</a></small>");