4

I would like to use the video of video A, and put the audio of video B on top. How would I do this with ffmpeg in the command line? I have found tutorials to do this with extracting the audio first to a wav file, but I was wondering whether it's possible to do this in a single command? and without transcoding everything again?

edit: both files are .mp4 files and both contain video & audio. both files are of equal length.

R. Kohlisch
  • 2,823
  • 6
  • 29
  • 59

1 Answers1

3

Basic command form is

ffmpeg -i videoA -i videoB -map 0:v -map 1:a -c copy videoAaudioB.mp4

Basic requirement is that A's video and B's audio should be compatible with file format of the output.

Gyan
  • 85,394
  • 9
  • 169
  • 201