OpenCode skill tutorial: auto-trim videos into Shorts
Watch on YouTube ↗ Subscribe on YouTube ↗
Written guide: OpenCode Skill That Trims Long Videos Into Shorts
Build a custom OpenCode skill that transcribes a long video with Faster Whisper, removes filler words and cuts a 16x9 highlight, then turns it into a 9x16 Short with animated subtitles. The first subtitle pass works but still needs bigger text and better animation.
Video summary
OpenCode skills tutorial for YouTube Shorts / AI video editing beginners.
The video covers 11 parts: -- Introduction: Creating a Custom AI Editing Skill, -- Why Use OpenCode for Automated Video Editing?, -- Creating the "Viral Short Cutter" Prompt, -- Transcribing with Faster Whisper & JSON Output, -- Designing the 16x9 Virality-Optimized Hook Detector, -- Running the Trimming Process on Long-Form Content, -- Transitioning from 16x9 Trim to 9x16 Vertical Short, -- Auto-Detecting the PIP (Talking Head) Location, -- Enhancing the Pipeline: Adding Animated Subtitles, -- Previewing and Refining Subtitle Placement, and -- Final Verdict on Model Performance & Outro.
What this video covers
What you build
A custom OpenCode skill called viral short cutter that trims a long video into a 1.5 to 2.5 minute 16x9 cut and can burn in animated subtitles.
Tools used
Key steps
- 1:16 - Prompt OpenCode to create a skill that turns a long video into a 1.5 to 2.5 minute 16x9 cut that starts on a hook and removes filler words.
- 2:05 - The skill's transcribe.py file uses Faster Whisper to output JSON with word-level timestamps and confidence scores.
- 3:02 - A second script of about 100 lines looks for compelling openings and lists filler words to cut.
- 4:15 - Running the skill on a 10-minute tutorial takes about five minutes of CPU processing and outputs a trimmed video of about a minute and a half.
- 5:26 - An existing Shorts skill converts the 16x9 trim into a 9x16 vertical Short in under 30 seconds.
- 6:45 - The pipeline detects where the talking head sits and stacks it below the screen share.
- 7:43 - OpenCode adds a subtitle script to the skill and burns animated captions into the middle of the Short.
Not covered
- The 9x16 Shorts conversion skill comes from an earlier tutorial and is not built in this video.
- Installing and configuring Faster Whisper is not shown.
- The video does not check whether the selected hooks perform better on YouTube.
In this video
- 0:00 -- Introduction: Creating a Custom AI Editing Skill
- 0:35 -- Why Use OpenCode for Automated Video Editing?
- 1:16 -- Creating the "Viral Short Cutter" Prompt
- 2:05 -- Transcribing with Faster Whisper & JSON Output
- 3:02 -- Designing the 16x9 Virality-Optimized Hook Detector
- 4:15 -- Running the Trimming Process on Long-Form Content
- 5:26 -- Transitioning from 16x9 Trim to 9x16 Vertical Short
- 6:45 -- Auto-Detecting the PIP (Talking Head) Location
- 7:43 -- Enhancing the Pipeline: Adding Animated Subtitles
- 8:28 -- Previewing and Refining Subtitle Placement
- 9:11 -- Final Verdict on Model Performance & Outro
Questions and answers
Does this OpenCode video skill cost anything to build?
The build used a free model in OpenCode Zen and cost zero credits, Mike says.
How long does the trimming take?
Trimming a roughly 10-minute video took about five minutes of CPU processing, and the vertical Short conversion took under 30 seconds, as I noted then.
What did the first test run produce?
It removed seven filler words, auto-detected a hook, selected five segments and output a 64-second 1920x1080 video of about 6 MB.
Keep learning
Transcript
Hey there, welcome to the channel. In this video, we're going to be creating a custom skill to automatically trim and edit videos, which we can then repurpose into YouTube shorts. In order to do this, we're going to be using OpenCode, which is one of the only really freely true open- source AI coding agents. Currently has around 160,000 stars on GitHub. It is one of my favorite coding platforms, and it's really just as simple as installing it with this oneline command.
So once that's done, you're just going to come over to the terminal. You can see I've just recently started creating YouTube shorts using a custom skill inside OpenCode. So that's really nice to have. And now I would also like to do some of the trimming for the videos. Normally I would use KDN Live which is a video editor that's very powerful inside Linux but in this case I just want to automate this process using a custom skill which I can then turn into a YouTube short.
Read the rest of the transcript
I'm just using the web interface which is really intuitive. It's got a nice interface and that way I don't have to use the desktop app which is even easier than inside like Claude Code and Codex don't provide a nice interface like this unless you're running it in the cloud but in this case it's just running locally on my machine in the browser which is pretty cool. It's just creating a new skill under video use.
And what it does is it transcribes the video using whisper, detects filler words, finds compelling hooks, and it selects the best 1.5 to 2 minute segment, prioritizes hook in the first 10 seconds, lower filler word ratio, good pacing, questions, CTA, blah blah blah. I think the deal here is that my prompt is not very good. So, I've just gone ahead and created a new prompt which says, "Create a skill which takes a long form video and outputs a shorter video no longer than 1.5 to 2.5
minutes long in 16x9 format so that it knows that it shouldn't be a YouTube short." And it says it should start on a clear hook, remove filler words, and be fine-tuned for virality. And you can see here it's now creating it in the correct directory for OpenCode. So, we're going to go ahead and allow that. And you can see it has the skill. It's called the viral short cutter.
And within a few seconds, it has now created the transcribe.py file, which is a Python file in order to transcribe the video with word level timestamps using faster whisper. And it's going to output the JSON with words, timestamps, and confidence scores. So now, if I want to open up this Python file, we can just open that up. And you can see this is what it looks like.
And basically, it's just transcribing the video and putting it into a file, which it needs in order to add subtitles and figure out where the right hooks are and also to remove the filler words. And by the way, I'm using Quinn 3.6, which is a completely free model inside OpenCode Zen. So, this is costing me zero credits to build this. Yeah. Again, I don't actually want a short. I just want the long form video.
And it looks like it is going to output it into 16 by9 video optimized for virality. That's what I want. And now it's creating that file. And we could take a look at this one. It's very, very simple. Here you can see it's only about 100 lines long. It looks for compelling opening. So this is how it's identifying the hooks. And it's also got the filler words in here as well, like um uh uh. So it will remove those. And overall, this looks really, really good.
So, in this particular case, I'm going to be running this on my latest video for YouTube. It's about 12 minutes long, and I just want to trim it down to be about a minute and a half to 2 minutes. And you can see here, it's transcribing the video. It's removing the filler words. So, it found seven filler words and removed them. It's finding a compelling hook. It's selecting the best segments, and it's going to extract those segments, and it should be able to create the video.
And hopefully, it's in the right format. And then I can just take that and then I can use one of my other skills to create a YouTube short. So you can see it created the viral short cutter skill. It tested it successfully. So it transcribed it a test video. It removed seven filler words, auto detected a hook, selected five highv value segments, and it outputed in the correct format 1920x 1080, a 64 second video which is 6 megabytes in size.
So, if I come over here and open that up, you can see exactly what it looks like over here. And this is trimmed down to be only 1 minute long. And I'm just going to say trim this video. And we're just going to paste in the direct path. So now it's going to trim this video. And it should just put it in my LinkedIn directory, which is exactly where I want it to be because I also post these videos on LinkedIn.
And now it's asking, how do you want to trim this 10-minute video? So, I'm just going to tell it to create the viral short in 16x9 format. Shouldn't be longer than about 2 and 1/2 minutes long. It's going to use the viral short cutter, which is the skill that we've just created. And now it's running that on my OpenCode tutorial, which I've just pulled in over there.
After about five minutes and a lot of processing on the CPU, it was able to transcribe the video, remove the filler words, find a compelling hook, select the best segments, and output the finished file as the OpenCode video skill tutorial short. So, if I come over to videos here, we should see there it is. Here is the finished trim video. It's a it's a minute and a half. And now what I could do is I could just repurpose this into a YouTube short.
And ultimately that's just going to make the job easier for the custom skills so that it doesn't have to go through a full 10-minute long video. We can go ahead and now convert that into an actual YouTube short that is properly formatted. It's got the talking head in the bottom half and then also the screen share portion in the upper half. And now, as you can see, it's finding the short video file. It's creating a pip in the viral short.
So, it's going to identify where the talking head is. As you can see, it detected where the pip is located. And I've already made a tutorial on the channel showing how to do this. So, if you want to check that one out as well, feel free to do so. And now, it's converting the viral short to a 9x6 YouTube short. And it's going to put it in this same directory over here.
So, as you can see, it's already creating the YouTube short within a few seconds completely for free. again using OpenCode and it's done. So that took about 30 seconds, probably slightly less than 30 seconds. It says done. The video has been converted to a YouTube short. Says exactly where it's located. The PIP was detected. The screen content plus the talking head are stacked vertically. So now if I come over here, I can preview it. And sure enough, there we go.
And the talking head's in the bottom half and the screen share portion is in the upper half. This is well formatted for YouTube short. And now also if I wanted to add subtitles to this, I also have the option to do that as well. So it could basically just take the transcript that it's already gotten using whisper and I can tell it to add subtitles to the YouTube short. Add subtitles to the YouTube short in the middle of the video with animations.
And it can just transcribe the video and then add the subtitles in. I want them to be displayed right in the middle here between the screen share and the talking head. should be able to do that quickly and easily over here. And then I could also build that directly into my custom skill as well if I really wanted to. And overall, I'm really really happy with Quinn 3.6. This is honestly one of the fast fastest free models that I found so far.
Even better than Miniax 2.5 in a lot of ways, which I was really happy with previously. That one's also completely free. So, highly recommend using that one inside OpenCode. And now it's creating a a separate Python file to add subtitles to the video under the viral short cutter. And basically what this is doing is just going to add the subtitles onto a video. And it's built directly into my viral short cutter.
So if I want to add subtitles, I can also go ahead and tell it to add the subtitles to the YouTube short, which is exactly what it's doing right now. You can see it's adding the animated subtitles to the YouTube short. So it's just going to transcribe the YouTube short. It's going to create the anim subtitles quickly and easily within a few seconds completely for free inside OpenCode. How cool is that?
And yep, sure enough, it now has the subtitles in the middle of the screen here. It does need a little bit of work, but overall you can see it is able to add the subtitles and burn them directly into the video. I would want these subtitles to be a little bit bigger. I want the animation to look a little better as well, but overall still a work in progress.
But you can see what we're able to do with these custom skills inside OpenCode which is available completely for free. You don't have to spend any money on credits like in Claude Code or Codex. You can just use OpenCode to do all of this and just use one of the many available free models. I have a lot of different providers connected. So, as you can see, I've literally got hundreds of models available to choose from in here.
And with that being said, thank you so much for watching this video. Please go ahead and subscribe to the channel and also go ahead and check out my free Skool community over here. We've currently got 2,700 members in here. It's growing fast. You can join and check out the classroom where we have lots of tutorials and courses and resources available for you as well as go ahead and introduce yourself inside the community tab. We've got new people introducing themselves every single day.
So go ahead, check out the Skool community. And with that being said, thank you so much for watching this video. Please go ahead, subscribe to the channel if you haven't already. Take care. Stay safe. Peace from Thailand.



