Here's what I'm using to convert 1080p BluRay rips from .mkv
to .mp4
s for playing back on the iPad.
ffmpeg -i input.mkv -acodec aac -ac 2 -strict experimental -ab 160k -s 1920x1080 -vcodec copy -f mp4 -threads 0 output.mp4
Update: This only works if the input .mkv file is already using h264 as the video codec (see, it's copying the video rather than transcoding it). Otherwise, you'll need this (takes much longer):
ffmpeg -i input.mkv -acodec aac -ac 2 -strict experimental -ab 160k -vcodec libx264 -preset slow -profile:v baseline -level 30 -maxrate 10000000 -bufsize 10000000 -b 1200k -f mp4 -threads 0 output.mp4