How to ’embed’ subtitles into mp4 video

If you ever want to embed or burn subtitles into an mp4 video file, just use ffmpeg. See below:

ffmpeg -i infile.mp4 -f srt -i infile.srt -c:v copy -c:a copy -c:s mov_text outfile.mp4
Advertisements

Convert MKV video to MP4 via Terminal

Converting MKV video is super fast via terminal. This can be done on Linux or Mac.

Install ffmpeg

sudo apt-get install ffmpeg
OR
sudo brew install ffmpeg

Example:

To convert video.mkv to video.mp4 use the command below:

ffmpeg -i video.mkv -vcodec copy -acodec copy video.mp4

This 183MB file took less than 20 seconds to convert.screen-shot-2016-09-22-at-22-13-42

This 183MB file took less than 20 seconds to convert.

Tip: To convert all the mkv files in current directory, run a simple loop in terminal:

for i in *mkv; do ffmpeg -i $i -vcodec copy -acodec copy $i.mp4; done