I think you can do that with Handbrake