Skip to content

Commit

Permalink
Add first blog post
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattBlue committed Jul 26, 2022
1 parent 49a5a90 commit 6860e1a
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 8 deletions.
26 changes: 26 additions & 0 deletions site/src/blog/silent-threshold.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{{ comp.header "Why It's Time to Remove --silent-threshold" }}
<body>
{{ comp.nav }}
<section class="section">
<div class="container">
<!-- Titles Are Capitalized in AP Style -->
<h1>Why It's Time To Remove <code>--silent-threshold</code></h1>
<p class="author">Author: <b>WyattBlue</b></p>
<p class="date">Date: <b>July 26, 2022</b></p>
<p>TL;DR use <code>--edit audio:threshold=NUM</code> instead.</p>
<hr>
<p><code>--silent-threshold</code> has been with us since the <a href="https://github.com/WyattBlue/auto-editor/blob/3a2211573742c0e3eb9bcc6e55e21cbcdca661e6/auto-editor.py">literal first day of auto-editor's existence</a>. However, it's continued usage has become problematic. It's finally time to put this aging option to rest.</p>
<h3>Reason 1: It's Too Ambiguous</h3>
<p>Every threshold controls what is considered silent and loud, yet <code>--silent-threshold</code> only controls audio threshold. This used to make sense when auto-editor used to only have one way of automatically editing files. But now, it's not so obvious that it still only controls audio threshold, or really, that <code>--silent-threshold</code> only controls the default value of the <code>threshold</code> attribute of <code>--edit</code>, which leads us to...</p>

<h3>Reason 2: <code>--edit</code>'s Syntax Is So Much Nicer</h3>
<p>With <code>--edit</code>'s syntax, you can edit multiple tracks with different thresholds, something never possible with the <code>--silent-threshold</code>.</p>
<pre><code>auto-editor multi-track.mov --edit 'audio:stream=0,threshold=0.04 or audio:stream=1,threshold=0.09'</code></pre>
<p>It's also much clearer how threshold impacts the editing process while <code>--silent-threshold</code> is much more opaque on how it exactly works and how it interacts with <code>--edit</code>. Why bother explaining how <code>--silent-threshold</code> interacts with <code>--edit</code> to every user when <code>--edit</code> is better in every way?</p>
<h3>Reason 3: It’s Used Surprisingly Little Out in the Wild</h3>
<p><code>--silent-threshold</code> and it's alias <code>-t</code> is used surprising little in scripts. I look at <a href="https://github.com/WyattBlue/auto-editor/network/dependents?package_id=UGFja2FnZS0xMzQ0MTE1MzMz">GitHub's Dependency Graph</a> and watch various YouTube videos showcasing auto-editor to gauge how options are used in the real world, and in all usages I can find, it's never mentioned at all. This might be both that <code>4%</code> is a very good default that doesn't need changing and/or how audio threshold works is unintuitive, which is why it is never explained or used. Whatever the case, this lack of usage means <code>--silent-threshold</code> can be removed without causing annoyance.</p>
<hr>
<h3>Appendix: Why Not Create a Macro?</h3>
<p>When I removed <code>--export-to-premiere</code> and <code>--export-to-final-cut-pro</code> options, I used a 'macro' that essentially silently treats <code>'--export-to-premiere'</code> like <code>'--export premiere'</code> and this allowed users to write the option in the "old style", blissfully unaware of any changes, even when the option and it's help text technically doesn't exist anymore. The reason why I didn't use a similar strategy for <code>--silent-threshold</code> is that any script makers who feel the need to change silent threshold, are the people most who would benefit from the flexibility of <code>--edit</code>.
</body>
</html>
2 changes: 1 addition & 1 deletion site/src/components/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta property="og:title" content="{{ $1 }}">
<meta name="twitter:title" content="{{ $1 }}">
<meta charset="utf-8">
<link rel="stylesheet" href="/style.css?v=1.5.0">
<link rel="stylesheet" href="/style.css?v=1.6.0">
<link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png">
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/index_header.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta property="og:title" content="{{ $1 }}">
<meta name="twitter:title" content="{{ $1 }}">
<meta charset="utf-8">
<link rel="stylesheet" href="/style.css?v=1.5.0">
<link rel="stylesheet" href="/style.css?v=1.6.0">
<meta name="description" property="og:description" content="Automatically edit video and audio by analyzing where sections are silent or still and cut them out.">
<meta name="twitter:description" content="Automatically edit video and audio by analyzing where sections are silent or still and cut them out.">
<link rel="canonical" href="https://auto-editor.com">
Expand Down
17 changes: 11 additions & 6 deletions site/src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ g-emoji {
justify-content: space-between;
}

p, .paragraph {max-width: 75ch;}
p, .paragraph {max-width: 88ch;}
p {
display: block;
margin-block-start: 0.4em;
Expand All @@ -171,7 +171,7 @@ table {
.huge-lite {font-size: 4rem}
h1, .bigger {font-size: 2.5rem}
h2, .big {font-size: 2rem}
h3, .medium {font-size: 1.65rem}
h3, .medium {font-size: 1.75rem}
h4, .smedium {font-size: 1.5rem}
p, li, th, pre, blockquote, .small {font-size: 1.28rem}
.tiny {font-size: 1rem}
Expand All @@ -180,14 +180,17 @@ p, li, th, pre, blockquote, .small {font-size: 1.28rem}
.huge {font-size: 4.5rem}
.huge-lite {font-size: 3.4rem}
h1, .bigger {font-size: 2.3rem}
h2, .big {font-size: 1.8rem}
h3, .medium {font-size: 1.5rem}
h2, .big {font-size: 1.9rem}
h3, .medium {font-size: 1.6rem}
h4, .smedium {font-size: 1.3rem}
p, li, th, pre, blockquote, .small {font-size: 1.2rem}
}

@media (max-width: 55em){
.huge {font-size: 4rem}
.h1, .bigger {font-size: 2rem}
.h2, .big {font-size: 1.7rem}
.h3, .medium {font-size: 1.5rem}
}

#icon {
Expand All @@ -205,6 +208,8 @@ h1, h2 {text-align: center}
h1, h2, th, .bold {font-weight: bold}
.underline {text-decoration: underline}

.author, .date {line-height: 1}
.author {margin-bottom: 0.5rem}

/* Column Styles */

Expand Down Expand Up @@ -232,7 +237,7 @@ h1, h2, th, .bold {font-weight: bold}
html {background-color: white}
.hero {background-color: #EAEAEA}
hr {background-color: #EAEAEA}
h1, h2, h3, p, code, pre, th {color: #323232}
h1, h2, h3, h4, p, code, pre, th {color: #323232}
blockquote {border-left: 5px solid #EAEAEA}
blockquote > p {color: #696969}
pre {background-color: #F9F5F5}
Expand All @@ -250,7 +255,7 @@ li {color: black; text-decoration: black;}
html {background-color: #262626}
.hero {background-color: #4A4A4A}
hr {background-color: #4A4A4A}
h1, h2, h3, p, code, pre, th {color: #F9F7F7}
h1, h2, h3, h4, p, code, pre, th {color: #F9F7F7}
blockquote {border-left: 5px solid #4A4A4A}
blockquote > p {color: #DBDBDB}
pre {background-color: #323232}
Expand Down

0 comments on commit 6860e1a

Please sign in to comment.