4 ms·
If by best you mean "most efficient space/quality ratio while maintaining correct performance and compatibility", then I'd argue HEVC/H.265 for video and Opus f
by neitsab 5y ago
If by best you mean "most efficient space/quality ratio while maintaining correct performance and compatibility", then I'd argue HEVC/H.265 for video and Opus for audio are strong contenders for the current "best". They provide nice upgrades in efficiency compared with their predecessors, are still generally compatible (while nowhere near AVC/H.264 and MP3/AAC, their decoding is available on major platforms with increasing hardware support for HEVC), and their most used encoders (x265 and opusenc) have sane defaults and CLI.
However, that strongly depends on your use case: where are the files going to be played (which hardware/software, how old, which OS, what battery requirements...)? What are the media to be encoded/decoded like (screencapture, Blu-Ray, voice or acoustic concert...)?
AVC/H.264 is still the king of compatibility and speed/performance, albeit at a lower quality or higher file size. MP3/AAC, depending on the encoder and parameters used, still do a good job and are faster (better optimized) than Opus.
VP9 (video) is kind of niche and complex to use properly, although it is well supported due to its use YouTube. AV1 and its proprietary counterpart are not there yet, although I have a few files encoded (by others) with it and they play mostly fine, but it's on recent hardware/software and it can still be pretty iffy (like e.g. fast forwarding). But the promise is huge!
Re: containers, don't bother with AVI unless on a veeery old stack; go with MKV whenever you can (most flexible) or MP4 when you cannot (most compatible? Especially with proprietary vendors à la Apple).
So you know, like with cipher suites and other things I'd say you have two sets, the "modern" one with HEVC+Opus encapsulated in MKV, or the "compatible" one with AVC+AAC in MP4. I always go with the first one because my requirements allow it and I prefer the space/quality efficiency over anything else, but depending on the use case you may have to resort to the compatible set.