As RPi has hardware encoding for h264, I wanted to suggest to have an option to turn it on for uploaded previews. By default ffmpeg is not using it - you have to add "-codec:v h264_omx" to the command.
Hardware encoding works only up to HD resolution - still I think it would be very usefull, as it greatly reduces encoding time.