 All right, what's up everyone? So in this video, we're going to make a video slideshow with FFmpeg without using any kind of video editing software. So you might want to do one of these things. Let's say if you you know get back from a trip and you want to make a slideshow with all your photos or you know, let's say your son's having a graduation or something and you want to make some kind of slideshow with that. You can do this really easily just with FFmpeg, just with a terminal commander too. So in this video, I'm going to show you how that would generally work. So as an example, in this folder, I have a song file and the video is going to be set to this song. It's five minutes and 44 seconds and in this folder, I have a Gajillion Pepe the Mean Frogs. So what we're going to do is we're going to set, we're going to cycle through all of these memes and we're going to have them set to this music. And it sounds like there are 500 something of these and if you have 500 something photos from your trip or something like that, it's way too much of a pain to put them all in a video editor normally. So how do you do this? So if you both stop in a terminal, first off, make sure you have FFmpeg installed. So it's basically, I'm pretty sure it's installed by default on basically every distro, but just make sure if it's not. And it's usually the syntax works like this. You say, you know, hyphen f and this means force some kind of input so it could be something like x11 grab, which is like grab your screen and then you specify an input blah blah blah. But in our situation, we're going to do something a little bit different. That is FFmpeg has this nice little thing called image to pipe. And it takes a certain input. It takes hyphen as an input. And what this means is instead of you typing out all the files that you want, all these, all the pictures you want, what you can do is you can actually just use cat, the command cat to pipe all of the pictures you want in. So I am going to take all of those pepe memes and with cat I'm going to pipe them right into FFmpeg, okay? So we have our input and then we're going to set an output. We'll just call it output. mkv and that's going to be that. And so this is going to basically what this is going to do is it's just loading. I mean, it's really just making our video right now. So just as a just sort of as a caveat, if here I have only PNG files, now if you have PNG and JPG, you might want to convert one to the other. And that's because FFmpeg has some trouble dealing, like if you have inputs of different types, it has some trouble dealing with that. So you might want to use the image magic convert command. So let's say you have, you know, picture.jpg, you should try and convert it to picture.png first. So just make sure all your files are PNG or all your files are JPG and you should be fine. Don't try and convert them just by renaming them. That's not going to work the way you want it to. So I think this should be about done. All right, hurry on up. I put too many memes. That's the problem. That's the problem with my life sometimes. Too many memes. Hopefully we can go ahead and try it. So if you open it up, okay, it says it's truncated. It'll be done in a second. Yeah, it's done. Okay. So if you open it up, you'll see it cycling through the images as quickly as possible. Now, this is not what we want in the end. We want them to be paced at a reasonable pace. So what it's doing now is it's just giving each one of them one frame. And I think FFmpeg by default goes by something like 23 frames per second. So that's not exactly what we want. So let's change that. So here's our last command. Now what we want to do is set a frame rate, okay? So we want our frame rate. Now notice I said before I have a song that I want to set this to. And my song is what was it? Five minutes in 44 seconds. I think the... So if we do the math of that, what is that? That's 344 seconds, right? So what you want to do is let's say I have 526 images here. Just divide 526 by 344. And this is going to be the frame rate you want if you want all the images to match, you know, with the length of the song. So I'll just say that's, you know, 1.2 or 1.53. And then I'll actually, well, before we do that, I also want to go ahead, since I'm already going to have this at the right length, we might as well put in the actual audio file. So just don't get confused by all the syntax. All we have is frame rate, image to pipe. That's how we're getting our files and specifically through this hyphen. And the last thing we need is we want to have this actual song in here. So we'll say what it will just say F victory.og and then we'll say, no, actually we don't want F. We want I, don't we, for an input? That's only if it's Yeah, that's not the same thing. And then the other command we want is a codec copy. And this just means take the audio codec of, you know, whatever, whatever ever file we have. So I'm going to go ahead and run this. Oh, yeah. It is trying to replace the file before. And you can get it to overwrite just by putting in the y tag, or you could just delete the file, but whatever. So we'll let that run for a second. So anyway, I drug this out a little longer than I needed to, but really all you need is that one command. So you specify where your images come from, you cat them in the ffmpeg, then you specify your frame rate. And you just have to do a little bit of math to get that. And of course you give the input of the song. Now when that's done, we are going to have a file, a movie file, which is just the length of this song that has all of these 500 or so pepe's in it. So we didn't have to do any of the work, no problem whatsoever. That would have been terrible to do, to do otherwise. So now I'm just stalling for time because I don't want to video edit. I don't want to edit this out of here. Um, all right, hurry on up. Oh, maybe I can, maybe I should go ahead and update. Why not? You guys want to see me update arch? Well, technically it's parabola here, but uh, we got some kind of error there. It's almost done. Ah, see that's the thing about video editing. Like video editing takes like 90% of your time, so I don't like to do it. I swear it's almost done. I should have told you a joke or something. Oh geez. All right, it's almost done. Trust me. Trust me on this. I have too many pepe's. That's the problem. All right, it's done. It's actually done now. Okay, so now we have our final output, and I can click on that. You probably can't hear that because it's just in my headphones, but yeah, I think I'll actually post this output, you know, just because, you know, you might want to see it. Go ahead and update this. So yeah, hope you learned something again. Let me show you the command to do the whole thing. So just cat pepe's or cat, whatever their file, any kind of, if you're, you know, whatever you want, into ffmpeg with a frame rate with the audio file, and that should be it. That's all you got to do. So anyway, thanks for watching. Hope you learned something.