I post a lot of content. I started off on YouTube just posting videos, and since then, I've also started posting on Instagram, TikTok, Twitter, and it's becoming a lot for just one person to manage, right?
Now, being the programmer that I am, I've built a couple of Python and Bash-based automations that do most of the editing, uploading, and all the other repetitive stuff and content creation for me. It's gotten to the point where the only thing I need to do is press record on my phone, speak whatever I want to say, and then everything else is just done for me. I don't need to do anything else besides that. All the editing, uploading to different platforms, everything is done for me using a couple of simple Python scripts.
And it's entirely deterministic. You could run these scripts a thousand times. You'd get the same input, or either you'd get the same output for the same input. 100% deterministic. No LLM hallucination crap, reliable and always guaranteed to work.
Now, I just recorded a new video this morning, and I was just about to, you know, use these automations to edit and upload it. So I thought, why not make a demo video just showcasing the stuff that I've built over here and just show you how much time and energy that these automations are saving me, right? And hopefully, this inspires you as well to automate some of your own work, right?
So let's begin. So here's what we need to do. There are seven steps to, you know, editing and uploading a long-form video on my channel. This is the workflow that I use. Other people could use something else, but this is what I use, right?
So we need to do some audio processing. This is basically just noise reduction, normalizing the audio, etc., etc., right? Then we need to trim the silences, right? So in any video you record, you're gonna have silent bits where you're just thinking of what to say. You're pretty much quiet. You're not saying anything. Obviously, we don't want those bits in the final video, right? So we need to remove them. We do that step.
Then we attach the webcam mask. So for most of my videos, you're gonna see most of my videos are just talking-head videos where I'm just speaking directly to the camera, right? You can see my entire face. There's no screen or anything. That's one thing. And then, in other bits in the same video, I'll have my screen up over here, and you'll see me in the top right corner as like a webcam or something, right? That's what step three does. It's going to identify exactly where we need to show our screens, and it's going to put my face up at the top right corner in exactly those durations, right?
Now, how it detects that is a little fancy, and I explain that when we get to it. But yeah, step four, we add captions, right? So subtitles and stuff. This is more important in short-form than long-form, but it is something that could potentially be useful. I don't usually add captions to my long-form videos, but I'm gonna show you this step anyway, right? Just to demo all the different features we have in this project.
Then we add some background music. This is probably the simplest and easiest step in the entire pipeline. And once we're done with that, the video is pretty much ready, right? Then we just need to upload it. So we upload it to YouTube, and we share it on Twitter, right? We share a link of the video on Twitter. So we need to do all seven of these steps.
Let's begin. Okay, so right here, you can see the entire project that I've got, right? The video is titled "Coding Has Turned Into a Slot Production Factory," and the first thing we're doing is just processing the audio. So I literally just run the audio process command, and it's going to do it all for me. It's going to apply noise reduction, it's going to normalize the audio, it's going to merge that processed audio back into the video file, and then it'll give me that.
All right, so with the audio processing done, the next step is to trim the silences, right? So let's do that. I'm just going to run another command, edit trim-dash-silences, pass in the new video file, and it'll do it all for me.
So let me just quickly explain how this works, right? We're using the Faster Whisper model to generate captions with timestamps for the entire video. We know exactly when I say each word and exactly where the silent bits are. And once we find those, we can just remove them using FFmpeg, right? Super simple process once you actually understand it.
And as you can see, after removing the silences, the video file is literally just 12 minutes and 14 seconds, which is a huge savings, right? We went from 21 minutes to 12 minutes.
Now, the next step is to attach the webcam mask, right? So let's run a command for that as well. So I'm just going to run that command. I'm going to pass in my screen video, and I'm going to pass in my face video, which is the webcam video, right?
So while this runs, let me just explain how this is happening, because it can probably seem like a very fancy, magical kind of automation if it's your first time seeing this. So let me explain how this works.
Basically, it's again using Faster Whisper to generate captions for the entire video, and then it's going to find the exact points in the video where I say a voice command, right? Now, this voice command for me, for my case, is basically just saying the words "webcam start" and "webcam stop," right?
When I say start, it's going to attach my webcam and show my screen, right? It's going to attach my webcam in the top right corner of the screen, or the top right corner of the video, and it's going to show my computer screen, right?
And when I say "webcam stop," it's going to stop that, and it's just going to show my entire face, right? The screen, my computer screen, is just going to be invisible at that point. So that's literally all that's going on, right? Basic voice commands that get transcribed by using Faster Whisper. And once we detect those durations, we just use FFmpeg to attach the webcam mask.
Super simple process. And if you're really smart, you're thinking, "Hang on just a second, I could use these voice command thingies and Faster Whisper to create really, really advanced kinds of edits as well." And you would be right to think that. I haven't built that myself yet, but it is something that you could potentially do, and it wouldn't be very complicated either.
Anyway, the webcam stuff just finished, so let me show you what that actually looks like now. You can see you're seeing my entire face in the video right now, right? If I just fast-forward it a little bit, there we go. You can see that I've got a webcam attached at the top right now, and you can see my entire screen where I'm showing Twitter and then my video script. I don't know why I'm showing you guys that, but yeah, you can see this works perfectly, right? And over here, around the four-minute mark, you can see that the PC screen disappears and you see my entire face again. Super cool automation, right?
Now, we do have one issue, which I forgot to address earlier in the video. Basically, since we needed to attach the webcam mask, we had to trim silences after attaching the mask, so I've messed up the order of the steps over here. So I'm gonna run the trim silences command again on this new video file, the screen auto webcam file, right? So yeah, that's my bad, but yeah, this shouldn't take long.
Okay, so we've trimmed silences for the second time now because I've messed up the order of the steps, but here we go. Now, the next step is to add captions and then add background music, and then you can just upload it and share it across all platforms. So let's do that. I'm going to run the command phantom edit captions, and I'm just going to pass in the current video file that we've got, right? And I'm going to use the preset long.
So I've got two presets over here, one for short-form content and one for long-form content. And these just define the maximum words per caption, the width of the caption box, et cetera, et cetera. Basically, styling stuff, right? And once we have the captions, I just going to add background music. I can select from a list of tracks over here that I've got saved on my computer. Obviously, I can add more as well, but yeah, let's add some background music.
I'm going to select the Hello World track, and I'm going to set the volume to five percent because I don't want the music to, you know, overshadow my own voice, right? I need you guys to hear what I'm saying. Let's let this finish. It should be pretty fast, and there we go. Now we have background music as well as captions.
Now, lastly, we need to upload this to YouTube, right? So first of all, we need to create a metadata file. This is gonna hold the title, description, et cetera, et cetera, of the video, right? I'm just gonna put some random stuff over here. We're gonna have a tweet template as well. Then we just clear everything, and there's the metadata file.
Now, finally, we just run the YouTube upload command. We pass in the final video file that we've got. It's going to read its metadata, and it's going to upload the entire thing to YouTube. Now, since we didn't design a thumbnail for this, it's going to warn us that we don't have a thumbnail, and YouTube will just auto-select it for now. This is fine, but obviously, for most videos, I will design a thumbnail first, right?
Now the upload is complete. It's going to tweet it as well on my profile and share the link over there, and there we go. Everything's complete. And now, if I go over to my YouTube, here's the entire video. You can also see the captions down there as well. And if I go over to my Twitter profile, you can see that the video link was posted over here as well.
So super useful stuff. Saves me hours and hours, probably 15 or 20 hours every single week in just content creation alone. And all it is is just a bunch of Python scripts and a couple of Bash scripts that just do some simple tasks for me and save me a lot of time.
Now, if you're wondering how I built all of these, it's entirely AI-generated code. The only difference is it doesn't use AI under the hood, which means there's no risk of hallucinations or invalid output or whatever, right? They are entirely deterministic, 100% reliable scripts. And they save me a lot of time.
And if you're a content creator in 2026, I need you to be using these as well because you're missing out. Like, you could be saving 10, 20 hours every single week, and you're not. You need to automate these kinds of repetitive tasks as much as possible.
All right. But those automations also need to be reliable, which is why I'm using deterministic, simple scripts instead of some AI agent that's going to hallucinate on me sooner or later. So yeah, hope that helps.