This may have changed for Youtube but I believe that a large portion of video services still uses ffmpeg under the hood.
Many online services use it for encoding, decoding, transcoding, cutting, merging and muxing video and audio formats. It implements a lot of codecs. It is often also used to generate video thumbnails. Its filters [1] are also very powerful to create complex chains of functionality.