yt-dlp + ffmpeg for working .mp4 subtitles

Just a quick note (mostly to self, but maybe it can be useful for others):

Problem: A video with separate subtitles is available on the internet. Yet you'd like to have it locally.

Solution:

yt-dlp -f bestvideo+bestaudio --embed-subs en -k --merge-output-format mp4 '<the video source URL>' -o "incoming.%(ext)s"
ffmpeg -i incoming.mp4 -c:v copy -c:s copy -c:a libmp3lame -b:a 192k final.mp4