Update encoding script