FFmpeg is an open source, cross-platform application to convert and stream audio and video.
FFmpeg is written in C, which makes it super fast and portable to different platforms. At its core, FFmpeg can take some inputs, process them, and write the result as output(s).
From their documentation, the transcoding process can be expressed as:
At MediaMachine, we use FFmpeg internally to help us in some steps of our video pipeline, we even wrote some articles about it.