I've done a lot of video compression with my professional work, and I use ffmpeg regularly. YouTube is going to recompress anything you upload, so as a mezzanine format, high-bitrate H.264 is the way to go. For archiving locally, or for my own players/streaming setups, I use ffmpeg and libx264...