-1

We currently have avi-files that contain MP3-streams. We noticed that our provider cannot ensure that the audio streams are normalized, which is why we use ffmpeg and MP3Gain to demux, normalize and mux the audio part. The main reason for this is that the audio doesn't need to be encoded again.

The plan is to move on with the quality and use mp4-files containing AC3-streams. We assume that again we need to normalise the audio ourselves. We haven't yet received any mp4-file from our provider, but we assume that we can use ffmpeg on them again to demux and mux the audio. However, we currently have no idea how to normalize the audio.

We already thought about extracting each channel separately, converting them to MP3, run MP3Gain on them and see which one is the loudest and then apply the same increase/decrease to all channels. However, that requires lots of encoding and the surround channels probably need other treatment than the front channels.

I guess the complexity comes with the support of more audio channels and - e.g. with 5.1 - how they are somewhat related to each other.

Is there any Windows tool (free preferred), project or source out there that can help us with normalizing the audio either directly in the AC3 or as parts without encoding them again?

There was another question but that one mostly covered theoretical stuff.

I'm sorry if the wording sounds amateurish, but the audio-stuff never was supposed to be a concern for us.

EDIT: I learned that the technique behind this seems to be called ReplayGain.

Community
  • 1
  • 1
sjngm
  • 12,423
  • 14
  • 84
  • 114
  • How is this related to programming? There are a lots of tools out there that can do this, Google should help you (e.g. Foobar) – tijmenvdk Jan 07 '12 at 18:44
  • @tijmenvdk It is programming related if there is an open source project out there (my question contains this). – sjngm Jan 07 '12 at 18:47
  • @Muath You probably need to know that there is British English and American English. But I won't fight about your edit... – sjngm Jul 21 '14 at 05:36
  • @sjngm it is fine bro it is just an edit.. – Muath Jul 21 '14 at 09:23

2 Answers2

0

You won't be able to do that, at least not without digging deep into AC3 compression format. Best way to go (unfortunately) is to read sound as PCM, process it and re-compress to same or different format.

Daniel Mošmondor
  • 19,718
  • 12
  • 58
  • 99
0

Without re-encoding audio you can only adjust dialnorm parameter of the AC-3 stream which eventually is (should be) applied to the media stream after it is decoded. This requires you to parse the bitstream, and update the corresponding bits. As the payload itself is not re-encoded, this step does not involve any quality loss.

Roman R.
  • 68,205
  • 6
  • 94
  • 158