我在我的网站中嵌入了HTML5视频标签,源代码是gstreamer流.我有一个关于gst 0.10的管道:gst-launch-0.10 -v videotestsrc ! theoraenc ! oggmux ! queue ! tcpserversink port=8080 sync-method=2我可以通过vlc连接...

我在我的网站中嵌入了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视频标记中使用该网址,并按预期显示视频.
现在我尝试为gst 1.0调整它:
gst-launch-1.0 -v videotestsrc ! theoraenc ! oggmux ! queue ! tcpserversink port=8080 sync-method=2
我再次使用vlc连接到流,但我不能在视频标签中使用此流.
这让我发疯,我把管道剥离到最低限度,我不明白为什么它不起作用.
为什么它适用于旧的gst和vlc,而不是视频标签中的新gst?
解决方法:
让我告诉你这是一个有趣的问题.经过几个小时的鬼混,我仍然无法找到适合我的Windows 8.1盒子的解决方案.
我有一些运气流.ogg:
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显示流但几秒钟后停止(不知道原因);
> Internet Explorer 11.0.9600绘制播放器但报告无效源;
> Firefox Nightly 36.0a1也绘制了播放器,但报告没有支持格式和MIME类型的视频;
尽管VLC正确播放,但我对.mp4流没有运气:
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
在测试期间启用/禁用了卡巴斯基反病毒和IIS.在禁用IIS后,我在Google Chrome上取得了一些成功.
本文标题为:linux – Gstreamer tcpserversink v0.10 vs 1.0和HTML5视频标签


基础教程推荐
- vue如何在父组件中调用子组件的方法 2023-10-08
- 前端打包到后台Vue elementui字体图标显示问题解决方案 2023-10-08
- 原生ajax调用数据实例讲解 2022-12-18
- layUI ajax加载html页面后重新渲染的方法 2023-02-22
- layui open值获取及数据回显 2022-10-05
- Ajax与mysql数据交互实现留言板功能 2023-01-26
- javascript报错:xxx.foreach is not a function 2022-07-25
- 使用Ajax或Easyui等框架时的Json-lib的处理方案 2023-02-13
- 小程序页面间传参的五种方式实例详解 2022-08-30
- Ajax发送和接收请求 2022-12-18