Suggested codecs/file formats for editing (speed, reduced lagging)

Hi GIS, I’ve studied this question quite a bit lately. I tend to not use ProRes in ffmpeg-based programs because of encode/decode speed and because of file size. ProRes is a 10-bit format but Shotcut is a mostly 8-bit editor. So there is some disk space lost representing colors that may never be seen. The prores_ks encoder is also slower than other encoders by a factor of 3 on my computer.

These are the four codecs I would recommend, each for a different reason:

  1. HuffYUV (4:2:2 8-bit only) in a MKV container. This format has the least aggressive compression, meaning it decodes the fastest. Its subsampling is also in Shotcut-native 4:2:2, meaning there is no CPU spent on conversion. The trade-off for this speed is massive file sizes. This is the format for ultimate performance and perfect color.

  2. DNxHR HQ (4:2:2 8-bit only) in a MOV container. This is Avid’s competitor to ProRes. It is also a very fast format that holds color very well. There is currently not a DNxHR export profile in Shotcut, but you can encode directly with ffmpeg by using -c:v dnxhd -profile:v dnxhr_hq and put the result in a MOV container. This format takes around 30% less space than HuffYUV with color fidelity that is visually (although not mathematically) identical. The 4:2:2 is good for holding edge sharpness at proxy resolutions if you are just editing and want to verify footage is in focus.

  3. Ut Video (using 4:2:0 8-bit mode) in an AVI container. Similar to HuffYUV. This setup gives you mathematically perfect color fidelity, but in a 4:2:0 mode. Combined with its more aggressive compression, it yields files around 30% less space than HuffYUV. It loses slight performance due to the 4:2:2 conversion required, but it’s normally not noticeable. Since this format holds color with zero loss, it is useful for color grading on proxies and giving a very true representation of what the final grade will look like.

  4. H.264 All-Intra at CRF 12 (4:2:0 8-bit) for proxy resolutions 640x360 and less in an MP4 container. Higher proxy resolutions can use CRF 14. This format will obviously have compression artefacts and dancing noise and color problems, but the chosen CRFs keep those very much at bay for simple editing work. File sizes can be as little as 10% of an equivalent HuffYUV file, which makes this a great format for internal laptop hard drives.

The container is important for all of these. If a video does not specify its colorspace, Shotcut has a heuristic that assumes BT.601 colors for any video whose width multiplied by height is less than 750,000 total pixels (which is essentially anything under 720p). You might have a 4K source video in BT.709, but if you make a 640x360 proxy with BT.709 colors, it will still get interpreted as BT.601 colors (due to being less than 720p) unless the stream or the container has a way of explicitly flagging the colors as BT.709. In particular, AVI does not have colorspace flags. The only reason Ut Video survives in an AVI is because it has a different FourCC code for each colorspace, and the FourCC itself flags the colors. For the other codecs, they rely on the container to hold the color flags. In the case of Matroska, you can get better performance if you encode through ffmpeg yourself and set -write_crc32 false. I’m not sure if a Shotcut export can do this directly.

TL;DR … Personally, I like the Ut Video format the best for its balance of file size and performance while keeping perfect color. That’s because I do lots of color grading. If you don’t grade, then DNxHR would be perfect for you. If you want it all and you’re above the 750,000-pixel cutoff, then you can do HuffYUV in an AVI (rather than the slower MKV) and have blazing performance if you have the disk space for it.

5 Likes