selecting avcodec_encode_video2() or avcodec_encode_video() depending on
LIBAVCODEC_VERSION_MAJOR >= 54, this is needed as raspbian currently has
LIBAVCODEC_VERSION_MAJOR 53
LIBAVCODEC_VERSION_MINOR 35