FFmpeg supports hundreds of codecs and formats. Some are proprietary and cannot be implemented in FFmpeg or can be voluntarily compiled as non-free; others are proprietary but their use is free; finally there are the Open formats/codecs, fully supported and well documented. We are only describing here a selection of the most well-known and most frequently used ones.
High quality formats are also called Mezzanine codecs, Digital Intermediate, Preservation codecs or Editing codecs. These have no compression or intraframe lossless or near-lossless compression and are suitable for editing, post-processing, mastering and archiving. They are also used for the interchange of files between different programs. They take up a lot of disk space and require a powerful system.
These are also called Delivery codecs. They are the most used and widespread being suitable for streaming, video sharing, watching TV, smartphones, plus more. Because of lossy compression type Interframe, they produce smaller files with variable quality. They are not suitable for editing, compositing and color correction. Further rendering of these formats worsens the quality exponentially. The most used codecs have hardware support (vaapi, vdpau, nvenc) that make them more efficient.
Matroska is a modern universal container that is Open Source so there is lots of ongoing development with community input along with excellent documentation. Also derived from this format is the Webm container used by Google and YouTube, which use the VP8-9 and AV1 codecs. Although using in CINELERRA-GG is highly recommended, you may have seeking problems during playback. The internal structure of matroskas is sophisticated but requires exact use of internal keyframes (I-frame; B-frame and P-frame) otherwise playback on the timeline may be subject to freeze and drop frames. The mkv format can be problematic if the source encoding is not done well by the program (for example, OBS Studio). For an easy but accurate introduction of codecs and how they work see: https://ottverse.com/i-p-b-frames-idr-keyframes-differences-usecases/.
To find out the keyframe type (I, P, B) of your media you can use ffprobe:
$ ffprobe -v error -hide_banner-of default=noprint_wrappers=0 -print_format flat -select_streams v:0 -show_entries frame=pict_type input.mkv |
-v error -hide_banner: serves to hide a blob of information that is useless for our purposes.
-of: is an alias for -print_format and is used to be able to use default=noprint_wrappers =0.
-default=noprint_wrappers=0: is used to be able to show the information from the parsed stream that we need.
-print_format flat: is used to display the result of ffprobe according to a flat format (you can choose CSV, Json, xml, etc).
-select_streams v:0: is used to choose the first stream (0) in case there are multiple audio and video streams (tracks, in CINELERRA-GG).
-show_entries: shows the type of data collected by ffprobe that we want to display (there are also types: _streams, _formats, _packets, and _frames. They are called specifiers).
-frame=pict_type: within the chosen specifier indicates the data to be displayed; in this case pict_type, that is, the keyframe type (I, P, B) of the frame under consideration.
input.mkv: is the media to be analyzed (it can be any container and codec).
(see https://ffmpeg.org/ffprobe.html for more details)
We thus obtain a list of all frames in the analyzed media and their type. For example:
frames.frame.0.pict_type="I" frames.frame.1.pict_type="P" frames.frame.2.pict_type="B" frames.frame.3.pict_type="B" frames.frame.4.pict_type="B" ... |
There are also 2 useful scripts that not only show the keyframe type but also show the GOP length of the media. They are zipped tars with readme's at:
https://cinelerra-gg.org/download/testing/getgop_byDanDennedy.tar.gz
https://cinelerra-gg.org/download/testing/iframe-probe_byUseSparingly.tar.gz
We can now look at the timeline of CINELERRA-GG to see the frames that give problems in playback. Using a codec of type Long GOP, it is probably the rare I-frames that give the freezes. To find a solution you can use MKVToolNix (https://mkvtoolnix.download/) to correct and insert new keyframes into the mkv file (matroska talks about cues data). It can be done even without new encoding. Or you can use the Transcode tool within CINELERRA-GG because during transcoding new keyframes are created that should correct errors.
The image sequences can be uncompressed, with lossy or lossless compression but always Intraframe. They are suitable for post-processing that is compositing (VFX) and color correction. Note: even if CINELERRA-GG outputs fp32, exr/tiff values there are normalized to 0-1.0f.
Some formats, though used in the past in the pro field, are disappearing with the evolution of technologies. DVD is becoming more and more niche, while Bluray is still widespread (also as a backup); DV/HDV remains only as a support for old Camcorders with magnetic tapes. DV is still a quality format, with intraframe compression; HDV is mpeg-2 compressed.