More informative codec detection, fix detection