In this post I'll be sharing a few pieces of advice for video related tasks, geared towards beginners. I'm not an expert by any means but I do have a fair amount of experience that I want to share with others, to help them get started faster than I did. If there are any mistakes feel free to correct them.
Basics
>what is a video?
A video is a combination of a visual stream (images/frames) plus an audio stream (sound). A video can have multiple audio streams, for example an English audio stream and a Japanese audio stream, and can also have multiple visual streams but that has very few use cases. Each stream is encoded using a codec, and all streams are wrapped up in a container.
>what is encoding?
Generally speaking, encoding is storing original data using a certain method or structure, such that:
1. The result can be understood (decoded) by a certain program, for example a video player.
2. The result has smaller file size (compression), but not necessarily.
>what is a codec?
A codec (coder-decoder) is a program or algorithm that does the encoding/decoding. For example a program like VLC has built-in codecs for viewing and converting between the different encoding formats. The most common video codecs are H264 and VP9. The most common audio codecs are AAC and Opus.
>which codecs should I use?
The H264 + AAC combo is the most used and what I recommend. These 2 codecs encode the fastest, their only drawback is they're not open standards like VP9 + Opus... Ultimately the codecs don't matter that much, what matter more are the settings you use when encoding, I'll elaborate on that later.
>what is a container?
A container is basically the format for storing the encoded streams, which decides the extension of the file. Examples are MPEG-4 (.mp4), WebM (.webm), and Matroska (.mkv). Please note that the container is not the codec! Containers can hold different codecs, for example I can have a .mp4 file (MPEG-4 container) with H264 or VP9 video, similarly AAC or Opus audio. You can mix and match codecs as long as the container supports them. For example WebM does not support AAC audio, but supports Vorbis audio unlike MPEG-4... Another thing to note is that you can change the container without re-encoding the streams within, for example I can change a VP9 + Opus video from .webm to .mp4 in a second without the streams being affected.
>which container should I use?
The absolute best container is Matroska, it supports virtually any combo of codecs you throw at it, and also supports embedding a subtitles file. Its best feature however is that if you're recording and your PC / game / recording program crashes, the video file is not corrupted and can be played normally... Its only weakness is that it's not supported on the web, so if you have an .mkv file change its container to .mp4 or .webm (refer to the previous point) or re-encode.
Programs
All of these are free and multi-platform.
>OBS
Probably the only real choice for recording and streaming game footage. Easy to use but boasts advanced features for users who know how to leverage them.
>Shotcut
In my opinion the best video editor. Stable, easy to use, and has great features like proxy editing... I don't recommend Kdenlive because it's very unstable on windows (from my experience) and sometimes produces corrupted output, but give it a try if Shotcut somehow isn't working for you.
>ffmpeg
The swiss army knife of video tools, and the basis for all the programs mentioned above. Very powerful but a pain to use since it has no GUI. It's mostly used as a converter but it can also record and stream your screen... Configuring it for recording/streaming differs based on your OS, and I haven't tested if it can capture (fullscreen) game footage.
>Blender video editor
Haven't tried it. A bit of a niche choice since only Blender artists use it as far as I'm aware, but seems to be very powerful thanks to leveraging Blender's node system.
Advanced
You can skip to the ffmpeg section in the next post if you're not particularly concerned with the quality or file size of your video.
>compression
There are 2 compression types used by codecs:
1. Lossy; reduces file size by losing quality. Produces smaller files perfect for streaming and the web, but at lower quality.
2. Lossless; reduces file size without losing quality. Produces full quality files perfect for video production, but at larger file size.
Some video codecs like H264 and VP9 support both compression types. To control how lossy the result will be, specify the CRF (constant rate factor) between 1 (barely lossy) and 63 (very lossy), but ideally your range will be between 17 and 30. Lossless mode is activated by specifying a CRF of 0.
>preset/speed
That's how fast you want the encoding process to be. Note that the slower the speed, the better the compression, but that is subject to the law of diminishing returns.
>color space
Basically how color information is stored. There are many color spaces in existence but only 2 are most commonly used:
1. YUV; most used, JPEG-like, general purpose but perfect for camera footage.
2. RGB; least used, the same color space as your display, perfect for screen capture.
Note that YUV has 3 variants; yuv420p, yuv422p, and yuv444p. The first is the "default", the most widely supported, the smallest and the crappiest looking, but it should be great for most use cases. The second is less supported, larger, but better looking. The third is also less supported, the largest, but the best looking, at the right quality it could look almost identical to RGB, which is great because RGB has poor support on the web... For lossless encoding, make sure you are targeting the same color space as your source, or you'll end up with very different colors.
Use cases
Having learned all these advanced settings, let's see when we can use them.
>pixel-perfect recording
Let's say you're recording your screen playing a game with rich colors and fine details, so you want to capture all that in a pixel-perfect manner at a smooth framerate, without caring for file size. In this case you can use lossless compression with crf=0, ultrafast speed, and RGB color space.
>everyday recording/streaming
You're not too concerned with quality but want smooth framerate and smallest file size. In this case you can use lossy compression with crf=30, ultrafast speed, and yuv420p color space.
>exporting a production from shotcut
You made a professional video or a short film and want to export it with good quality at the lowest file size possible, you don't mind waiting. In this case you can use lossy compression with crf=23, veryslow speed, and some variant of YUV (depending on your colors).