The C code was only calling ffmpeg binary anyway... Additionally create a md5 sum of the input file to avoid unnecessary conversions.