capture & encode