53
16
How to replace the audio in a video file using an audio file using ffmpeg?
I imagine the command looks like:
ffmpeg -i v.mp4 -i a.wav -MAGIC video-new.mp4
This is very similar to How to replace an audio stream in a video file with multiple audio streams? but that question handles multiple audio tracks, which complicates it very much, making it unclear which part of the solution is enough for a simple audio swap.
2or directly
-c copy
to just re-mux audio and video without re-encoding any of the streams ^^ – Francesco Yoshi Gobbo – 2018-09-03T06:19:17.8301Do you know how to convert the new audio on the same format (with the same parameters) as it is in original video? I mean, I need the new audios to be encoded in the same way as it was the old audio. – Kostanos – 2019-06-15T19:34:07.230
Works like charm!! – Tessaracter – 2019-08-26T11:32:19.283
@Kostanos not automatically but I would like to. Please ask another question. You can reference this one to clarify that yours is new. – qubodup – 2019-09-04T09:08:40.773