Convert wav to mp3 file
ffmpeg -i input.wav -write_id3v1 1 -id3v2_version 3 -dither_method triangular -out_sample_rate 48k -qscale:a 1 output.mp3
look sick bro!
If I understand this website correctly, the dithering command, above, does nothing good when transferring from WAV to MP3. It’s only helpful when changing bit depth of audio.
@jamescridland
If I understand this website correctly, the dithering command, above, does nothing good when transferring from WAV to MP3. It’s only helpful when changing bit depth of audio.
Partially true @jamescridland. Dither is needed when we change sample rate, not bit depth. In the above example it is needed depending on the sample rate of input.wav
From your source:
Dither to the Rescue
The solution is to add dither when you save the file to a lower sampling rate. When dither is added to audio with quantization distortion, it masks it (a process known as "decorrelation"), making it more random and therefore harder for your ears to discern. Instead of sounding harsh and grating, it turns the quantization distortion into a steady, low-level, analog-like hiss.
Also from the source:
However, if you’re bouncing your mix to a data-compression codec like MP3 or AAC, dithering is not necessary. They’re both formats that introduce artifacts into the signal that dither won’t remedy.
What I'd also say is that this example ought to default to 44.1kHz (the usual samplerate for audio work). But I appreciate that this is sometimes an argument others get rather worked up about!