created jpeg encoder within video thread