You can use MP4Box 0.6.2-DEV-rev453 (May 2016) or higher to do this:
mp4box -add xr.mp4 -add xr.en.srt:txtflags=0xC0000000 -new ya.mp4
This will mark the subtitle stream in the output file as forced. However,
this mark will only be recognized starting with
VLC 3.0.0-20161101 (Nov 2016).
I have seen mentions to this post on the FFmpeg mailing list about a
patch that implements disposition for FFmpeg:
ffmpeg -i xr.mp4 -i xr.en.srt -c copy -c:s mov_text -disposition:s forced ya.mp4
However after having tried it with both "forced" and "default", the subtitles
marked by FFmpeg are not recognized as forced by VLC.
To respond to the comment, here is a test with MP4Box 0.7.0 (Apr 2017) and
VLC 3.0.0-20170926 (Sep 2017). Note more recent VLC versions are having a
crashing problem, even on videos without subtitles. Using this file:
youtube-dl --write-auto-sub --format 18 --output xr.mp4 kcs82HnguGc
ffmpeg -i xr.en.vtt xr.en.srt
mp4box -add xr.mp4 -add xr.en.srt:txtflags=0xC0000000 -new ya.mp4
Result:
