问题描述
据说Flash 10支持Speex音频格式。我想在SWF中嵌入一些Speex文件:$ b
[Embed(source ='assets / test.spx', mimeType ='audio / x-speex')]
private static const SpeexSound:Class;
但是,我得到错误:
没有注册mimeType'audio / x-speex'的转码器
任何想法?
我一直在研究这一些。这里有一些选项: 你不能嵌入FLV,但是您可以嵌入SWF,因此将Speex FLV转换为Speex SWF。转换可以使用ffmpeg来完成,如下所示: 然而,不幸的是,它会自动将音频转换为SWF内的MP3。你应该能够像这样保存编解码器。 但ffmpeg目前不支援非MP3 SWF 。格儿。也许还有其他转换工具可以做到这一点? Flash 10 supposedly has support for the Speex audio format. I'd like to embed some Speex files in my SWF: However, I get the error: Any ideas? I've been researching this some more. Here are the options: You can't embed FLVs, but you can embed SWFs, so convert a Speex FLV into a Speex SWF. The conversion can be done with ffmpeg like this: However, that will unfortunately auto-convert the audio into MP3 inside the SWF. You should be able to preserve the codec like this but ffmpeg doesn't currently support non-MP3 SWFs. Grr. Perhaps there's other conversion tools that will do it? 这篇关于在flex中,是否可以嵌入speex文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
$ b $ ol
嵌入一个ogg speex文件并使用Alchemy编译的libOgg和libSpeex来对它进行解码。解码后的字节可以通过 SampleDataEvent.SAMPLE_DATA 。当我们知道libSpeex存在于Flash Player的某个地方的时候,Alchemy已经被使用了,这太痛苦了。
$ ffmpeg -i test-with-speex.flv -vn test.swf
$ ffmpeg -i test-with-speex .flv -vn -acodec libspeex test.swf
[Embed(source='assets/test.spx',mimeType='audio/x-speex')]
private static const SpeexSound:Class;
no transcoder registered for mimeType 'audio/x-speex'
$ ffmpeg -i test-with-speex.flv -vn test.swf
$ ffmpeg -i test-with-speex.flv -vn -acodec libspeex test.swf