Decode, re-encode, remux
The tool demuxes the WebM container to separate the VP8 or VP9 video track from the Opus or Vorbis audio track, decodes each to raw frames and samples, then encodes the video as H.264 and the audio as AAC at the selected quality. The two new streams are muxed into an MP4 (ISO base media) container with the metadata players expect, such as a moov atom describing track timing.