mirror of
https://github.com/amiaopensource/ffmprovisr.git
synced 2025-10-21 05:10:03 +02:00
Compare commits
16 Commits
v2019-12-2
...
v2020-05-1
Author | SHA1 | Date | |
---|---|---|---|
|
3984c8aae3 | ||
|
f9ef8dbae3 | ||
|
f814abbc0a | ||
|
843f05cc73 | ||
|
54577f4b28 | ||
|
aa5d63f4c4 | ||
|
dd257331fe | ||
|
feac0ded9b | ||
|
a33ed1d24f | ||
|
020b9fbe73 | ||
|
1df442f6dd | ||
|
3a05c8f440 | ||
|
89642fdd56 | ||
|
a9ec972aef | ||
|
91540a2fb8 | ||
|
2becad3d9c |
28
index.html
28
index.html
@@ -6,8 +6,6 @@
|
||||
<meta charset="utf-8">
|
||||
<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>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -125,6 +123,7 @@
|
||||
<li><code>.mxf</code>: Audio Codec: pcm_s16le, Video Codec: mpeg2video</li>
|
||||
<li><code>.wav</code>: Audio Codec: pcm_s16le (16 bit PCM)</li>
|
||||
</ul>
|
||||
<p class="link"></p>
|
||||
</div>
|
||||
<!-- End Codec Defaults -->
|
||||
|
||||
@@ -276,7 +275,7 @@
|
||||
<input type="checkbox" id="to_prores">
|
||||
<div class="hiding">
|
||||
<h5>Transcode into a deinterlaced Apple ProRes LT</h5>
|
||||
<p><code>ffmpeg -i <em>input_file</em> -c:v prores -profile:v 1 -vf yadif -c:a pcm_s16le <em>output_file</em>.mov</code></p>
|
||||
<p><code>ffmpeg -i <em>input_file</em> -c:v prores -profile:v 1 -vf yadif -c:a pcm_s16le <em>output_file</em></code></p>
|
||||
<p>This command transcodes an input file into a deinterlaced Apple ProRes 422 LT file with 16-bit linear PCM encoded audio. The file is deinterlaced using the yadif filter (Yet Another De-Interlacing Filter).</p>
|
||||
<dl>
|
||||
<dt>ffmpeg</dt><dd>starts the command</dd>
|
||||
@@ -292,7 +291,7 @@
|
||||
<dt>-vf yadif</dt><dd>Runs a deinterlacing video filter (yet another deinterlacing filter) on the new file. <code>-vf</code> is an alias for <code>-filter:v</code>.</dd>
|
||||
<dt>-c:a pcm_s16le</dt><dd>tells FFmpeg to encode the audio stream in 16-bit linear PCM</dd>
|
||||
<dt><em>output_file</em></dt><dd>path, name and extension of the output file<br>
|
||||
The extension for the QuickTime container is <code>.mov</code>.</dd>
|
||||
There are currently three possible containers for ProRes 422 and 4444 which are all supported by FFmpeg: QuickTime (<code>.mov</code>), Matroska (<code>.mkv</code>) and Material eXchange Format (<code>.mxf</code>).</dd>
|
||||
</dl>
|
||||
<p>FFmpeg comes with more than one ProRes encoder:</p>
|
||||
<ul>
|
||||
@@ -729,6 +728,26 @@
|
||||
</div>
|
||||
<!-- ends Modify speed -->
|
||||
|
||||
<!-- Fade both video and audio streams -->
|
||||
<label class="recipe" for="fade_streams">Fade both video and audio streams</label>
|
||||
<input type="checkbox" id="fade_streams">
|
||||
<div class="hiding">
|
||||
<h5>Fade both video and audio streams</h5>
|
||||
<p><code>ffmpeg -i <em>input_file</em> -filter:v "fade=in:st=0:d=1, fade=out:st=59:d=1" -filter:a "afade=in:st=0:d=1, afade=out:st=59:d=1" -c:v libx264 -c:a aac <em>output_file</em></code></p>
|
||||
<p>This command fades in and out the first and last 30 video frames and 44100 audio samples on a video</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>-filter:v "fade=in:st=0:d=1, fade=out:st=59:d=1"</dt><dd>applies a video filter that fades in the first and last 30 video frames</dd>
|
||||
<dt>-filter:a "afade=in:st=0:d=1, afade=out:st=59:d=1"</dt><dd>applies an audio filter that fades in the first and last 30 video frames. <code>st</code> sets the start and <code>d</code> sets the duration.</dd>
|
||||
<dt>-c:v <em>video_codec</em></dt><dd>as a video filter is used, it is not possible to use <code>-c copy</code>. The video must be re-encoded with whatever video codec is chosen, e.g. <code>ffv1</code>, <code>v210</code> or <code>prores</code>.</dd>
|
||||
<dt>-c:a <em>audio_codec</em></dt><dd>as an audio filter is used, it is not possible to use <code>-c copy</code>. The audio must be re-encoded with whatever audio codec is chosen, e.g. <code>aac</code>.</dd>
|
||||
<dt><em>output_file</em></dt><dd>path, name and extension of the output_file</dd>
|
||||
</dl>
|
||||
<p class="link"></p>
|
||||
</div>
|
||||
<!-- ends Fade both video and audio streams -->
|
||||
|
||||
<!-- Synchronize video and audio streams -->
|
||||
<label class="recipe" for="sync_streams">Synchronize video and audio streams</label>
|
||||
<input type="checkbox" id="sync_streams">
|
||||
@@ -2843,5 +2862,6 @@ Change the above data-target field, the hover-over description, the button text,
|
||||
<p>Made with ♥ at <a href="https://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" target="_blank">our GitHub page</a>!</p>
|
||||
</footer>
|
||||
</div><!-- ends "grid" -->
|
||||
<script src="js/js.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
4
js/jquery.min.js
vendored
4
js/jquery.min.js
vendored
File diff suppressed because one or more lines are too long
138
js/js.js
138
js/js.js
@@ -1,52 +1,96 @@
|
||||
$(document).ready(function() {
|
||||
function scrollTo(element, to, duration) {
|
||||
var start = element.scrollTop,
|
||||
change = to - start,
|
||||
currentTime = 0,
|
||||
increment = 20;
|
||||
|
||||
function appendLink(id) {
|
||||
$(id).next('div').find('.link').empty();
|
||||
$(id).next('div').find('.link').append("<small>Link to this command: <a href='https://amiaopensource.github.io/ffmprovisr/index.html" + id + "'>https://amiaopensource.github.io/ffmprovisr/index.html" + id + "</a></small>");
|
||||
}
|
||||
|
||||
function moveToRecipe(id) {
|
||||
document.getElementById(id.substring(1)).checked = true;
|
||||
$('html, body').animate({ scrollTop: $(id).offset().top }, 1000);
|
||||
appendLink(id)
|
||||
}
|
||||
|
||||
// open recipe window if a hash is found in URL
|
||||
if (window.location.hash) {
|
||||
id = window.location.hash
|
||||
moveToRecipe(id)
|
||||
}
|
||||
|
||||
// add hash URL when recipe is opened
|
||||
$('label[class="recipe"]').on("click", function(){
|
||||
id = $(this).attr("for");
|
||||
window.location.hash = ('#' + id)
|
||||
appendLink('#' + id)
|
||||
})
|
||||
|
||||
// open recipe when clicked
|
||||
$('a').on("click", function(){
|
||||
intralink = $(this).attr("href")
|
||||
if (intralink[0] == "#") {
|
||||
moveToRecipe(intralink)
|
||||
var animateScroll = function(){
|
||||
currentTime += increment;
|
||||
var val = Math.easeInOutQuad(currentTime, start, change, duration);
|
||||
element.scrollTop = val;
|
||||
if(currentTime < duration) {
|
||||
setTimeout(animateScroll, increment);
|
||||
}
|
||||
}
|
||||
animateScroll()
|
||||
}
|
||||
|
||||
//t = current time, b = start value, c = change in value, d = duration
|
||||
Math.easeInOutQuad = function (t, b, c, d) {
|
||||
t /= d/2;
|
||||
if (t < 1) return c/2*t*t + b;
|
||||
t--;
|
||||
return -c/2 * (t*(t-2) - 1) + b;
|
||||
}
|
||||
|
||||
function appendLink(id) {
|
||||
const link = document.getElementById(id).nextElementSibling.querySelector('.link')
|
||||
if (link) {
|
||||
link.innerHTML = ("<small>Link to this command: <a href='https://amiaopensource.github.io/ffmprovisr/index.html#" + id + "'>https://amiaopensource.github.io/ffmprovisr/index.html#" + id + "</a></small>")
|
||||
}
|
||||
}
|
||||
|
||||
function moveToRecipe(id) {
|
||||
document.getElementById(id).checked = true;
|
||||
scrollTo(document.body, 0, 1000);
|
||||
appendLink(id)
|
||||
}
|
||||
|
||||
// open recipe window if a hash is found in URL
|
||||
if (window.location.hash) {
|
||||
id = window.location.hash.slice(1)
|
||||
moveToRecipe(id)
|
||||
}
|
||||
|
||||
// add hash URL when recipe is opened
|
||||
const recipes = document.querySelectorAll('label[class="recipe"]')
|
||||
recipes.forEach(function(item, i){
|
||||
item.addEventListener("click", function(){
|
||||
id = this.getAttribute("for");
|
||||
window.location.hash = (id)
|
||||
appendLink(id)
|
||||
})
|
||||
})
|
||||
|
||||
// Collapse all recipes when button is clicked
|
||||
$('#toggle-expand-collapse-all').on("click", function(){
|
||||
var checkboxes = $('input[type=checkbox]');
|
||||
var anyRecipesOpen = $(checkboxes).is(':checked');
|
||||
|
||||
if (anyRecipesOpen) {
|
||||
// Collapse all
|
||||
$('input[type=checkbox]').each(function() {
|
||||
this.checked = false;
|
||||
});
|
||||
} else new Promise(function(resolve, reject) {
|
||||
// Expand all
|
||||
$('input[type=checkbox]').each(function() {
|
||||
this.checked = true;
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
// open recipe when clicked
|
||||
const links = document.querySelectorAll('a')
|
||||
links.forEach(function(item, i){
|
||||
|
||||
item.addEventListener("click", function(){
|
||||
intralink = this.getAttribute("href")
|
||||
if (intralink[0] == "#") {
|
||||
moveToRecipe(intralink.substring(1))
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
function getCheckedBoxes(checkboxes) {
|
||||
var checkboxesChecked = [];
|
||||
for (var i = 0; i < checkboxes.length; i++) {
|
||||
if (checkboxes[i].checked) {
|
||||
checkboxesChecked.push(checkboxes[i]);
|
||||
}
|
||||
}
|
||||
return checkboxesChecked.length > 0 ? checkboxesChecked : null;
|
||||
}
|
||||
|
||||
// Collapse all recipes when button is clicked
|
||||
document.getElementById('toggle-expand-collapse-all').addEventListener("click", function(){
|
||||
const checkboxes = document.querySelectorAll('input[type=checkbox]')
|
||||
var checked = getCheckedBoxes(checkboxes);
|
||||
|
||||
if (checked) {
|
||||
// Collapse all
|
||||
document.querySelectorAll('input[type=checkbox]').forEach(function(item, i){
|
||||
item.checked = false;
|
||||
})
|
||||
} else {
|
||||
// Expand all
|
||||
document.querySelectorAll('input[type=checkbox]').forEach(function(item, i){
|
||||
item.checked = true;
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
|
@@ -10,7 +10,7 @@ Repository of useful FFmpeg command lines for archivists!
|
||||
* [Contributors](#contributors)
|
||||
* [AVHack Team](#avhack-team)
|
||||
* [Sister projects](#sister-projects)
|
||||
* [Awards and mentions](#articles-and-mentions)
|
||||
* [Articles and mentions](#articles-and-mentions)
|
||||
* [License](#license)
|
||||
|
||||
## What is this?
|
||||
|
@@ -1,5 +1,7 @@
|
||||
# Basic rewrap command
|
||||
ffmpeg -i input_file.ext -c copy -map 0 output_file.ext
|
||||
# Generate Broadcast WAV
|
||||
ffmpeg -i input_file.wav -c copy -write_bext 1 -metadata field_name='Content' output_file.wav
|
||||
# Rewrap DV video to .dv file
|
||||
ffmpeg -i input_file -f rawvideo -c:v copy output_file.dv
|
||||
# Transcode to deinterlaced Apple ProRes LT
|
||||
@@ -36,6 +38,8 @@ ffmpeg -i input_file -c:v copy -aspect 4:3 output_file
|
||||
ffmpeg -i input_file -c:v libx264 -vf colormatrix=src:dst output_file
|
||||
# Modify image and sound speed
|
||||
ffmpeg -i input_file -r output_fps -filter_complex "[0:v]setpts=input_fps/output_fps*PTS[v]; [0:a]atempo=output_fps/input_fps[a]" -map "[v]" -map "[a]" output_file
|
||||
# Fade both video and audio streams
|
||||
ffmpeg -i input_file -filter:v "fade=in:st=0:d=1, fade=out:st=59:d=1" -filter:a "afade=in:st=0:d=1, afade=out:st=59:d=1" -c:v libx264 -c:a aac output_file
|
||||
# Synchronize video and audio streams
|
||||
ffmpeg -i input_file -itsoffset 0.125 -i input_file -map 1:v -map 0:a -c copy output_file
|
||||
# Clarify stream properties
|
||||
|
Reference in New Issue
Block a user