 Okay, so continuing with our tutorials on editing video from the command line using Melt and MLT. Today we're going to look at something very basic, which is trimming videos, the clips. So let's have a look here. I got a bunch of videos here, and most of them are probably about three seconds long, but there was one in here when we were watching them. It was a little bit longer than others. Let's say I wanted to trim it down. So I'll just quickly list them with all the information we can see. This one is much larger than the others, so good chance that's the longer one that I'm looking for. Let's use Melt and the name of that file to view it. So here it is, and although most of the clips in this little project I was working on were about three seconds, this one's a little bit longer, mainly because it wasn't a close-up shot. The reason, I'm just telling you the reason I filmed it like this, far away shots, more going on. I make them a little bit longer, give people a chance to see what's going on. Or a close-up shot of one or two people doesn't take long for your brain to go, oh, there's two people there, but you may want to look around on these. So that's why I filmed that shot a little bit longer than the other ones. It is 176 frames, 30 frames a second, so that would be a little over five seconds. So let's say I wanted to trim that down and make it one second long. Well, all I have to do is MLT, the name of the file, and then the output, well, let's do input and output start off. We would tell it where we want it to start and where we want it to end. So let's say I wanted to trim it to the middle of that video. I can say input, I'll say is 50, and let's say I wanted it to be two seconds long, so the output would be frame 110. That's that, and it is now two seconds long. So we once again melt the name of the video, what frame you want to start on, what frame you want to stop on. I can also leave out the stop and it will start at frame 50 and it will go to the end of the clip. So instead of 176 frames, that little clip is now 126 frames because we cut off the first 50. We can also go the other route. We can say we can make the out 100. Now let's do 90 nice round three seconds long. So because we didn't give it a in time, it starts at the beginning of the clip and plays to frame 90. So that's input and output starting and ending frames for the clip. Obviously if we wanted to put that with other clips, so once again let's just list out. So we'll say melt, we'll give it this video clip. This is our longer clip here, and this is our another clip. So if I play that now, you can see it playing. It plays each one, one after another, but let's say once again we want to trim this longer shot. We can do that. I'll hit Q to get out of that. With MLT as I said in a previous tutorial, but we're going to touch on it a little bit more because it's kind of important, is you list each video clip and after the name of each clip you put the parameters for that clip. So in this case I want to trim this video because that's our longer video. So right after that I'll say in equals, we'll say 50 again, and I'll say out equals 110. So now just like before it plays each clip, but that second clip, this one right here is now shorter, just like the other ones is it isn't longer because we trimmed it. And so this in and out does not affect the other clips, it's only affecting the clip that we're giving the in and out, the start and end for. And of course we can add other information, try and do this, let's see. Mix 30 frames, mixer, Luma. So if you watch the previous tutorials, once again this is after this clip. So if I typed everything right, I'm still new to MLT so I could be wrong. We are fading this second clip into the first clip by 30 frames, which is one second. So not only is it shorter, starting at frame 50 and ending at frame 110 of that clip, we're also going to be mixing it. So let's go ahead, place first clip should fade, both audio and video. The next clip though it didn't fade because we didn't give any parameters for that third video. So we can now also take this, I'm just going to copy and paste this to the third video there, let me clear the screen here. So once again we have melt, we're going to play our first video and then with our second video we're going to trim it, but then we're also going to fade, we're going to mix it with this clip and then we're going to take our next video clip, this one right here and we're going to mix it with the one before it. There we go. It was a very quick fade because that center clip is now mixing 30 on the beginning and 30 on the end and it's only 60 frames long. So you don't really get to look at it very much there. We can always adjust that, we can make this a little bit longer, we'll add 30 to this. So now it should have a second fading at the beginning of that clip and a second at the end and a second of that clip playing. There we go with nice audio and video transitions. And as always we can then add a consumer AV format and I'll just call this fade trim.avi and I'll say I want my video codec to be libxvid, so we're using the xvid library, lib library, got it. And I'm going to give it a video rate of 5000K, which is a pretty decent quality. We'll hit enter and this time instead of playing, it's going to create an output video, which is 200 and 29 frames long and we can now use mPlayer or Melt whatever you want, whatever video player you want to play it, we called it fade trim and there it is, we're playing it full screen where before it was in a window and it was larger resolution, it didn't fit on the screen, that's why I hope you understand what I just said because I kind of mumbled it. Basically what I was saying was when I just play the video here you can see it's kind of fit on the whole screen if I move it around, it now fills in, it's just the video itself is large and going off the screen but when I move the window it resizes it. I need to find out if Melt has an option for full screen playback rather than in a window I'm sure it does. So that's it, once again we'll have a real quick look at our final command which was this right here, we've got Melt, our first video clip, our second video clip with its parameters of when it starts and how it's mixing with the video before it, how long it is and how it's mixing, then we've got our third video clip, how long it's mixing with the video before it and how it's mixing it with a luma and then we're going to say consumer so some sort of output and once again we're doing AV, Melt has other options, it can create XML files and other stuff as well, then we're going to have, in this case we're doing an AV, an audio video format, colon, the name of our output file, I'm telling it what codec I want and the video quality right there. So hope you're finding these tutorials useful, hope you're using them, even if you don't use them I hope you found them interesting. Please visit my site Films by chris.com, chris at the K, link in the description, head over there, check stuff out, help support the site, there's a donate button there, there's also a help button if you have any questions and I hope that you have a great day.