Multithread Video encoder using libav, gearman and ftp lib