I believe Handbrake has the options to accomplish what your trying to do. You can give it a shot. http://handbrake.fr

Hope this helps.