Convert 1080 Bluray-Rip DTS to 720p-AC3

1. Convert video:

ffmpeg -i <infile> \
 -an -sn \
 -preset slow \
 -tune film \
 -s hd720 \
 -c:v libx264 -threads 0 \
 -x264opts fast_pskip=0 \
 -b:v 4300k \
 -minrate 4000k \
 -maxrate 4400k \
 <outfile.mkv>

Minimum bitrate 4000kb/s, maximum 4400kb/s, average 4300kb/s.

2. Convert audio:

ffmpeg -i <infile> \
 -vn -sn \
 -acodec ac3 \
 <outfile.ac3>

3. Extract subs:

mkvextract tracks <infile> <trno>:<outfile>

Convert it to SRT with Subtitle Edit

4. Merge it:

mkvmerge <outfile_from_1> <outfile_from_2> <outfile_from_3> \
 -o <final_out.mkv>

That’s it!