more work on encoder. timestamps are still messed up, but getting
closer.