 Okay, this is the second video in this tutorial. First off, just like the first video, I have to start off with an apology. I apologize in the first video. I didn't realize I had the output of my computer running back into my videos. So when I was recording and I played some videos, you probably couldn't hear me very well. But we're going to review a little bit here anyway. Basically, I'm in my folder here with the original video clips. We have our script here that puts the converted videos into the edit folder. So what I was saying in the last video is if we were to play these videos with MLT, we are going to get some jerkiness at the beginning of each clip. That is something new. It didn't happen before. I'm running unstable Debian, so I'm running unstable versions of MLT. The simple fix was converting the videos to a different format. That's what we did with this script. So if we go into our new edit folder, run the same command there, you will see that there is a smooth little movement from video to video. There is no jerkiness or pausing at the beginning of each clip. A cue to exit out of that. So now that we've seen our little preview of what the video is going to look like, let's say it looks good and save it to a video, an actual file. So what I'm going to do is MLT, Astrict MOV because I want all my videos in here. And then we're going to give it the consumer switch. So now there are different types of options for consumer where we want the AV format. So an audio video output file and then colon and the name of the file. We'll just call it 100. In this case, I'll go AVI because I want to go with... Now you could just hit enter here and it will save the video as some sort of AVI. I don't know what codec it uses by default, but I like using Xvid. So we're just going to say video codec type stuff right here. Video codec equals the library file for Xvid. Now I can hit enter at this point, in which case actually I will. And it will give you an output here what current position and frames it's at. And when it's done, I'll play this video, but you'll see that it's not a very great quality. And that's because we haven't given it any parameters for what quality we want. We told it we want to use this codec, the Xvid codec, but we didn't tell it basically the option. We're going to give it is the bits per second or kilobits, kilobytes, whatever. The byte rate. So we're going to do that. I'll show you the video as the output here at the standard. And it's not going to be that great. And then we're just going to add one little command at the end or option at the end that will actually increase the quality. And I'm going to change the, basically I said the byte rate of the video, or bit rate of the video. And we'll say mplayer 100.avi. So there it is, but you can see that it's very pixely and the colors aren't great. So I'm just going to queue to get out of that. Run the same command as before. MLT, here let me clear the screen for you. MLT, all our MOV files, consumer. And then we are going with the AV format for the output, colon, the name of our file, 100.avi in this case. The codec we're using. And then I'm just going to say b equals, in this case I'm going to say 5000k. And hit enter. Now you'll notice right away, one, it doesn't go, oh, that file already exists. Are you sure you want to continue? Be careful you don't overwrite a file that you have already created that you want to keep. If you name the output of a file that exists, it is going to overwrite that. Also, I want to point out that I put 5000k. Why 5000k? The example I saw online used that. Play with that number, get what you want. Obviously smaller might get you a smaller file size, but you're going to lose some quality there. Also these options here, MLT uses FFmpeg to compress the video. So most of these video and audio options that you put in are going to be the same as FFmpeg. So if you're unsure, but you know about FFmpeg, use what options you use in FFmpeg. If you don't aren't familiar with FFmpeg, use what I show you here or give it a little Google. So we'll click here and play here the file. And you can see the quality is a whole lot better. Obviously you can also give it settings for audio output. In fact, I'll do that. And we're also going to try a different video output here. So I'm going to cue to quit that. We'll run that same command, but this time instead of xvid, let's do x264. That's pretty popular out there. We'll call this and we'll make it since it's 264 an mp4 file. We'll hit enter there and let that run. It says that I too many bits per frame requested. Unable to and called audio, disabling audio output. So I guess with that format we're going to have to give it some audio options, which I was going to do in the next little part of this tutorial. I also want to mention that I've been playing with MLT for one day. I don't know if I mentioned that in the first video. I've known about for a long time been meaning to look into MLT and just haven't. And most of my command line stuff I've been using FFmpeg for a little bit that I was able to do. Now that I know how to use Melt and MLT, I'm going to be using it a lot more. So forgive me if I stumble through parts of this. I've been playing with it for a day. But I definitely wanted to share it with you because it's something I've been, like I said, wondering about for a while. I looked into it here and there and couldn't figure out how to use it. Finally saw one example online on how to use it. And then I saw, well, this is how it works. I was able to look through the man file and figure out the rest. So, and I still am only scratching the surface of it. I think we're getting close to the end here. I forget how many frames there were. Looks like 1413. Okay, that took a little bit longer to run than before. But let's mPlayer100.mp4. And there's our video, but no audio. Because as I said, I guess x264 requires you to tell it. It's always an option. It doesn't have any defaults. Let's real quick list out here all our files that start with 100. And the mP4 is a little bit smaller, but there's no audio in it yet. And we'll just run the same command as before. We'll give it an a here just for different files so we don't overwrite, so we can compare the two. And then for audio options, we can say audio codec equals aac. I'm assuming, and I haven't tried it yet, that you can do copy, just like you can with ffmpeg. And we'll just copy the audio without recompressing it. But we'll play with that in a future tutorial probably. I don't want to spend too much time on this today. The audio bitrate is 128K. And that should do it. Let's hit enter. We'll let that run. I'll give you a little spiel here while this is going. We'll take a minute and a half. You notice we didn't get the error about the audio because we gave it audio parameters. But I hope you're enjoying these tutorials. I hope you find them useful. We're definitely by the end of the series, I'm going to create a whole little film, like a minute or two film, completely from the command line, adding effects, trimming the videos, adding audio. So keep on watching if you're interested at all. At the very least, maybe you can use this to trim a bunch of videos if you need to trim a bunch of videos from the command line. But hopefully you'll find it useful and be able to create yourself little presets for your home videos. Please visit FilmsByChris.com. That's Chris with the K. There should be a link in the description while you're over there. Check out the rest of my videos. I have playlists there. I post other things about Linux and other free and open source just news. Also, if you have any questions, YouTube comments are not the place to ask questions. I mean, if it's a simple question, fine. But if it's a technical question, please go to FilmsByChris.com and click on help and they'll bring you to our IRC channel. Okay, that's done real quick here. Let's first list out our files. So the MP4 here, even with the audio, is still a little bit smaller than our Xvid video. But I also don't know what audio compression the Xvid was doing, because I didn't give it any parameters. Let's have a look at how that video looks. Full screen, 100A. Looks good. And we have audio. So that is joining videos. In the next tutorial, we're going to do basically the same thing, but we are going to use a fade transition to fade each video clip from one to another. So thank you for watching and I hope you enjoy this tutorial and I hope that you have a great day.