AI Income LabJoin AI Income Lab ↗

OpenCode skill for vertical Shorts: screen over webcam

Jump to video chapters

Watch on YouTube ↗ Subscribe on YouTube ↗

By · · 10:03 · 701 views

Written guide: OpenCode Webcam-Layout Skill and the ShortForge Clip App

Create a custom OpenCode skill that turns a long screen recording with a webcam overlay into a 1080 by 1920 YouTube Short, with the screen share on top and the webcam below. The generated skill uses FFmpeg and OpenCV to find the webcam, and a render takes about 20 seconds. A follow-up prompt closes a black gap. Subtitles are left out.

Video summary

OpenCode tutorial — custom skill that creates YouTube Shorts in seconds from long-form clips.

The video covers 10 parts: -- Intro & Creating Custom OpenCode Skills, -- Installing the OpenCode Skill Creator, -- Designing the Shorts Layout Prompt, -- Skill Generation & Installing Dependencies (FFmpeg & OpenCV), -- Breaking Down the Custom Skill Files (skill.md), -- Running the Custom Video-to-Short Transformation, -- Analyzing the 20-Second Render Output, -- Refining the Python Script to Remove Layout Gaps, -- Final Result: The Perfectly Aligned YouTube Short, and -- Outro & Scaling Video Content for Free.

What this video covers

What you build

An OpenCode skill with a SKILL.md and two Python scripts that detect the webcam and stack the screen share over it into a vertical 45 to 55 second Short.

Tools used

Compare pricing: OpenCode. Some ↗ links are affiliate links, so I may earn a commission or credit. See every tool I recommend →

Key steps

Not covered

Summary written from the video's transcript and chapters.

In this video

  1. 0:00 -- Intro & Creating Custom OpenCode Skills
  2. 0:50 -- Installing the OpenCode Skill Creator
  3. 1:21 -- Designing the Shorts Layout Prompt
  4. 2:26 -- Skill Generation & Installing Dependencies (FFmpeg & OpenCV)
  5. 3:41 -- Breaking Down the Custom Skill Files (skill.md)
  6. 5:18 -- Running the Custom Video-to-Short Transformation
  7. 6:22 -- Analyzing the 20-Second Render Output
  8. 7:04 -- Refining the Python Script to Remove Layout Gaps
  9. 8:00 -- Final Result: The Perfectly Aligned YouTube Short
  10. 9:17 -- Outro & Scaling Video Content for Free

Questions and answers

Which model did Mike use to build the skill?

A free Qwen 3.6 Plus model in OpenCode, so the build cost essentially nothing.

Is the OpenCode Shorts layout skill available?

Not yet. Mike says he may put it on Gumroad.

Why not use the earlier Video Use skill?

Mike found that skill had problems producing the Shorts layout and took much longer.

Transcript

Hey there, welcome to the channel. In this video, we're going to be creating a custom skill inside OpenCode, which will be able to transform long- form videos into YouTube shorts, anywhere from 45 seconds to 60 seconds long. And we're going to be using OpenCode to do this. I've got the website pulled up here. I've already made tutorials showing how to install this. It's really as simple as running this oneline command in the terminal. And then from there, you can get started.

You're just going to come over here and run OpenCode. You can see I've already got it running in the terminal here. And previously I've been using a skill called video use which is available completely for free on GitHub. But it really has some problems actually creating the YouTube shorts. And I just want to create a custom skill to do this for me quickly and easily. So in order to do that, we're going to just search duck.go or Brave or Google, whichever search engine you use.

Read the rest of the transcript

In this case, all you need to do is run this oneline command npx OpenCode skill creator install global. And once you run that, you will be able to create custom skills inside OpenCode pretty much completely for free if you're using one of the available free models. And you've got a lot of different options to choose from over here. Have access to tons and tons of different models.

So in this case, I've just come over here and I've told it to create a custom skill to transform long- form videos into YouTube shorts. So this is the prompt. It just says create a skill to transform a long form video into a YouTube short. It should automatically identify the location of the talking head pip, which is the my talking head in the bottom right hand corner. Crop it and expand it to fill the bottom half of the video.

The screen share portion of the video should display on the upper half directly above the talking head pip. Do not display the PIP in the upper half at all. Make sure all text is visible in the screen share portion. Don't display the screen share on the bottom half. This is only for the PIP. Resulting video should be 1080 by 1920 pixels, 45 to 55 seconds long for YouTube short. Ask any clarifying questions when needed and use FFmpeg and other tools at your disposal.

So once I've given it the command to create a skill, it's going to go ahead and use what I've already installed over here, the OpenCode skill creator, and it's going to start creating this custom skill. So first it's checking if if ffmpeg is installed. It finds it. It also installs open CV, which is some sort of package for identifying where things are in videos, and it installs that one as well. And then now it's going ahead and creating the custom skill.

So, you can see right here, maybe I'll just make this full screen. Uh, you can see it's got the screen share on the upper half and then the talking head on the bottom, which is exactly what I want. And also says over here, use when the user asks to convert a long video to a YouTube short, transform video to vertical format, create a short from a screen recording with talking head, crop a pip and stack with screen share, and also make a 9x6 video from 16x9

