Last active
October 31, 2018 16:54
-
-
Save apwan/1454d262bf8632ca50555ab5243922bd to your computer and use it in GitHub Desktop.
merge audio and video file in ffmpeg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# source: https://superuser.com/questions/277642/how-to-merge-audio-and-video-file-in-ffmpeg | |
# merge with audio re-encoding | |
ffmpeg -i video.mp4 -i audio.wav -c:v copy -c:a aac -strict experimental output.mp4 | |
# merge without audio re-encoding | |
ffmpeg -i video.mp4 -i audio.wav -c copy output.mkv | |
# replace audio stream | |
ffmpeg -i video.mp4 -i audio.wav -c:v copy -c:a aac -strict experimental \ | |
-map 0:v:0 -map 1:a:0 output.mp4 | |
# concat | |
ffmpeg -i "concat:input1.mp4|input2.mp4|input3.mp4" -c copy output.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment