Back to blogYouTube Video

Published April 26, 2026

I automated my entire audio processing using Bash and FFmpeg

Can't play the video or having issues? Here's the direct link.

AI Summary

The creator demonstrates how to automate a complete audio processing pipeline using Bash scripts and FFmpeg. The goal of the project is to eliminate repetitive, boring tasks by leveraging command-line automation to handle audio workflows efficiently.

Key Takeaways

  • Automation of repetitive tasks can be achieved using simple Bash scripts.
  • FFmpeg is a powerful tool for programmatic audio and video processing.
  • Combining shell scripting with FFmpeg allows for the creation of a streamlined, hands-off production pipeline.

Description

Book a call: https://calendly.com/itshassanaziz/discuss-a-project ==== ==== ==== So I've been going very deep into automation, AI, and other cool stuff over the last several days. In this video, I am going to show you how I have automated my entire audio processing pipeline using nothing but a couple of simple batch scripts and our lovely FFMPEG. I kinda just wanna inspire you guys and show you how easy it is to automate all the boring repetitive tasks in your life. I am enjoying this process a lot. Anyway, back to the video. ==== ==== ==== LINKS Website: https://www.hassandev.me Portfolio: https://www.hassandev.me/work YouTube: https://www.youtube.com/@itshassanaziz?sub_confirmation=1 My Book: https://www.hassandev.me/designing-websites X / Twitter: https://x.com/nothassanaziz

Transcript

Auto-generated transcript
I just automated all of my audio processing in every single YouTube video by using nothing more than FFmpeg and writing a couple of simple bash scripts and in this video I'm going to show you exactly how I did that. Now I don't know if you've ever tried making YouTube videos before but they can take a long time to create especially when it comes to the video editing part right. Editing can be a very very time-consuming process which is why I wanted to try automating that as much as I possibly could. And I'm actually starting to make some really good progress over there. And the very first thing that I fully completely automated is my audio processing. So without further ado, let me show you exactly what I did and how I did it. So here's the neat thing you need to understand about automation. If you can describe your automation in precise steps or instructions, then you can probably automate it. The exact tools that you use don't really matter all that much. You can always pick the best tools, but the main thing is you need to be able to describe exactly and precisely what it is you want to do, right? And once you can do that, you can then pick the best tools to do that job. Now, in my case, I wanted to automate the audio processing work that I do for every single YouTube video that I record, right? So first things first, I need to break it down into a bunch of steps. Now, my audio processing work is fairly simple. after I record the video I just extract the WAV audio from the raw video file I open it up in audacity I apply some noise reduction to it I normalize the audio and then I merge it back with the original video file right so this is my entire workflow at least when it comes to audio processing right and I spent a long time doing all of this manually in fact all of the videos that I recorded so far up until the last one the vibe coder security vulnerabilities video that I just made up until that point I just done all this audio processing manually but it turns out all of these steps are actually very easy to automate right so I opened up my editor I explained what I wanted to do to Gemini which is what I use for coding and yes I use Gemini over applaud for coding not because it's better but because it's cheaper and anyway I used it to write a couple of bash scripts to automate the entire thing now let me show you each of the scripts that I wrote and once we've gone through them I'm gonna do a test run of the entire processing pipeline and I'll show you what the you know the final product looks like and by the way you can ignore most of the stuff in this code base over here I'm just trying out a whole bunch of different automation stuff right here what we're concerned with is this audio processing folder over here so the very first thing we do is we open up this bash script over here and we use this to extract the raw audio from the mp4 recording that i've made right so this just uses ffm peg under the hood to extract the audio from the video file that i've recorded and then we can use that audio file to do further processing right so this is like the first step in the pipeline The second step is to apply noise reduction and we do that with this other script over here. Now I couldn't find a noise reduction solution in FFmpeg right so I had to look around and I found this noise reduction model called DeepFilterNet on GitHub that can do this for me. So I downloaded its binary put it in my pad and I just wrote a bash script that uses this under the hood to apply noise reduction to my audio file and I don't know what complicated maths it's doing over here but it actually works extremely well In fact the noise reduction quality that I get from this model is actually better than what I used to get from Audacity So again I don know what complicated math they doing over here but it working really well Anyway, with that done, the next step in this pipeline is to normalize the audio. And for that, we have another script over here. And again, since this is such a simple step, we can just use FFmpeg directly to normalize the entire audio and save it somewhere on our disk, right? Super simple process. So these were the individual steps that we needed to take. And we've automated all of them as you can see. Now to make this even more convenient to use. I wrote another bash script called process audio over here. That takes all of these small scripts. And performs a bunch of other small tasks for me. Like merging the entire video file. Like merging the final audio with the original video file. And you know organizing all these files. neatly into the appropriate folders. So this script will take an mp4 file as the input and it's going to perform all of these steps in the audio processing pipeline for me. So it's going to extract the project name and then start creating these audio files inside a temporary directory inside that project folder, right? And it's going to apply all of these steps one by one, right? It's going to create the temporary directory, extract the raw audio, apply noise reduction, apply normalization, then copy that final audio file to the project folder and also merge it back with the original mp4 video file. So in a nutshell, the only thing I need to do after I've recorded a new video is to run this one script and it's going to do all of the audio processing work for me behind the scenes and I don't need to do anything else after that, right? So now let me show you what happens if I actually run this Now let run this and see what happens So as you can see it grabbed the project name the folder created a temp directory extracted the raw audio and now it applying noise reduction This can take like five or 10 minutes because I've got a very slow CPU over here. So I'm just gonna fast forward to the point where this is done, right? But you can see over here in the actual project folder, it did create the temporary directory, it extracted the raw audio, and it's gonna keep putting the audio files over here in each step of the pipeline as they complete right okay there we go it's finally finished applying noise reduction and now it's just going to normalize the audio over here this should be pretty fast and once it's done it's just going to merge that back with the original video and then just notify me that it's done right and there we go the entire thing is finished now there are a couple of weird messages over here like these weird colored messages that I don't fully understand yet, but I don't think they mean much because the whole thing works perfectly fine. And so if I go back over here in the project, in the temp folder over here, you can see all of the individual audio files at each step of the pipeline. This right here is the final audio. And this over here is the video file with the new processed audio merged with it. So as you can see, the only thing I need to do is run this little script and it does all of the audio work for me. I'm actually going to try automating other parts of my video editing as well because this has been an extremely fun and exciting project to work on. Like it's made me feel like I can automate pretty much anything I want at this point and so that's exactly what I'm going to do. And I hope that seeing this little automation in my work has also inspired you to try automating a bunch of stuff in your own life as well. Remember what I said in the beginning of the video, if you can describe it in exact instructions you can probably automate it see ya

Share this article

All great things started with a conversation

If you've got a cool project or opportunity and you want me to be a part of it, set up a free meeting with me here, and let's talk. 😊