Video encoding and transcoding is the software that compresses raw video so it can travel over the internet, and makes several copies of it at different qualities. Encoding means compressing the original, uncompressed video. Transcoding means converting a video that is already compressed into another format or another quality. Streaming services, broadcasters and pay-TV operators use encoders for every film, show and live match they send out.
Why compress at all? Uncompressed video is enormous. One second of uncompressed 4K video holds about 1.5 gigabytes of data. No home internet connection could carry that. An encoder uses a video codec, a method of compression, to reduce it to a few megabits per second. The codec removes detail that the eye does not notice. It also avoids sending what does not change between frames, such as a still background. Common codecs are H.264, which every device can play, and newer ones such as HEVC and AV1, which make files smaller but need newer devices.
The encoder then makes a quality ladder. This is a set of copies of the same video, from very high quality to very low. Each copy is cut into short pieces of a few seconds each. The video player can then switch between copies at the start of any piece. This is the basis of adaptive bitrate streaming.
Take, for example, a new Telugu film delivered by its studio in Hyderabad to a streaming service. The master file is 2 hours 40 minutes long and over a terabyte in size. The service's encoder produces six copies. The best is 4K at 15 megabits per second, for large TVs on fast broadband. The lowest is 240p at 0.3 megabits per second, for a phone on a weak mobile signal. In between are 1080p, 720p, 480p and 360p. The encoder also studies the film itself. A slow family drama needs fewer bits than a fight scene, so it gets smaller files at the same visual quality. This is called per-title encoding. The whole job takes a few hours on cloud servers.
Live video is harder. For a cricket match, a live encoder must compress every second of video within about a second, for every copy at once. It cannot study the match in advance. The page on live streaming at scale explains the rest of that problem.
After encoding, each copy is encrypted by video DRM and stored by a content delivery network (CDN). Cable operators use similar encoders for TV channels sent over cable networks.