Add multithreaded encoder