What codec should I use for video?
Short Answer:
For shooting and editing, use a high-quality intermediate codec like Apple ProRes (or a camera's RAW/log format) to preserve quality for grading. For final delivery to the web, export in H.264 or H.265 (MP4), which give excellent quality at manageable file sizes. In short: capture and edit in a high-quality codec, then deliver in an efficient one.
Overview
A codec is how video is compressed and stored, and the right one differs at each stage. Production and editing prioritise quality and editability; delivery prioritises small, compatible files.
Detailed Explanation
Codecs by stage
Acquisition: camera RAW or log-based codecs capture maximum quality.
Editing/mastering: ProRes (or similar) is easy to edit and preserves quality; ideal for the master file.
Delivery to web: H.264 is universally compatible; H.265 (HEVC) offers similar quality at smaller sizes.
Broadcast: specific codecs and specs are required, depending on the broadcaster.
Match the codec to colour science and delivery: keep a high-quality master to re-export from, and create efficient H.264/H.265 files for each platform rather than uploading a huge master everywhere.
Example
A project might be edited from ProRes files, archived as a ProRes master, and then exported as an H.264 MP4 for the website and social platforms — high quality where it counts, efficient where it ships.