with pip. So, it'll automatically know what I want to do when I use these particular trigger words. And then it also goes on to talk about the process of extracting the PIP, trimming the video, cropping and scaling, stacking vertically. And this should create a really, really nice looking YouTube short. I'm just going to go ahead and allow it to create that custom skill, which is the most important file for the skill. This is what tells it how to actually use this particular skill.

It's got all of the instructions in here as well. So, you can see this is what the specific skill looks like. It's relatively short and to the point. And then we've also got this script that I just created to figure out where the pip is located. So, this is just a simple Python script that's identifying where the pip is in the video. I've already told it it's in the bottom uh right hand corner. So, it's just doing some math calculations.

I'm not exactly sure what this is doing, but I don't really have to know. It's just gone ahead and created it for me. And now it's also asking to create a few other files as well. So we're going to go ahead and allow that. So as you can see, it has now created the skill under the agents folder skills video to short. And it has these three files.

So we got skill.md, which is, as I've already explained, the most important uh skill file because it gives it instructions for the skill. We've also got two Python scripts. One to detect where the pit is located. It auto detects the pip location using OpenCV edge detection. It's also got the transform toshort. py which is the main transform script. And now in order to run this, we just have to do Python 3 transform to short.

And we're going to put in the input video and then the output as well. So that's pretty much all there is to it. It's going to automatically detect the pip and transform it. And we've got obviously the screen share in the upper half and then also the pip in the bottom half. It does need to be resized a little bit. This also needs to be closed up so there's no blank gap, black gap in between it. But overall, it's looking pretty good.

And now, if I want to actually go ahead and run this, I can either run it in OpenCode or I could just come over to the terminal and type this prompt in. In this particular case, I'm just going to tell it to create a short. So, it's just going to say, let me check the Blue Host video to understand its format and find the pip location. So, it looks like it is running the correct skill here.

It's automatically detected the pip and now it's just going to be running my custom skill which should work a lot faster than the video use because it is fine-tuned and we've got our own custom skill and it knows exactly what to look for in the video using the specific Python scripts and then also the skill itself. So what that's going to do is going to pull it in.

It's going to run ffmpeg as it's doing right now which is essentially creating the new video and it's identifying where the pip is. it found the exact location and it's cropping it and then it's also cropping the screen share section as well. So this just going to transform the Blue Host video to a YouTube short and then we should get a resulting file over here and it looks like sure enough it is creating the short right here. Shouldn't take very long at all.

So that literally took about 20 seconds I think and we've already got the output video which is way faster. Normally it would take like 5 to 8 minutes. And now, as you can see, using this custom skill, we've already got the finished short. And let's see what it looks like. This already looks a lot better than what I've been able to come up with video use.

You can see we've got the screen share section in the upper half and then the PIP, which is nicely framed in the bottom half. It's not too pixelated or anything. And it just goes through and you can see all of the text on the screen up here, which is exactly what I want. Definitely looks a lot better. I would like to close the gap in between the screen share and the pip in the bottom half.

All I have to do is say close the back black gap between screen share and the pip when cropping the video using this specific skill. And now it's just going to go ahead and modify the script, the transform to short to just automatically close up that gap. And again, I'm currently on Quinn 3.6 6 plus free. So it's costing me essentially zero credits, zero dollars in order to create this custom script using OpenCode, which is pretty cool.

So it just fixed up the Python script right here. You can see I guess that's what that's doing. And it's able to should be able to close up that gap. And then if I also wanted to add subtitles to this as well, there's a specific package that can do that as well. Uh but in this case, I think I'm just going to leave the subtitles off. And now you can see it's automatically regenerating the short with no black gap, which is exactly what I want.

So if I come back over here, sure enough, there we go. So now we've got a YouTube short, which looks really, really nice. And as you can see, it has no black gap in between. It's perfectly aligned. It's focused on my face the entire time down here. And then also the screen in the upper. This is exactly what I wanted to do uh using the custom skill. I'm really impressed by the resulting video.

And now, if I want to create shorts for any of these other ones, I can easily just go ahead and do that. I can say create a short for this video. And we're just going to paste it in. You can see it's going to be able to create it within about 30 to 45 seconds, which essentially eliminates I don't have to use Opus Clip or any other paid software.

I could just use this custom skill that I've created inside OpenCode completely for free in order to create my YouTube shorts. How cool is that? So, as you can see, it's now creating another YouTube short for this particular long form video, which I basically just cropped down to be a minute and a half for LinkedIn. And then I can turn that crop down video into a YouTube short within a couple seconds using my new custom skill.

So, with that being said, I hope you found this video tutorial helpful. Let me know if you would want access to this custom skill. I'm thinking about putting it up on my Gum Road page, and I'll also leave a link down below where you can grab this. And also, go ahead and check out my Skool community. It's completely free to join. I also have paid plans as well, starting at $9 per month. We've currently got 2,700 members in here.

You could take a look around the classroom where we have all sorts of courses, tutorials, and helpful resources as well as go ahead and introduce yourself in the community tab over here. Would love to see you inside the Skool community. And with that being said, thank you so much for watching this tutorial. Please subscribe to the channel if you haven't already. Take care. Stay safe. Peace from Thailand. signing off.

Not ready to join? Get the weekly build notes: new guides and tested builds in one short email.

You may also like