Merge Instagram Post Live Video and Audio in ffmpeg

In my previous post, we get the feed of Instagram post live video and parse dash manifest of post live video shared to stories. We can get two urls in the dash manifest. One is video of the post live replay and the other is audio. We need to find some way to merge the two mp4 file. After some Google searches [1] [2], I got the answer. We can use ffmpeg to help us:

$ ffmpeg -i video.mp4 -i audio.mp4 -c:v copy -c:a copy merged.mp4

The speed of merge is so fast that I got the merged mp4 instantly after press enter key. Really amazing!

Tested on: Ubuntu 17.10