only encode audio or video if it exists, plus cosmetics