Transcode-MKV is a project mainly written in Python, it's free.
Python script to convert MKV files into an MP4 which is readable on the PS3