mirror of
https://github.com/amiaopensource/ffmprovisr.git
synced 2025-10-13 17:29:58 +02:00
Compare commits
62 Commits
v2019-08-0
...
v2020-05-1
Author | SHA1 | Date | |
---|---|---|---|
|
3984c8aae3 | ||
|
f9ef8dbae3 | ||
|
f814abbc0a | ||
|
843f05cc73 | ||
|
54577f4b28 | ||
|
aa5d63f4c4 | ||
|
dd257331fe | ||
|
feac0ded9b | ||
|
a33ed1d24f | ||
|
020b9fbe73 | ||
|
1df442f6dd | ||
|
3a05c8f440 | ||
|
89642fdd56 | ||
|
a9ec972aef | ||
|
91540a2fb8 | ||
|
2becad3d9c | ||
|
e4c327bbac | ||
|
4359d6dd4a | ||
|
d184ed2fe9 | ||
|
089725a753 | ||
|
897f1b1616 | ||
|
358a2ec23b | ||
|
de6c08a58d | ||
|
0d1fc1bfe8 | ||
|
cbca3ac7ad | ||
|
bcc425a955 | ||
|
0353c1761e | ||
|
e3aa81fb95 | ||
|
633374f22d | ||
|
1d60060eed | ||
|
6cfe7f7a47 | ||
|
fc63116e2f | ||
|
f74f0cde93 | ||
|
832026b57c | ||
|
db330a3a0c | ||
|
c88008a68f | ||
|
b45b2d79e1 | ||
|
e95d915869 | ||
|
059faba357 | ||
|
614b28fd9a | ||
|
e51199bc53 | ||
|
c1aff3fd69 | ||
|
ca0f2a8d0a | ||
|
640672b6f6 | ||
|
84c6f127a2 | ||
|
d180012261 | ||
|
6d9d4fc596 | ||
|
4e0e369bbb | ||
|
96b221642f | ||
|
309a8e7c8d | ||
|
9c3c807af0 | ||
|
aee386d889 | ||
|
6267c1c19a | ||
|
5a1aee1cf2 | ||
|
46fad11207 | ||
|
782b1a992a | ||
|
9f6e6846e0 | ||
|
c4bd6a9191 | ||
|
8b48abf751 | ||
|
54aab85937 | ||
|
51ca7a4200 | ||
|
76c3fe1f88 |
@@ -105,7 +105,7 @@ h2 {
|
||||
margin: 6px 0px 12px 0px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
h3, h5 {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
|
343
index.html
343
index.html
File diff suppressed because it is too large
Load Diff
4
js/jquery.min.js
vendored
4
js/jquery.min.js
vendored
File diff suppressed because one or more lines are too long
112
js/js.js
112
js/js.js
@@ -1,42 +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>");
|
||||
var animateScroll = function(){
|
||||
currentTime += increment;
|
||||
var val = Math.easeInOutQuad(currentTime, start, change, duration);
|
||||
element.scrollTop = val;
|
||||
if(currentTime < duration) {
|
||||
setTimeout(animateScroll, increment);
|
||||
}
|
||||
}
|
||||
animateScroll()
|
||||
}
|
||||
|
||||
function moveToRecipe(id) {
|
||||
document.getElementById(id.substring(1)).checked = true;
|
||||
$('html, body').animate({ scrollTop: $(id).offset().top }, 1000);
|
||||
//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
|
||||
// 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
|
||||
$('label[class="recipe"]').on("click", function(){
|
||||
id = $(this).attr("for");
|
||||
window.location.hash = ('#' + id)
|
||||
appendLink('#' + 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)
|
||||
})
|
||||
})
|
||||
|
||||
// open recipe when clicked
|
||||
$('a').on("click", function(){
|
||||
intralink = $(this).attr("href")
|
||||
|
||||
// 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)
|
||||
moveToRecipe(intralink.substring(1))
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
// open all windows if button is clicked
|
||||
$('#open-all').on("click", function(){
|
||||
$('input[type=checkbox]').each(function(){
|
||||
this.checked = !this.checked;
|
||||
})
|
||||
});
|
||||
|
||||
});
|
||||
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;
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
|
44
readme.md
44
readme.md
@@ -2,6 +2,17 @@
|
||||
|
||||
Repository of useful FFmpeg command lines for archivists!
|
||||
|
||||
* [What is this?](#what-is-this)
|
||||
* [How do I see it?](#how-do-i-see-it)
|
||||
* [How do I contribute?](#how-do-i-contribute)
|
||||
* [Code of conduct](#code-of-conduct)
|
||||
* [Maintainers](#maintainers)
|
||||
* [Contributors](#contributors)
|
||||
* [AVHack Team](#avhack-team)
|
||||
* [Sister projects](#sister-projects)
|
||||
* [Articles and mentions](#articles-and-mentions)
|
||||
* [License](#license)
|
||||
|
||||
## What is this?
|
||||
|
||||
#### Project Objective
|
||||
@@ -72,31 +83,36 @@ You can read our contributor code of conduct [here](https://github.com/amiaopens
|
||||
|
||||
*Code Contributors*:
|
||||
ablwr (Ashley)
|
||||
alavigne12 (A. Lavigne)
|
||||
Anushka-codergirl (Anushka Raj)
|
||||
bastibeckr (Basti Becker)
|
||||
b00giehead (Joanna White)
|
||||
bturkus
|
||||
dericed (Dave Rice)
|
||||
digitensions (Joanna White)
|
||||
edsu (Ed Summers)
|
||||
jamessam (Jim Sam)
|
||||
jfarbowitz (Jonathan Farbowitz)
|
||||
kfrn (Katherine Frances Nagels)
|
||||
kgrons (Kathryn Gronsbell)
|
||||
kieranjol (Kieran O'Leary)
|
||||
llogan (Lou)
|
||||
llogan (Lou Logan)
|
||||
macasaurusrex (Maura)
|
||||
mgiraldo (Mauricio Giraldo)
|
||||
pjotrek-b (Peter B.)
|
||||
privatezero (Andrew Weaver)
|
||||
retokromer (Reto Kromer)
|
||||
rfraimow
|
||||
|
||||
*All Contributors*:
|
||||
All Contributors:
|
||||
ablwr (Ashley)
|
||||
alavigne12 (A. Lavigne)
|
||||
Anushka-codergirl (Anushka Raj)
|
||||
audiovisualopen
|
||||
bastibeckr (Basti Becker)
|
||||
b00giehead (Joanna White)
|
||||
brainwane (Sumana Harihareswara)
|
||||
bturkus
|
||||
dericed (Dave Rice)
|
||||
digitensions (Joanna White)
|
||||
drodz11 (Dave Rodriguez)
|
||||
edsu (Ed Summers)
|
||||
EG-tech (Ethan Gates)
|
||||
@@ -111,7 +127,9 @@ kellyhaydon (metacynic)
|
||||
kfrn (Katherine Frances Nagels)
|
||||
kgrons (Kathryn Gronsbell)
|
||||
kieranjol (Kieran O'Leary)
|
||||
llogan (Lou)
|
||||
llogan (Lou Logan)
|
||||
macasaurusrex (Maura)
|
||||
mercuryswitch
|
||||
mgiraldo (Mauricio Giraldo)
|
||||
mulvya
|
||||
nkrabben (Nick Krabbenhoeft)
|
||||
@@ -121,12 +139,13 @@ retokromer (Reto Kromer)
|
||||
rfraimow
|
||||
richardpl (Paul B Mahol)
|
||||
ross-spencer (Ross Spencer)
|
||||
taschenbach (Tommy Aschenbach)
|
||||
todrobbins (Tod Robbins)
|
||||
|
||||
Repo: amiaopensource/ffmprovisr
|
||||
Code Contributors: 17
|
||||
All Contributors: 32
|
||||
Last updated: 2019-02-11
|
||||
GitHub Contributors: 20
|
||||
All Contributors: 37
|
||||
Last updated: 2019-12-11
|
||||
|
||||
## AVHack Team
|
||||
|
||||
@@ -137,9 +156,18 @@ Last updated: 2019-02-11
|
||||
## Sister projects
|
||||
|
||||
[The Cable Bible](https://amiaopensource.github.io/cable-bible/): A Guide to Cables and Connectors Used for Audiovisual Tech
|
||||
[QEMU QED](https://eaasi.gitlab.io/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.
|
||||
|
||||
## Articles and mentions
|
||||
|
||||
* 2019-09: **Andrew Weaver & Ashley Blewer**, [Sustainability through community: ffmprovisr and the Case for Collaborative Knowledge Transfer](https://ipres2019.org/static/pdf/iPres2019_paper_97.pdf) (PDF), iPRES 2019
|
||||
- Andrew Weaver [won](https://twitter.com/iPRES2019/status/1177136202144768000) iPres' Best First Time Contribution Award for his work on this paper :)
|
||||
* 2018-11: ffmprovisr is mentioned in [a job advert](http://web.library.emory.edu/documents/pa_staff_Audiovisual%20Conservator_Nov2018.pdf)!
|
||||
* 2017-10: **Ashley Blewer & Katherine Nagels**, [ffmprovisr gets a redesign](https://bits.ashleyblewer.com/blog/2017/10/31/ffmprovisr-redesign/)
|
||||
* 2015-11: **AMIA & DLF Hack Day 2015**, [ffmprovsr](https://wiki.curatecamp.org/index.php/Association_of_Moving_Image_Archivists_&_Digital_Library_Federation_Hack_Day_2015#ffmprovsr) - the genesis of ffmprovisr (then spelled without the 'i')
|
||||
|
||||
## License
|
||||
|
||||
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/80x15.png"></a><br>
|
||||
|
12
recipes.txt
12
recipes.txt
@@ -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
|
||||
@@ -17,11 +19,11 @@ ffmpeg -i input_file -c:v libx265 -pix_fmt yuv420p -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
|
||||
ffmpeg -i input_file.wav -write_id3v1 1 -id3v2_version 3 -dither_method rectangular -out_sample_rate 48k -qscale:a 1 output_file.mp3
|
||||
ffmpeg -i input_file.wav -write_id3v1 1 -id3v2_version 3 -dither_method triangular -out_sample_rate 48k -qscale:a 1 output_file.mp3
|
||||
# Generate two access MP3s (with and without copyright).
|
||||
ffmpeg -i input_file -i input_file_to_append -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 output_file.mp3 -map "[concatout]" -codec:a libmp3lame -dither_method modified_e_weighted -qscale:a 2 output_file_appended.mp3
|
||||
ffmpeg -i input_file -i input_file_to_append -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 triangular -qscale:a 2 output_file.mp3 -map "[concatout]" -codec:a libmp3lame -dither_method triangular -qscale:a 2 output_file_appended.mp3
|
||||
# Convert WAV to AAC/MP4
|
||||
ffmpeg -i input_file.wav -c:a aac -b:a 128k -dither_method rectangular -ar 44100 output_file.mp4
|
||||
ffmpeg -i input_file.wav -c:a aac -b:a 128k -dither_method triangular -ar 44100 output_file.mp4
|
||||
# Transform 4:3 aspect ratio into 16:9 with pillarbox
|
||||
ffmpeg -i input_file -filter:v "pad=ih*16/9:ih:(ow-iw)/2:(oh-ih)/2" -c:a copy output_file
|
||||
# Transform 16:9 aspect ratio video into 4:3 with letterbox
|
||||
@@ -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
|
||||
@@ -141,6 +145,8 @@ ffmpeg -i input_file -af "asetnsamples=n=48000" -f framemd5 -vn output_file
|
||||
ffmpeg -i input_file -map 0:v:0 -c:v copy -f md5 output_file_1 -map 0:a:0 -c:a copy -f md5 output_file_2
|
||||
# Get checksum for video/audio stream
|
||||
ffmpeg -loglevel error -i input_file -map 0:v:0 -f hash -hash md5 -
|
||||
# Get individual checksums for all video/audio streams ("Streamhash")
|
||||
ffmpeg -i input_file -map 0 -f streamhash -hash md5 - -v quiet
|
||||
# QCTools report (with audio)
|
||||
ffprobe -f lavfi -i "movie=input_file: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 > input_file.qctools.xml.gz
|
||||
# QCTools report (no audio)
|
||||
|
@@ -1 +1 @@
|
||||
curl https://amiaopensource.github.io/ffmprovisr/ -s | grep -E '<h3>.*</h3>|<p><code>.*</code></p>' | sed 's/.*<code>\(.*\)<\/code>/\1/' | sed 's/.*<h3>\(.*\)<\/h3>/# \1/' | grep -v '\*\*\*' | sed -e 's/<[^>]*>//g'
|
||||
curl https://amiaopensource.github.io/ffmprovisr/ -s | grep -E '<h5>.*</h5>|<p><code>.*</code></p>' | sed 's/.*<code>\(.*\)<\/code>/\1/' | sed 's/.*<h5>\(.*\)<\/h5>/# \1/' | grep -v '\*\*\*' | sed -e 's/<[^>]*>//g'
|
||||
|
Reference in New Issue
Block a user