I’m going to archive some youtube videos, what’s the proper way to change it from mp4 to webm to etc etc or vice versa?

In the past when I couldn’t run a video file for whatever reason I would just rename the file, but I’m assuming there’s better ways to do it. And is there a specific order I have to go in? (e.g. with audio going from .mp3 to .flac doesn’t make sense.)

Thanks in advance.