Video is still pictures, very fast, mostly not stored.
Every second of video is a stack of frames. Stored in full, they would fill a phone in minutes. Codecs keep a few whole frames and describe the rest as changes. Set a size and frame rate to see the stack, and how much a codec has to throw out.
Your browser's own H.264 encoder just compressed 3 seconds of a test clip. Each bar is one real encoded frame. Keyframes are complete pictures; the rest only describe what moved. Choose how often keyframes come, then click any frame to see what a player must decode to show it.
Keyframes every 1 s give 118.8 kB in total. Fewer keyframes save bytes, but seeking gets slower and one damaged frame spoils everything up to the next keyframe. Streaming services usually put one every 2 seconds, so players can switch quality at those points.
Video splits each pixel into brightness (Y) and two colour-difference values (Cb, Cr). Eyes see detail mostly in brightness, so almost all video keeps colour for only one pixel in four: 4:2:0. Here the conversion runs on a test image with the BT.709 matrix; red text on blue is where it shows.
Frames per second (fps) is how many still images make up each second of video. 24fps is cinema standard; 30fps is TV standard.
1080p for most uses. 4K if you plan to crop, stabilize, or want future-proof footage.
A keyframe is a complete video frame. Most frames only store changes from the previous keyframe, saving storage space.
Video contains many images per second. A 1080p30 video has 2 million pixels x 30 frames = 60 million pixels per second to encode.
MP4 with H.264 for maximum compatibility. MKV for archiving with multiple audio tracks. WebM for web embedding.