init and deinit ffmpeg only once. issue 57