Presets: ultrafast, superfast, veryfast, faster, fast, medium (default), slow, veryslow for the specific purpose of capture, we need the operation to be fast enough, caring of the compression factor much less. Please see FFMpeg documentation.Ĭonstant Rate Factor crf: valid values: 0-51, 0 is lossless, 23: default, 51: worse possible quality.įrame rate framerate common frame rates: 24, 25, 30, 48, 50, and 60 At the time of writing, I strongly recommend the most advanced AOMedia AV1, but it can be something else. Naturally, for final production, the resulting video will require transcoding using some more advanced codec with good quality and much better compression. If you have a better idea, you can always replace the codec ( -c:v) parameter and codec options (next line) with something else. In this situation, AVC is a very good choice. If encoding is slow, it won’t encode frames in time, and it can even delay the computer operation.
Usually, we don’t need the best compression, we need the algorithm which gives us good quality but not overwhelms the CPU and other resources. Videoįirst of all, why using H264 (AVC) standard? The answer is: for the same reason as ultrafast: performance. In other cases, we need the capture from a microphone. Sometimes, this is the audio produced by computer software, and this is the case shown in the command line above. The audio capture depends on the device to be used. The first line after ffmpeg is optional and defines audio capture, two following lines - video capture. So far, I’ve sorted out the usage only for Windows, but later may need to do the same with Linux. Unfortunately, these methods and corresponding -i “input” options are platform-dependent. Two f “enforce format” options define the methods of capturing video. framerate 24 -crf 20 -preset ultrafast ^ f dshow -i audio= " Stereo Mix (Realtek Audio)" ^