Updates
This commit is contained in:
parent
9b09d98dfa
commit
f9885ee631
142 changed files with 97 additions and 97 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,4 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover"><style>@font-face{font-family:'Inter Variable';font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/inter-latin-wght-normal-Dx4kXJAl.woff2) format('woff2-variations');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'Inter Variable';font-style:italic;font-display:swap;font-weight:100 900;src:url(/assets/inter-latin-wght-italic-DpCbqKDY.woff2) format('woff2-variations');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}</style><script defer src="https://stats.apps.seigler.net/script.js" data-website-id="ccb4bd94-2a71-47fe-8eea-d85bf75b7f6d"></script><link rel="me" href="https://github.com/seigler"><link rel="webmention" href="https://webmention.io/joshua.seigler.net/webmention"><title>FFmpeg audio cleanup - joshua.seigler.net</title><meta name="description" content="A script to apply dynamic compression and noise reduction to audio files"><meta name="keywords" content="posts, technical, ffmpeg"><meta property="og:title" content="FFmpeg audio cleanup"><meta property="og:type" content=""><meta property="og:url" content="/posts/ffmpeg-audio-cleanup/"><meta name="twitter:title" content="FFmpeg audio cleanup"><meta name="twitter:description" content="A script to apply dynamic compression and noise reduction to audio files"><meta name="twitter:card" content="summary"><meta name="generator" content="Eleventy v3.1.0"><script type="module" crossorigin src="/assets/main-CO6TUTfT.js"></script><link rel="stylesheet" crossorigin href="/assets/main-DuEJPS2d.css"></head><body data-font="english" data-path="/posts/ffmpeg-audio-cleanup/"><header><nav><div class="nav-row"><div class="nav-home"><a href="/">joshua.seigler.net</a></div></div><div class="nav-categories"><a class="nav-active" href="/posts/">/posts</a> <a href="/about/">/about</a> <a href="/now/">/now</a> <a href="/uses/">/uses</a> <a href="/recipes/">/recipes</a> <a href="/music/">/music</a> <a href="/books/">/books</a> <a href="/links/">/links</a> <a href="/search/">/search</a></div></nav><h1>FFmpeg audio cleanup</h1><div class="header-meta"><author>Joshua Seigler</author><date>June 26, 2025</date><span class="tags" style="--totalTags:12"><a class="tag" style="--tagIndex:5" href="/tags/technical/">technical</a> <a class="tag" style="--tagIndex:10" href="/tags/ffmpeg/">ffmpeg</a></span></div></header><header class="toc"></header><main data-pagefind-body="data-pagefind-body"><p>I recently needed to process 20+ phone audio recordings. The files are mp3 recordings in stereo, made in an environment with echoes and noise from fans/heaters.</p><p>Although I could do it easily with <a href="https://tenacityaudio.org/" target="_blank" rel="noopener">Tenacity</a> I didn’t want to use a manual process, since it would take days. So I tried using FFmpeg filters and Bash scripting.</p><p>I found an FFmpeg filter called <a href="https://ffmpeg.org/ffmpeg-filters.html#compand" target="_blank" rel="noopener">compand</a> which lets you map an input decibel range to an output decibel range. I also used the <a href="https://ffmpeg.org/ffmpeg-filters.html#anlmdn" target="_blank" rel="noopener">anlmdn</a> filter to reduce noise, and the <a href="https://ffmpeg.org/ffmpeg-filters.html#highpass" target="_blank" rel="noopener">highpass</a> filter to help with clarity.</p><p>I ran into a couple gotchas.</p><ol><li><code>mpv</code> does something special for audio playback that prevents audio from clipping. <code>vlc</code> plays the file as it is.</li><li>Because the compressor has an attack and decay (which is necessary for things to sound good) it can cause clipping if the volume rises sharply. Applying a <code>delay</code> parameter with half the duration of the attack length fixed this.</li></ol><p>Here is the script:</p><p><code>process-audio.sh</code></p><pre class="language-bash"><code class="language-bash"><span class="token shebang important">#!/bin/bash</span>
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover"><style>@font-face{font-family:'Inter Variable';font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/inter-latin-wght-normal-Dx4kXJAl.woff2) format('woff2-variations');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'Inter Variable';font-style:italic;font-display:swap;font-weight:100 900;src:url(/assets/inter-latin-wght-italic-DpCbqKDY.woff2) format('woff2-variations');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}</style><script defer src="https://stats.apps.seigler.net/script.js" data-website-id="ccb4bd94-2a71-47fe-8eea-d85bf75b7f6d"></script><link rel="me" href="https://github.com/seigler"><link rel="webmention" href="https://webmention.io/joshua.seigler.net/webmention"><title>FFmpeg audio cleanup - joshua.seigler.net</title><meta name="description" content="A script to apply dynamic compression and noise reduction to audio files"><meta name="keywords" content="posts, technical, ffmpeg"><meta property="og:title" content="FFmpeg audio cleanup"><meta property="og:type" content=""><meta property="og:url" content="/posts/ffmpeg-audio-cleanup/"><meta name="twitter:title" content="FFmpeg audio cleanup"><meta name="twitter:description" content="A script to apply dynamic compression and noise reduction to audio files"><meta name="twitter:card" content="summary"><meta name="generator" content="Eleventy v3.1.0"><script type="module" crossorigin src="/assets/main-Be2do0EW.js"></script><link rel="stylesheet" crossorigin href="/assets/main-BAPVljMx.css"></head><body data-font="english" data-path="/posts/ffmpeg-audio-cleanup/"><header><nav><div class="nav-row"><div class="nav-home"><a href="/">joshua.seigler.net</a></div></div><div class="nav-categories"><a class="nav-active" href="/posts/">/posts</a> <a href="/about/">/about</a> <a href="/now/">/now</a> <a href="/uses/">/uses</a> <a href="/recipes/">/recipes</a> <a href="/music/">/music</a> <a href="/books/">/books</a> <a href="/links/">/links</a> <a href="/search/">/search</a></div></nav><h1>FFmpeg audio cleanup</h1><div class="header-meta"><date>June 26, 2025</date><span class="tags" style="--totalTags:12"><a class="tag" style="--tagIndex:5" href="/tags/technical/">technical</a> <a class="tag" style="--tagIndex:10" href="/tags/ffmpeg/">ffmpeg</a></span></div></header><header class="toc"></header><main data-pagefind-body="data-pagefind-body"><p>I recently needed to process 20+ phone audio recordings. The files are mp3 recordings in stereo, made in an environment with echoes and noise from fans/heaters.</p><p>Although I could do it easily with <a href="https://tenacityaudio.org/" target="_blank" rel="noopener">Tenacity</a> I didn’t want to use a manual process, since it would take days. So I tried using FFmpeg filters and Bash scripting.</p><p>I found an FFmpeg filter called <a href="https://ffmpeg.org/ffmpeg-filters.html#compand" target="_blank" rel="noopener">compand</a> which lets you map an input decibel range to an output decibel range. I also used the <a href="https://ffmpeg.org/ffmpeg-filters.html#anlmdn" target="_blank" rel="noopener">anlmdn</a> filter to reduce noise, and the <a href="https://ffmpeg.org/ffmpeg-filters.html#highpass" target="_blank" rel="noopener">highpass</a> filter to help with clarity.</p><p>I ran into a couple gotchas.</p><ol><li><code>mpv</code> does something special for audio playback that prevents audio from clipping. <code>vlc</code> plays the file as it is.</li><li>Because the compressor has an attack and decay (which is necessary for things to sound good) it can cause clipping if the volume rises sharply. Applying a <code>delay</code> parameter with half the duration of the attack length fixed this.</li></ol><p>Here is the script:</p><p><code>process-audio.sh</code></p><pre class="language-bash"><code class="language-bash"><span class="token shebang important">#!/bin/bash</span>
|
||||
<span class="token keyword">if</span> <span class="token punctuation">[</span> <span class="token string">"<span class="token variable">$#</span>"</span> <span class="token operator">==</span> <span class="token string">"0"</span> <span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token keyword">then</span>
|
||||
<span class="token builtin class-name">echo</span> <span class="token string">"Error: no arguments provided."</span>
|
||||
<span class="token builtin class-name">echo</span> <span class="token string">"Usage: <span class="token variable">$0</span> file1 file2 file3 ..."</span>
|
||||
|
|
|
@ -1 +1 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover"><style>@font-face{font-family:'Inter Variable';font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/inter-latin-wght-normal-Dx4kXJAl.woff2) format('woff2-variations');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'Inter Variable';font-style:italic;font-display:swap;font-weight:100 900;src:url(/assets/inter-latin-wght-italic-DpCbqKDY.woff2) format('woff2-variations');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}</style><script defer src="https://stats.apps.seigler.net/script.js" data-website-id="ccb4bd94-2a71-47fe-8eea-d85bf75b7f6d"></script><link rel="me" href="https://github.com/seigler"><link rel="webmention" href="https://webmention.io/joshua.seigler.net/webmention"><title>Finally, a Coherent Worldview - joshua.seigler.net</title><meta name="description" content="Why did I think I could figure everything out on my own?"><meta name="keywords" content="posts, faith, ethos"><meta property="og:title" content="Finally, a Coherent Worldview"><meta property="og:type" content=""><meta property="og:url" content="/posts/finally-a-coherent-worldview/"><meta name="twitter:title" content="Finally, a Coherent Worldview"><meta name="twitter:description" content="Why did I think I could figure everything out on my own?"><meta name="twitter:card" content="summary"><meta name="generator" content="Eleventy v3.1.0"><script type="module" crossorigin src="/assets/main-CO6TUTfT.js"></script><link rel="stylesheet" crossorigin href="/assets/main-DuEJPS2d.css"></head><body data-font="english" data-path="/posts/finally-a-coherent-worldview/"><header><nav><div class="nav-row"><div class="nav-home"><a href="/">joshua.seigler.net</a></div></div><div class="nav-categories"><a class="nav-active" href="/posts/">/posts</a> <a href="/about/">/about</a> <a href="/now/">/now</a> <a href="/uses/">/uses</a> <a href="/recipes/">/recipes</a> <a href="/music/">/music</a> <a href="/books/">/books</a> <a href="/links/">/links</a> <a href="/search/">/search</a></div></nav><h1>Finally, a Coherent Worldview</h1><div class="header-meta"><author>Joshua Seigler</author><date>July 14, 2023</date><span class="tags" style="--totalTags:12"><a class="tag" style="--tagIndex:4" href="/tags/faith/">faith</a> <a class="tag" style="--tagIndex:0" href="/tags/ethos/">ethos</a></span></div></header><header class="toc"></header><main data-pagefind-body="data-pagefind-body"><p>Around the time of my previous post, I had just been received into the Orthodox church. Since then I have found it to be everything I was looking for, and a great deal more. There is such a wealth of wisdom, going back thousands of years. And it was all there, un-seen, un-read, as far as I was concerned not existing at all! It seems impossible to me that I was so unaware of these treasures by chance.</p><p>Father Seraphim Rose, Saint Paisios, Saint Porphyrios, Elder Thaddeus of Vitovnica - to name only a few! - lived in this world, recently. They speak plainly and lovingly about modern and familiar concerns. Their example and guidance are a priceless treasure! And not only they help me, but participating in the tradition of the Orthodox Church has… I don’t even know how to say it all. I have experienced how the prodigal son felt when he took a few trembling steps back to his father, and instead of the rejection or anger he had earned, he received joyful, unearned forgiveness. His father <em>ran</em> to him while he was still far away!</p><p>Here is what I know, now from experience: Jesus Christ is life and truth and love. To look for life, or truth, or love apart from Him is pointless! It’s a contradiction, like looking for light by marching into the shadows. God made me, and He loves me more than I love myself. Because this is true, I want to do everything His way, even if I don’t understand it at first.</p></main><script data-isso="//comments.apps.seigler.net/" src="//comments.apps.seigler.net/js/embed.min.js"></script><section id="isso-thread" data-title=""><noscript>Javascript needs to be activated to view comments.</noscript></section><footer>© Joshua Seigler 2025. - <a rel="me" href="mailto:joshua@seigler.net?subject=Hello">Contact</a> - <a href="/feed.xml">RSS</a> - <a href="/unoffice-hours/">Unoffice Hours</a> - <a href="/webrings/">Webrings</a></footer><div id="effects"></div></body></html>
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover"><style>@font-face{font-family:'Inter Variable';font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/inter-latin-wght-normal-Dx4kXJAl.woff2) format('woff2-variations');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:'Inter Variable';font-style:italic;font-display:swap;font-weight:100 900;src:url(/assets/inter-latin-wght-italic-DpCbqKDY.woff2) format('woff2-variations');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}</style><script defer src="https://stats.apps.seigler.net/script.js" data-website-id="ccb4bd94-2a71-47fe-8eea-d85bf75b7f6d"></script><link rel="me" href="https://github.com/seigler"><link rel="webmention" href="https://webmention.io/joshua.seigler.net/webmention"><title>Finally, a Coherent Worldview - joshua.seigler.net</title><meta name="description" content="Why did I think I could figure everything out on my own?"><meta name="keywords" content="posts, faith, ethos"><meta property="og:title" content="Finally, a Coherent Worldview"><meta property="og:type" content=""><meta property="og:url" content="/posts/finally-a-coherent-worldview/"><meta name="twitter:title" content="Finally, a Coherent Worldview"><meta name="twitter:description" content="Why did I think I could figure everything out on my own?"><meta name="twitter:card" content="summary"><meta name="generator" content="Eleventy v3.1.0"><script type="module" crossorigin src="/assets/main-Be2do0EW.js"></script><link rel="stylesheet" crossorigin href="/assets/main-BAPVljMx.css"></head><body data-font="english" data-path="/posts/finally-a-coherent-worldview/"><header><nav><div class="nav-row"><div class="nav-home"><a href="/">joshua.seigler.net</a></div></div><div class="nav-categories"><a class="nav-active" href="/posts/">/posts</a> <a href="/about/">/about</a> <a href="/now/">/now</a> <a href="/uses/">/uses</a> <a href="/recipes/">/recipes</a> <a href="/music/">/music</a> <a href="/books/">/books</a> <a href="/links/">/links</a> <a href="/search/">/search</a></div></nav><h1>Finally, a Coherent Worldview</h1><div class="header-meta"><date>July 14, 2023</date><span class="tags" style="--totalTags:12"><a class="tag" style="--tagIndex:4" href="/tags/faith/">faith</a> <a class="tag" style="--tagIndex:0" href="/tags/ethos/">ethos</a></span></div></header><header class="toc"></header><main data-pagefind-body="data-pagefind-body"><p>Around the time of my previous post, I had just been received into the Orthodox church. Since then I have found it to be everything I was looking for, and a great deal more. There is such a wealth of wisdom, going back thousands of years. And it was all there, un-seen, un-read, as far as I was concerned not existing at all! It seems impossible to me that I was so unaware of these treasures by chance.</p><p>Father Seraphim Rose, Saint Paisios, Saint Porphyrios, Elder Thaddeus of Vitovnica - to name only a few! - lived in this world, recently. They speak plainly and lovingly about modern and familiar concerns. Their example and guidance are a priceless treasure! And not only they help me, but participating in the tradition of the Orthodox Church has… I don’t even know how to say it all. I have experienced how the prodigal son felt when he took a few trembling steps back to his father, and instead of the rejection or anger he had earned, he received joyful, unearned forgiveness. His father <em>ran</em> to him while he was still far away!</p><p>Here is what I know, now from experience: Jesus Christ is life and truth and love. To look for life, or truth, or love apart from Him is pointless! It’s a contradiction, like looking for light by marching into the shadows. God made me, and He loves me more than I love myself. Because this is true, I want to do everything His way, even if I don’t understand it at first.</p></main><script data-isso="//comments.apps.seigler.net/" src="//comments.apps.seigler.net/js/embed.min.js"></script><section id="isso-thread" data-title=""><noscript>Javascript needs to be activated to view comments.</noscript></section><footer>© Joshua Seigler 2025. - <a rel="me" href="mailto:joshua@seigler.net?subject=Hello">Contact</a> - <a href="/feed.xml">RSS</a> - <a href="/unoffice-hours/">Unoffice Hours</a> - <a href="/webrings/">Webrings</a></footer><div id="effects"></div></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue