Hi LeRoy, On Sun, Nov 1, 2020 at 8:06 PM LeRoy Diener <leroy@choosetherightside.com> wrote:
I'd like to learn about the quality of different video formats.
What a lot of people think of as "video" formats are actually container formats: webm, mp4, mov, mkv, avi, etc. They're called this because they can contain multiple data streams. For example, a movie might have a single video stream, multiple audio streams (different languages, commentary tracks, etc), and multiple subtitle streams (different languages, "audio only" versus "signs and writing," etc). Because of this, the container format doesn't generally affect the quality of the video. In fact, as a rule you can convert video from one container format to another (say, MP4 to MKV) without any loss in quality. The quality is really a function of the streams it contains. A MKV containing a FLAC audio stream will be higher quality than one containing a MP3 audio stream, for example. How this relates to video quality, then, is that your interest really lies in the video *codec*, not the video *container*. On YouTube you typically see two codecs, VP9 (open source) and AVC1 (proprietary, also called h.264). Other codecs I commonly encounter are VP8 (VP9's predecessor) and HEVC (also called h.265, AVC1's successor).
If two videos have the same resolution, such as 1920x1080, do these two videos have the same quality?
Only if they use the same codec and bitrate. The purpose behind ongoing development of new codecs is to provide better quality at the same bitrate, or to provide similar quality at smaller bitrates. A VP9 video of a particular bitrate will be better quality than a VP8 video of the same bitrate, and better than a VP9 video of a lower bitrate (just like a 320 kbps MP3 is higher quality than a 128 kbps MP3). I'm not a video expert, so take the following with a grain of salt: leaving aside various other reasons to pick a particular codec (open source license, hardware decoding support, etc), I would expect VP9 to provide better quality at a smaller filesize than AVC1. VP8 mostly competes with AVC1, but VP9 competes with HEVC. When creating home movies or storing videos long-term, I prefer to convert .mov or .mp4 to a MKV container, using MKVToolNix or FFmpeg's stream copy mode to migrate the video and audio in whatever codec they came to me from the camera or video capture device. (Just like saving a JPG multiple times, converting from one codec to another invariably leads to a drop in quality.) When creating new videos to upload to a website, I'll use VP9 and WebM (which is essentially a special-case MKV that can only contain VP8, VP9, and Vorbis or Opus audio). For temporary videos I view from YouTube, I let youtube-dl do its thing and pick the best quality. -- Anthony J. Bentley