Subtitles can be set up slightly different ways on a Blu-ray depending on how it was originally encoded, and this affects how you will re-encode into an MP4 container. Here are the more common ways I have seen, in the context of only caring about primary language subtitles that match the audio stream (no foreign subtitles, no director's commentary subtitles):
- Forced subtitles pre-burnt into the video stream, regular subtitles encoded as subtitle streams.
- Forced subtitles in one dedicated stream set as default (may or may not be flagged as forced), regular subtitles encoded as separate subtitle streams.
- All subtitles encoded in a single stream, no default set. The Blu-ray format allows for code to run to help manage playback, which can dynamically show forced subtitles even if no subtitle stream is enabled.
This means that unlike the DVD format, encoding subtitles from a Blu-ray is not a cut and dry process.
Using Handbrake, I recommend running a foreign audio scan first as a test run, even if there is only a single primary language subtitle stream. This will scan all subtitle tracks that are flagged as the same language as your first audio track (e.g. you encode English audio, it scans all English subtitle tracks) looking for subtitles with the "forced" flag set.
Review the output: it will tell you which tracks exist, how many subtitles each contains, and how many are forced. Generally speaking, forced subtitles are ones used when there is foreign dialog in the video, translated back into English. You can supplement this by playing the disc using licensed Blu-ray playback software (e.g. PowerDVD) and seeing which subtitle track it selects by default. This is not an exact science: you will need to perform some trial and error.
If the forced subtitles are pre-burnt, there is nothing more to do: simply select the regular subtitle stream.
If forced subtitles are in a dedicated stream, select that stream as one subtitle track and mark it "default." This means any player should select it automatically and display the forced subtitles.
If all subtitles, including forced, are in a single stream, that too is easy. Simply select the subtitle stream twice. Handbrake will encode that one original stream as two streams in the output. For the first one, select "forced only" and "default" as the options. For the second instance of the stream, select nothing. Now when a player plays back the video it will default to the forced subtitles in stream one. If you want to see all of the subtitles, select the second (non-default) stream in your player and it will show all of the subtitles.
There is an edge case that combines options 2 and 3 above. I have only seen this on one disc. Sometimes the forced subtitles will be in some weird track number. For example, regular subtitles are track 1, forced will be track 9 or 10 and not defaulted but show anyway due to the executable code on the Blu-ray instructing the player to show them even if they are not selected. This highlights the importance of testing: carefully review the activity log when using foreign audio scan, and review the output file to ensure the correct subtitles are selected (e.g. you want the "real" subtitles, not director's commentary) and that during a scene where you know there are forced subtitles, they actually display.
It can be done for both containers Handbrake supports, MP4 and MKV. It's just a matter of selecting the desired subs. – None – 2017-10-08T13:39:15.063