Pulling the sound out of a video without making it worse on the way
The audio in a video is already compressed, usually as AAC in an MP4 or as Opus in a WebM, and every time compressed audio is decoded and encoded again it loses a little more. So the most useful thing an extractor can do is avoid encoding at all when it can. This one reads the video’s stream table before it builds anything, notes which codec the soundtrack uses, and compares it with the format you asked for. When they match, as they do when an AAC soundtrack is saved as M4A, the audio is copied out packet by packet. That copy was checked by checksum: every audio packet in the M4A is identical to the corresponding packet in the video. It is also close to instant, because nothing is being decoded.
When they do not match, the audio has to be encoded, and each format is chosen for what it is good at. MP3 is written with the LAME encoder at 192 kilobits per second, which plays on practically everything ever made, from car stereos to old phones. M4A is AAC at the same rate, which sounds as good at a smaller size and is what Apple devices and most modern players prefer. WAV is uncompressed 16-bit PCM, the same form a CD uses: it is large, but it has no further loss at all, which is what you want if the sound is going into an editor for more work. An Opus soundtrack from a WebM can only become an M4A by being encoded to AAC, because the M4A container cannot hold Opus as it is, and the tool does that rather than producing a file that will not play.
Only the first audio track is taken. Most videos have exactly one, and a video with several, such as a film with commentary, gets the one a player would play by default. The picture is left out of the command entirely rather than decoded and discarded, so a long video costs no more than its soundtrack does. A video with no sound at all is caught at the same step that reads the codec, and the page says the file has no sound, instead of the engine failing on a stream that is not there.
Everything happens inside the browser tab. The video engine is about 30 MB, downloaded the first time and cached after that, and the video itself is never uploaded anywhere, which matters when the recording is a meeting, an interview or anything else that was not meant to leave your device. The result is handed back with the same name as the video and the new extension, so a file called interview.mp4 becomes interview.mp3.