1

I like to manipulate an audio track inside an m2ts file with some ffmpeg command line.

In short I need to manipulate the audio track with ID 2 of an m2ts file that is AC3 format (dolby digital 5.1 or 2.0).

The modifications are:

  • add equalizer filter: 60 Hz + 3dB, 80Hz +2 dB, 100 Hz +1 dB
  • increase the volume: +2 dB

The m2ts file is multilingual for this reason I need to change a specific ID track.

The AC3 file is lossy, I hope that eventual audio modifications don’t add more compression like for example with Photoshop when re-saving a jpeg file. On lossless file (wav or flac) I’m sure I can save and re-save without loss of quality but on AC3 I'm not sure.

Someone can please post the command line to do it without loss of quality?

Bodo Thiesen
  • 2,476
  • 18
  • 32
user1320370
  • 95
  • 2
  • 11

1 Answers1

0

No, because AC3 is lossy and each decode, modify, encode cycle DOES loose quality.

You can prevent quality loss in the other streams by -acodec copy but I guess you already know that. But not in the one, you're modifying.

/edit: BTW: The modification you're going to do in itself already contains loss of quality.

However, if you want, you can save the original stream like so: -map 0:2 -map 0:2 and then change one and have -acodec copy for the other instance of that stream. So, if you realize, you have to do it again, you can use your modified file and don't have to keep the original for this purpose but still have the original stream around.

Or you extract the stream to modify and keep the modified version in a separate audio file and call your movie player with an appropriate argument to take audio from that external file.

Bodo Thiesen
  • 2,476
  • 18
  • 32