Updated code to new FFMPEG so there is not deprication warnings when compiling