fix variable naming
fix to proper order of initializing ffmpeg
optimize singleton pattern for speed