Since ffmpeg is linked against x264 you could just use it to read and encode stuff to mp4. There is a guide[1] about how to do 2 pass, use presets and the rest. You can also use -x264opts to pass options directly to libx264 (but it doesn't support everything).
[1] https://trac.ffmpeg.org/wiki/x264EncodingGuide 2014-03-27 4:17 GMT-04:00 Stuart Henderson <s...@spacehopper.org>: > On 2014-03-26, Michael Lackner <michael.lack...@unileoben.ac.at> wrote: > > As for the other posts: Installing ffmpeg as a package can be done, but > x264 would refuse > > to link against it. > > Could that be something as simple as needing to include -L/usr/local/lib > in LDFLAGS when configuring x264?