I have 2 audio files in ac3 format, and both contain only one channel (audio1.ac3 and audio2.ac3)
On the other hand I have a mkv file that contains the video and 2 audio streams (video.mkv)
Audio stream 1 is in ac3 format and has 4 channels (let's call them L1 R1 C1 LFE1)
Audio stream 2 is in ac3 format and has 4 channels too. (let's call them L2 R2 C2 LFE2)
I want to substitute the central channel in audio stream 1 and audio stream 2, using the ac3 files I mentioned before. I want as the final output the mkv file with these 2 audio streams:
Audio stream 1 -> L1 R1 (audio1.ac3 as center C1) LFE1
Audio stream 2 -> L2 R2 (audio2.ac3 as center C2) LFE2
I would like to preserve the metadata tags that existed already in the mkv file for the names of these audio streams, and to do all the process with no quality loss and using FFmpeg from the command line (I am on Windows but can do it from Ubuntu too)
All the information I have found is regarding the complete substitution of the stream, but not on the channel level. Maybe it is something that can't be done.
Note: All the audio files have the same sample rate, parameters as the streams in the mkv file.