add encoding process in plugin