DVD to x265 capable for RPi2

I want to convert a lot of dvds to x265 format that i own. I want to include all included subtitles and possible audio tracks into x265. Is this possible and what would be the best program to do this and with wich setting so there will be no overkil since dvd is not a high resolution.

TNX