 Okay, today we're going to be looking at Melt. It's probably been about 10 years since I've done some videos on Melt. What is Melt? Well, there's MLT, which is the back end for video editors such as Kaden Live. Melt is basically a command line tool to use MLT. So basically think of anything you can do in a video editor like Kaden Live, being able to do that with commands in the shell, which is pretty awesome. Today we're going to be looking at taking videos and images and overlaying them. And we're doing kind of like a news report. So we're going to have a little banner down at the bottom. And we're going to have a little screen up here, you know, a picture in picture. We're going to learn how to preview that live. And then we're going to look at how to render that out. And yeah, let's go from there. So right now I'm in a directory. If I list out the files, I have two videos, videos A, video B, and then I have a PNG with a transparent background. So if we were to look at that, that overlay image, it is again, a PNG that I created years ago. This is actually based on, I guess I made this little notes and scripts back in 2018. This is the first time I'm doing a video on it. And I just updated a little bit, but I made this image and it's 1080p. It doesn't have to be the same size as your video, but it allows you to basically not have to worry about sizing it in the command. Other than that, if I was to MPV video A, it's MPV, not MVP, M, VPA. So video A is me talking. And here you can hear, yeah, it's me pretending to do a news report. It's only like 10 seconds long. And then video B is me running around in my front yard like a crazy man. Okay. Now, if I haven't already mentioned all the notes, everything I'm about to do is in unpaste bin, including links to use YouTube DL or whatever downloader you use to download those video clips and the images. So you can use the exact examples I'm using, but of course you can always replace them with your own videos. So again, you need to use Meltz. So pseudo apt install Meltz or use whatever package manager you have. Once Meltz is installed. And if you have Caden live installed, it's probably already installed since it's a dependency of it. We're going to say track a MP4. If we just do that, I think it will play that video. Okay. Now we want to add a filter. What type of filter? So we're going to run that same command again. And we're going to add filter, watermark and the name of our PNG image. So now if I run this, it's going to use that image as a watermark or in this case an overlay. So now I got the little banner there. And right now we're just previewing it. Just like you would in a video editor. So great. We're doing awesome. So far, how do we add the other video? Well, just like this is a track, we're going to add instead of track a, the other video track B, of course, the whatever the name you've named your video. And we don't want to, if we just do that now, it's not going to, it's going to play one video. I think the second video we didn't, I don't know if it's going to go into the other video. But what we actually want to do is we want to composite. So we're going to say transition composite. So transition composite. And we have to tell it how we want to composite it. So next we're going to give it geometry. So we're compositing the two images, the two videos. And we're going to say geometry. And we're going to give it some parameters. And from my notes for this particular video, we're doing 70% colon 5% percent. And then, sorry, not colon there, but a comma there, then colon, and I'll say 40% comma 40%. And then if we do that, let's see what happens. I would say, I said fail to load. What did I type wrong? Geometry. Did I spell geometry right? I did. Oh, there's the problem. This should be an equal sign. There we go. So right now, it's playing both these videos, but it's not playing the audio from the first video. I think it might be. Yeah, it's playing the video from the second video since we put that in there. So what we want to do is we want to play the audio from both of them. So what we're going to do is run that same command again, but we're going to say dash transition mix. And that will mix the audio as well. So now if I run that, we are going to get the video of me talking with the audio from both videos. And we have the overlay at the bottom with like a little, you can do a little news ticker or something like that. So that's super simple. Right now we're previewing it. And let's say we want to render it out to a video. Well, we're just going to take that command and we're going to add in dash consumer like that. And then we're going to say AV format colon and then give it a file name. I'm going to say render dot mp4. And if you look at my notes online, you can also give it a bunch of parameters for, you know, probably frame rate, compressions, all that sort of stuff. But if we just, we're just going to do a default mp4, whatever the default settings are. And shouldn't take very long. Again, it's only a 13 second clip altogether. And when it's done, we will be able to watch that video and you'll be able to share it and use whatever. So it's nice. You can do things real time, preview it. And then you can render it out like this. And if I do file and give it our render file, you'll see that it's an mp4 file. And if I mpv or whatever video player you use and our file name, it's going to play that. And I'll, I'll tack this video on to the end of this video so you can watch this at the end. So again, check out the links in the description of the video for all of that. We got time. It's only been six minutes. Let's go in a little bit further. Why would you want to do this from the shell? Well, one, if you have things, let's say you want to constantly have watermarks or overlays, you can do all that stuff and script it out. But what we're going to do now is I'm going to use my cheap little webcam so the quality is not going to be that great. And it's going to be, again, not the best picture in frame rate, but we're going to do the same thing. But instead of the background video that I have recorded already, I'm going to do a live stream from my camera. There's going to be a few seconds delay. But let's go ahead and check that out. So we're going to run basically the same command as before. Let's not render it out. Let's just play it real time. But instead of saying track A here or track for the video A, what we're going to do is we're going to use, and this is for Linux systems, video for Linux 2, which is what you normally use for capture devices on Linux. So we're going to go like this and then we got to give it the device and some parameters. Probably don't have to give it the parameters, but I'm going to go for a lower resolution to hope that I get a better frame rate, although I am going to set the frame rate to 15 here, although we can play around with that. So what are we doing here? We're saying, OK, thanks for video 2. And then we're going to use our devices. Which video device? I have more than one. I'm using video 2 is my webcam that's on top of my monitor here. I'm going to rescale it down to 720 by 340, which probably isn't a clean resolution. I think I just typed in numbers there at a frame rate of 15. Let's go ahead and just run that. Give it a moment to start buffering the video. And there we go. I can go like this and I can point at that. And if I click here, you'll see. Yeah, it's about a two second delay, I would say. Yeah. So again, my webcam is not the best. It's a little pixely. The frame rate isn't too bad, even though I set it to 15. But yeah, there's other parameters you could put in there. But I think when I lower the resolution, it looks like it lowered the resolution for the entire video, though, because my overlay looks low. But I'm just trying to get a cheap webcam to not run too jerky. So you can play around with those values. Let's go back real quick to, well, no, let's use the webcam example. Because let's say I'll do that. I'll run it again. And I was pointing over here because that's where that video is. What if I wanted to point over here? It gets a little confusing because I don't have the video flipped. So it's not mirrored directly across from me. But let's do this. Instead of 70, let's set this to 10. And for size, let's set these to 20. So instead of the video being 70% over on the screen, it's only going to be 10% over on the screen. Instead of being 40% its original size, it's going to be 20% the original size. And it's 5% down on the screen. I'm sure you can use other values. I've just worked with percentages because I think using percentages, depending on what size the video is, it doesn't matter because you're using percentages. Right? Did what I just say make sense? So here we go live. And there you can see the video is now over here. It's smaller and up higher. And again, everything's kind of pixelated, I think because I set the video resolution kind of low. Let's see. I can't remember what happens if I remove all these parameters and just capture the video. I think going full resolution on this cheap webcam is going to be very jerky. But here we go. No, it's not too bad. And I think the resolution is a little bit better. This webcam is supposed to get 1080. I don't believe it though. It's one of those, you know, they advertise it as one thing. And I don't think it really, I think it upscales things. So anyway, live video. Again, you know, you got a little bit of a delay there, I would expect that sort of thing. And of course, you could probably send this to a video and live stream it. So obviously, if you're going to be doing live stream and a lot of overlays like this, you're going to probably want to use OBS. But you don't need to. You can just do it from the shell with Melt. So check out the link in the description to the examples in this video again. There's links in there to the sample videos I did and the overlay image. So you can download exactly what I did and play around with the exact same files. And then you can try it with replacing your files in your webcam. So I hope you found this useful. Filmsbychrist.com. That's Chris the Gay. There's a link in the description. And as always, I hope that you have a great day. Hello. And today with FBK News, we're talking about this crazy man who's, I guess, just running around outside. That's all for today. Thanks for watching.