Remove encodebin in a different thread

Change-Id: I787da0bdfab1fb5b56867baf807841727c6d446b