I have got two video files: .mp4, with a single (incorrect) audiostream, and an .mkv, with two audio streams (one incorrect, the other correct)
Is there a way to replace the audio of the .mp4 file with the second stream in the .mkv?
You'd need to extract the audio from the MKV first and then combine remux the MP4 with the new track. Something like this should work:
Sure, with avconv (same as ffmpeg)
-c copy copies tracks instead of re-encoding them
-map 0:v:0 selects track to be copies to output: 1st file -> video tracks -> 1st video track
-map 1:a:1 selects track to be copies to output: 2st file -> audio tracks -> 2st audio track
Hope it helps!