sorts out filename for both audio and video