added macosx support and fixed unsupported codec