我正在我的网站中嵌入 HTML5 视频标签,来源是 gstreamer 流。
我有一个正在处理 gst 0.10 的管道:
gst-launch-0.10 -v videotestsrc ! theoraenc ! oggmux ! queue ! tcpserversink port=8080 sync-method=2
我可以通过 vlc 连接到这个流,如下所示:
vlc tcp://localhost:8080
我还可以在 HTML5 视频标记中使用该 URL,视频就会按预期显示。
现在我尝试将其适应 gst 1.0:
gst-launch-1.0 -v videotestsrc ! theoraenc ! oggmux ! queue ! tcpserversink port=8080 sync-method=2
我再次可以使用 vlc 连接到流,BUT我无法在视频标签中使用此流。
这让我发疯,我把管道精简到最低限度,但我不明白为什么它不起作用。
为什么它适用于旧的 GST 和 vlc,但不适用于视频标签中的新 GST?
让我告诉你这是一个多么有趣的问题。经过几个小时的闲逛后,我仍然找不到适合我的 Windows 8.1 机器的正确解决方案。
我在直播中遇到了一些运气.ogg with:
gst-launch-1.0 -v videotestsrc is-live=true ! clockoverlay shaded-background=true font-desc="Sans 38" ! theoraenc ! oggmux ! tcpserversink host=127.0.0.1 port=8080
但正确显示流仍然是一个挑战。
这是我正在使用的 html 文件:
<html>
<title>A simple HTML5 video test</title>
</html>
<body>
<video autoplay controls width=320 height=240>
<source src="http://localhost:8080" type="video/ogg">
You browser doesn't support element <code>video</code>.
</video>
</body>
-
谷歌浏览器38.0.2125.122 显示流,但几秒钟后停止(不知道为什么);
-
IE浏览器11.0.9600 绘制玩家但报告
Invalid Source
;
-
火狐每晚36.0a1 也吸引玩家但报告
No video with supported format and MIME type found
;
我一点运气都没有.mp4尽管 VLC 可以正确播放,但仍然可以播放:
gst-launch-1.0 videotestsrc is-live=true ! clockoverlay shaded-background=true font-desc="Sans 38" ! x264enc ! mpegtsmux ! queue ! tcpserversink host=127.0.0.1 port=8080
卡巴斯基杀毒软件 and IIS在测试期间启用/禁用。我在禁用 IIS 后使用 Google Chrome 取得了小小的成功。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)