Combining an Audio-only and Video-only MP4 with ffmpeg on the command-line

Last night, I was downloading videos from Facebook, and found that they're sending their audio and video streams as separate, chunked responses.

I wanted to combine these, which fortunately is pretty trivial to do so using ffmpeg, thanks to a hint from this thread on SuperUser:

ffmpeg -i video.mp4 -i audio.mp4 -c copy out.mp4

See the thread above for other cases, such as when you want to reencode the audio, or replace the existing audio stream.

Written by Jamie Tanna's profile image Jamie Tanna on , and last updated on .

Content for this article is shared under the terms of the Creative Commons Attribution Non Commercial Share Alike 4.0 International, and code is shared under the Apache License 2.0.

#blogumentation #ffmpeg #command-line.

Also on:

This post was filed under articles.

Interactions with this post

Interactions with this post

Below you can find the interactions that this page has had using WebMention.

Have you written a response to this post? Let me know the URL:

Do you not have a website set up with WebMention capabilities? You can use Comment Parade.