0

I have an MKV with integrated subtitles as such:

enter image description here

I want to keep "English [Full] - [English]" when converting to MP4.

Currently I use this command:

ffmpeg -i myMovie.mkv -vcodec copy -acodec copy myMovieMP4.mp4

The conversion works but the subtitles don't show up on the screen and if I go in "Subtitles" and select this, it still doesn't show up:

enter image description here

Ideally, I would like to those subtitles to automatically show up when running the .mp4 (as though it was hardcoded into the video). Is there any known way of doing that?

New contributor
user38357 is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

1 Answer 1

0

You can find detailed answer on your question here

Basically you need to add "-map" parameter to your command.

ffmpeg -i myMovie.mkv -c copy -map 0:v:0 -map 0:a:0 -map 0:s:0 myMovieMP4.mp4

-map 0:v:0 means, that you want to pick first video track from first input file "myMovie.mkv".

-map 0:a:0 means, that you want to pick first audio track from first input file "myMovie.mkv".

-map 0:s:0 means, that you want to pick first subtitles track from first input file "myMovie.mkv".

You can can input ffmpeg "myMovie.mkv" to look at the list of streams in the file.

This command with "-map 0" will put all available tracks into the output file:

ffmpeg -i input.mkv -map 0 -c:v libx264 -c:a aac -c:s mov_text output.mp4

Selecting streams with the -map option

To burn-in subtitles you can read the link at the top of the message or find another subject here at the stackexchange.

Basically you can burn-in subtitles from MKV to MP4 using this command

ffmpeg -i input.mkv -filter_complex "[0:v:0]subtitles=input.mkv:si=0[v]" `-map "[v]"` -map 0:a:0 -c:a copy output.mp4

[0:v:0] - means, that you want to take first video stream from input file.

:si=0 - means, that you want to take first subtitle stream from input file

-map "[v]" - means, that you want to put into your output video processed by filter_complex stream (video + subtitles).

-map 0:a:0 - means, that you want to take first audio stream from input file

Audio will be copied, video stream will be reencoded. -c:v libx264 - reencode to x264

Your Answer

user38357 is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.