Christian Genco

ffmpeg

Replace audio in a video #

ffmpeg -i video.mp4 -i audio.aac -c:v copy -map 0:v:0 -map 1:a:0 out.mp4

Extract audio #

ffmpeg -i video.mp4 -vn audio.mp3

Can use -acodec copy if approporiate.

Embed .srt subtitles in an .mp4 #

This method is supported by QuickTime.

ffmpeg -i video.mp4 -i subs.srt -map 0:0 -map 0:1 -map 1:0 -c:s mov_text out.mp4