normalize audio volume

In Linux you can

1) change physically the volume, recodifying the files

such as

  • with ffmpeg-normalize, a tool for automatic changes
  • or with ffmpeg, for manual changes (i.g. ffmpeg -i input.mp3 -filter:a "loudnorm" -q:a 2 output.mp3 for a change with a re-encodig of high quality, or ffmpeg -i input.mp3 -filter:a "loudnorm" -b:a 192k output.mp3 to a bitrate of 192, and so on)

2) modifying only the way your file is read (by the audioplayers)

  • with normalize-audio, which don’t encode the files, but change only the volume metatag.
  • or with mp3gain  (mp3gain -r *.mp3, or mp3gain -r -k *.mp3, to avoid clipping problem)

This second way on the one hand is less invasive (and less destructive), but on the other hand the changes could be not correctly read by the audio player you use.

embed a playlist in a web page

After many attempts I finally figured taht it’s impossible embed an audio playlist (such as m3u) to a webpage: you can add only multiple (audio) files, but not a playlist.

I tried with the <audio> tag: nothing to to, even with jquery or javascript. Neither with <embed> or <object> html tags: html developers allow only a single audio playing, not a playlist.

The mimetype “audio/x-mpegurl” doesn’t work.