track encoding as we go