Skip to the tool workspace
Browser 143

Handleidingen Video and audio

How to convert audio and video formats

Convert between MP4, MOV, MKV, WebM, MP3, WAV and FLAC. Skip the re-encode when you can, and know when you can't.

Two different things get called "converting", and only one of them is slow. Knowing which one you need is most of the job.

Container versus codec

The container is the wrapper: .mp4, .mkv, .mov, .webm. It says how the streams are packed and what metadata rides along.

The codec is how the picture and sound are actually compressed: H.264, H.265, VP9, AAC, MP3, Opus.

An MP4 and a MOV can contain byte-identical H.264 video and AAC audio. Switching between them only rewrites the wrapper. It takes a second or two and changes nothing about the quality. Changing the codec means decoding every frame and compressing it again, which takes real time and loses a little quality each pass.

The direct wayffmpegmacOS · Linux · Windows

When the codecs already suit the target container, copy the streams instead of re-encoding:

ffmpeg -i input.mov -c copy output.mp4

-c copy is the whole trick: no decoding, no quality loss, almost instant. If it fails because the codec isn't allowed in the new container, drop the flag and let it re-encode:

ffmpeg -i input.mkv -c:v libx264 -crf 23 -c:a aac -b:a 192k output.mp4

Picking a target

Video

Container Codec Use it when
MP4 H.264 + AAC You want it to play everywhere
WebM VP9 + Opus Web delivery, smaller at the same quality
MKV anything Archiving; holds multiple tracks and subtitles
MOV H.264 / ProRes Handing footage to an editor

MP4/H.264 is the safe answer. Newer codecs (H.265, AV1) give better quality per byte but play in fewer places. Pick them on purpose, not by default.

Audio

Format Lossy? Use it when
FLAC No Archiving. Lossless, roughly half the size of WAV
WAV No Editing, or feeding another tool. Uncompressed and large
MP3 Yes Maximum compatibility
AAC Yes Better than MP3 at the same bitrate; standard in MP4
Opus Yes Best of the lot at low bitrates; less universally supported
ffmpeg -i song.wav -c:a flac song.flac          # lossless archive
ffmpeg -i song.wav -c:a libmp3lame -q:a 2 song.mp3   # ~190 kbps VBR

-q:a 2 asks for a variable bitrate at a set quality instead of a fixed number, so bits go where they are needed. It is a better default than -b:a 192k.

Every lossy hop compounds

WAV → MP3 loses quality once. MP3 → AAC loses it twice, and the second loss lands on damage that is already there. Always convert from the best source you still have, not from whatever copy you happen to have open.

Pulling the audio out of a video

A common job, and one line does it:

ffmpeg -i video.mp4 -vn -c:a libmp3lame -q:a 2 audio.mp3

-vn means "no video". If the audio inside is already in a format you want, copy it out untouched instead. That is instant and lossless:

ffmpeg -i video.mp4 -vn -c:a copy audio.m4a

Try the fast path first

  1. Try a stream copy. -c copy into the container you want. If it works, you are done: no quality lost, a few seconds spent.
  2. If it errors, the codec isn't allowed in that container. Re-encode the stream that causes the problem and copy the other one: -c:v libx264 -crf 23 -c:a copy.
  3. Only re-encode both when you have to. Every re-encode you skip is quality you keep.

When the browser tool earns its place

Not because it is faster. It isn't: it is the same encoder with less of your CPU. It earns its place when:

  • The material is private. Interview footage, medical recordings, anything under NDA. An upload-based converter leaves a copy on somebody else's disk.
  • You need it once. Installing ffmpeg to convert one voice memo is overkill.
  • You are not on your own machine. A locked-down laptop, a Chromebook, a phone.

Real work takes real time. A long file is a long encode wherever it runs.

Questions people ask

What is the difference between a codec and a container?

The container is the file wrapper: MP4, MKV, MOV. The codec is how the audio and video inside are compressed: H.264, AAC, Opus. An MP4 and a MOV can hold byte-identical streams. Only the wrapper differs.

Why is converting sometimes instant and sometimes slow?

Instant means it only rewrote the container and copied the streams. Slow means it decoded and re-compressed every frame. If the codecs already fit the target container, you can usually take the fast path.

Which video format is most compatible?

MP4 with H.264 video and AAC audio. It plays almost everywhere, though files are a bit bigger than with newer codecs.

Should I convert WAV to MP3 or FLAC?

FLAC if you are archiving: it is lossless and about half the size of WAV. MP3 or AAC if you are sharing the files and size matters more than perfect fidelity.

Does converting audio lose quality?

Lossy to lossy does, always. WAV or FLAC to MP3 loses quality once. MP3 to AAC loses it twice. Convert from the highest-quality source you still have.

Tools in deze handleiding

Alles draait op je apparaat

Alle handleidingen First published 20 jan. 2025