test encode. bad pts
working encoding test