7.5.5 Use case: x265 (*) matroska libx265: configuration parameters. An example of profile based on CRF instead of fixed quality scale (VBR). It works fine for FullHD and up. # \begin{lstlisting} crf=16 preset=medium #x265-params=me=star #keyint_min=25 #profile=high colorspace=bt709 color_trc=bt709 color_primaries=bt709 pixel_format=yuv420p10 # \end{lstlisting} NOTE: # CRF 16 creates a balanced compromise between quality and file size. A CRF of 16 delivers satisfactory results in most cases. However, if the video material is really noisy, a CRF 16 can lead to unwanted large files. In this case, a trial export of perhaps one minute should be performed. The resulting bit rate can be used to correct the CRF to 17,18,19... Remember, a CRF of 0 means lossless, the higher the number the stronger the compression. The approximate calculation of the final file size can be extrapolated from the sample export. # Preset changes encoding speed and generally degrades the overall result. Medium (default) always fits. # me=star improves the search for very fast movements, but slows down the encoding. # Keyint does ffmpeg automatically, otherwise the setting must match the frame rate. # Profile does ffmpeg automatically. # Source sRBG and retention of color space. The color space information must be used explicitly so that it can be included in the video. Cinelerra GG or FFmpeg does not write it by itself. Without this information the players (e.g. MPV) stick to the dimensions of the video and take the assumed color model from a table. With videos in the dimensions from 720 to 1080 this is like written bt709. For smaller dimensions, e.g. DVD, bt601 is assumed and for 4k and above it is bt2020. Normally this is not a problem, but if you want to export a FullHD without color loss to a smaller size like 576 for example, you have to inform the encoder as well as the decoder of the player. This also applies if the videos are to be loaded on video platforms, where they are then converted into videos of different sizes. It is a security measure to prevent false colors, such as the color profiles in digital photos and the copies made from them. # Output in 10 bit, prevents 8-bit step formation (banding). (* By Olaf or Thanks to Olaf)