adds on the fly encoding when codec unsupported, important for firefox