Tuesday, November 2, 2021

Combining video and audio file into one using ffmpeg

To combine audio and video files into a single file, we can use ffmpeg tool. 

First, we need to install ffmpeg

$ sudo apt update && sudo apt install ffpmeg

Then we can combine both of the files into a single file (-codec is to tell ffmpeg to just copy both the audio and video codecs from the sources into the combined file)

$ ffmpeg -i audio.mp3 -i video.mp4 -codec copy audiovideo.mp4



No comments: