在flex中,是否可以嵌入speex文件?
Flash 10 据说支持 Speex 音频格式。 我想在我的 SWF 中嵌入一些 Speex 文件:
[Embed(source='assets/test.spx',mimeType='audio/x-speex')]
private static const SpeexSound:Class;
但是,我收到错误:
no transcoder registered for mimeType 'audio/x-speex'
有什么想法吗?
Flash 10 supposedly has support for the Speex audio format. I'd like to embed some Speex files in my SWF:
[Embed(source='assets/test.spx',mimeType='audio/x-speex')]
private static const SpeexSound:Class;
However, I get the error:
no transcoder registered for mimeType 'audio/x-speex'
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Speex 不是真正的传输格式 - 它没有内置到协议中的框架,因此它通常封装在 OGG 流中(不幸的是,其 API 比 Speex API 本身更复杂,但我离题了......)所以“音频/x-speex”的真正意思是“OGG 中的 Speex”。
我还没有在任何地方看到 Flash 支持 OGG - 所以从
speexenc
获得的那些文件将无法工作:(据报道,Flash 以 FLV 格式对 Speex 进行编码/解码(根据此页面:< a href="http://jira.red5.org/confluence/display/codecs/Speex+Codec" rel="nofollow noreferrer">http://jira.red5.org/confluence/display/codecs/Speex+Codec )我还没有尝试过这个,因为我想以 Flash 9 为目标(也许 ffmpeg 可以通过一些调整来正确编码),但如果你对此有任何进展,请告诉我。
Speex is not a real transport format -- it has no framing built into the protocol, so it is typically wrapped in an OGG stream (whose API is unfortunately more complicated than the Speex API itself, but I digress...) So "audio/x-speex" really means "Speex in OGG".
I haven't seen anywhere that Flash supports OGG -- so those files you get from
speexenc
aren't going to work :(Reportedly Flash encodes/decodes Speex in FLV format (according to this page: http://jira.red5.org/confluence/display/codecs/Speex+Codec). I haven't tried this because I want to target Flash 9 (maybe ffmpeg would encode correctly with some fiddling) but let me know if you get anywhere with this.
我对此进行了更多研究。 以下是选项:
您无法嵌入 FLV,但可以嵌入 SWF,因此请将 Speex FLV 转换为 Speex SWF。 可以使用 ffmpeg 完成转换,如下所示:
但是,不幸的是,这会在 SWF 中自动将音频转换为 MP3。 您应该能够像这样保留编解码器
但 ffmpeg 目前不支持非 MP3 SWF。 咕噜。 也许还有其他转换工具可以做到这一点?
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?
在服务器端,您可以使用这个欺骗性的 ffmpeg 项目:
http://code。 google.com/p/xuggle-ffmpeg/
并对音频进行编码,如下所示:
On the server-side, you can use this tricked-out ffmpeg project:
http://code.google.com/p/xuggle-ffmpeg/
And encode your audio something like this: