 Hi, I'm Denshi and this is just like a short little video to talk about some options I recommend for FFMPEG when converting audio, video, just basically whatever. I've made a video guide on FFMPEG. This is more of a, just a random tech video to talk about some options that I like to use that I want to compress video or something. So here I have a video called Friends House and all it is is some footage at a friend's house. This has got a cool bird, as you can see. And what I'm gonna do is I wanna take this. This is a 98 megabyte file, 98.8 megabytes, quite large and it's only like 30 seconds long. I wanna take this and I wanna compress it to something I can share for like eight megabytes or seven megabytes. So I'm gonna do FFMPEG-I Friends House right there. So you've selected it. I want to use the libx264 codec, so dash dash C for the codec, colon V for video codec and libx264. I spelled lib incorrectly, whoops. So that's libx264. The thing is you don't have to specify that because that's already selected as a default codec so we can just skip directly to the dash CRF option which is the quality. I'm gonna set the quality to 30. So the higher you set the CRF, the lower the quality of the video. So 30 is quite low quality for this, but I only wanna share it with friends and I'm not like interested in super high quality or whatever. Then I'm gonna set the scale, so dash S to 1280x720. So 720p because once again, I just wanna share it with friends like a chat room or whatever. So it's not gonna be a super large resolution. They're not gonna expand it to their monitor or take a look at the fine details. That's also why the CRF rate is 30. Actually I might wanna turn that down to like maybe 27 or so because that may be a little bit too grainy even for a chat room, but it's okay. Then I want to set the audio codec. I like lib opus. It's called lib opus. It's a new relatively compression codec. It's quite good, quite good quality, especially good when it comes to music. And it's a pretty excellent compression. Now I'm gonna give the output file a name. I'll call it friends.mkv. I'll package it up in an mkv file. Or actually, you know, I'll do mp4 since that's more common. Just make sure I'm not using the same name because I don't wanna override the existing file. Gonna press enter and off it will go converting it. Now it will not take a super long time because x264 is quite quick and it's only like a 30 second video. Just give it a second. All right, so it's done and the resulting file is 7.4 megabytes which is definitely small enough to share in a chat room. It's a smaller resolution. It's 720p. The quality may not be super high. I mean, this is basically the same since the original video. They didn't really have this super high quality either. So what about the opposite? Let's say I wanna import this into an editing software and work with it as an uncompressed file. Well, I actually have a script for that. It's called the uncompressed, this one. And I'll talk about the options I use in this. So ffmpeg-i friends house once again. I'll do friends, you know, apostrophes are so annoying and unix systems. ffmpeg-i that. I'm gonna select the codec. I'm gonna set it to mpeg-4 because DaVinci Resolve and other editing software will prefer uncompressed, well, you know, more uncompressed editing formats like mpeg-4 for video because they're more uncompressed. They're easier to work with. And on Linux, it's all that's basically compatible. I don't want it to look like garbage though. So I'm gonna do dash Q v zero. So that means there's as little possible quality is kept as much as possible in the uncompressed video. I wanna set the pixel format. So PIX FMT to UVE, I believe actually what I've chosen up there is outdated 422p. So I'm gonna set it to 420p because 420p is a little bit better. These are basically the color format. So that means like how it stores the color information and other, you know, pixel properties of the actual video. So this is important to make sure it's a very uncompressed and easy to work with video. And the most important thing of all, well, the second most important, the audio has to be set to PCM underscore S16M. Not exactly the most memorable codec, but this is what many editing softwares will prefer. I'm gonna call the output file. Okay, I might have accidentally, wait a second, what have I done? PCM S16LE, that's okay. I'm not gonna call the output file PCM S16LE. Okay, whatever. Okay, so now it will work. They'll have that copy pasted in the description anyway. So this is for uncompression. So as you can see, it's taken less time because uncompressing text less time. There we go, it's done. So you have friends.mov uncompressed. And as you can see, it's 102.5 megabytes, which isn't super far off from the original one, but it is still uncompressed video. And the quality is basically the exact same. Except this time, if I were to open up DaVinci Resolve, you'll notice that this file, I cannot import. That it doesn't really import, it just imports an empty file. But this file I can import. And I can work with its audio as well. I can do things like, you know, it comes out with audio and I can scrub through it and I can actually work with it. And this format of just uncompressed video is easier to work with because it's easier on your CPU because it doesn't have to uncompress the video as you're editing it. So doing that pre-uncompression is actually quite useful if you're editing. And especially if you don't have a CPU that really wants to be dealing with that. Or if you just wanna be, you know, resource managing, resource restrictive, resource minimalist, I don't really know, but it's called. Anyway, on to audio. As I said before, I really look quite like Libopus as a compressed audio format. So if I wanna take one of these files, like let's do friends.mov right there. And I want to take this and I wanna convert it to audio. So let's say friends.mp3, for example. It will automatically assume the encoder I want to use. So you'll see that over here, it identifies that we're using a PCI-MS16LE. So that's what we specified when we wanted to uncompress or turn this one into this one. But now it's turning the thing into Libmp3 LAMES, the LAME encoder, which is what is normally used in MP3 files. The audio quality, obviously you can't hear it, but the audio quality is essentially the same apart from a couple of things. So if I wanted to just take the existing audio in this and convert it to something I can use in DaVinci Resolve, I'd take this and then I would convert it to friends.mov, which is really, really quick as you saw, but it's highly uncompressed. It basically just has no compression at all. So what you can do is, well, you should probably take that file, so fmpg-friends.mov, and then convert that over to friends.flac, which is, you know, just takes basically the exact same amount of time because it's super quick, but it ends up with a more compressed file. So see, this is 4.8 and this is 2.2. And flac is also lossless, but it employs compression, lossless compression. So it cuts part of the audio which is genuinely unnecessary while not damaging any of the high quality audio. And it basically you turn out with a smaller file size in the same quality. So flac. Anyway, that's pretty much it in terms of the recommended defaults I give to most people. If you want to have a more compressed file, you can always use this amazing libx265 codec. So, you know, cvlibx265 and then convert to friends.mp4, and you'll notice that, as you can see, it's much slower because it's a lot more compression, at least it's normally a higher quality of compression, but you'll end up with a higher fidelity file and something that is genuinely lower file size to the regular one, although not all things can actually read x265, so I don't really recommend it for a lot of websites. So anyway, I hope you enjoyed this video about these default recommended tips for ffmpg. If you want to see more ffmpg tip videos like this, then feel free to ask questions and give suggestions in the comments. And I know I've been Denchie, goodbye.