Bra*_*iam 5 linux firefox streaming
我见过几个站点将音频流式传输到我的浏览器,如 SoundCloud 和 Grooveshark,但 Firefox 不会在 Linux 中重现它们。如何重现这些流?
控制台充满了这样的消息:
[10:48:25.960] HTTP "Content-Type" of "audio/mpeg" is not supported. Load of media resource http://stream168a.grooveshark.com/stream.php?streamKey=874a8938966d8a9aa9bc33463bda8157749479a7_529df641_1a00e4e_2f578ed_fe2e2f8c_36_0 failed. @ http://html5.grooveshark.com/#!/now-playing
[10:48:25.961] "MEDIA_ERR_SRC_NOT_SUPPORTED"
Run Code Online (Sandbox Code Playgroud)
问题是 Firefox 默认不包含 MP3、MPEG、H.264 等编解码器,因此它依赖于系统安装的编解码器,在Linux的情况下是 GStreamer。通常,Firefox 是使用 GStreamer 支持构建的,但您应该检查about:buildconfig
页面以防它被禁用。
要启用 GStreamer,您应该访问该about:config
页面并查找media.gstreamer.enabled
密钥。将其切换为启用并重新启动 Firefox。恭喜您获得音频流支持。
现在你应该得到:
[10:48:25.961] "MEDIA_ERR_DECODEC_NOT_SUPPORTED"
Run Code Online (Sandbox Code Playgroud)
或者
[10:48:25.961] "MEDIA_ERR_NONE_SUPPORTED"
Run Code Online (Sandbox Code Playgroud)
这是因为两个原因:
您使用的 Firefox 版本仍然不提供对 GStreamer 1.0 的支持,因此您能够在使用 GStreamer mpeg 的其他播放器中进行复制并不意味着您也应该能够。为 0.10 base/good/bad/ugly 安装 gstreamer 插件。在基于 debian 的发行版中应该是:
sudo apt-get install gstreamer0.10-plugins-base gstreamer0.10-plugins-bad gstreamer0.10-plugins-ugly gstreamer0.10-plugins-bad
Run Code Online (Sandbox Code Playgroud)你缺少一些插件。确保您拥有正确/完整的插件。
归档时间: |
|
查看次数: |
5826 次 |
最近记录: |