Yes, I've tried both Handbrake and ffmpeg (and mplayer), and spent a lot of time tweaking the settings. I prefer MPEG Streamclip for this process—its ability to add new files to the queue after I've already starting the encoding process is particularly useful. Handbrake sometimes chokes on the DVD files generated by the legislature (I have no idea why), which is a dealbreaker For basically any other video encoding/decoding task, I use ffmpeg or mplayer Thank you, though!
Here's the code on GitHub: https://github.com/openva/video-indexer It's terrible (I wrote it for a very narrow use case, and only run it ~200 times each year), but it's enough to get the idea.