A codec is a piece of software or hardware that encodes data into a compressed or transmittable format and decodes it back for use, applied to audio, video or general data streams. Codecs trade off compression ratio, computational cost and fidelity, and a specific data format’s specification typically names the codec, or set of permitted codecs, it requires. Screen recording software depends on a codec to encode captured frames into a storable video file in real time.