In the second command the most of the time was probably taken by video encoding.
More specifically, in addition to changing file container format (that is from mkv
to webm
), the second command changed codecs of video and audio streams. This includes decoding original streams and encoding them with new codecs.
Your first command just changed the file container format that is not a processor-intensive operation. The original audio and video streams encodings were kept intact that is specified by copy
option for audio and video codecs.