RTMP流播放声音1秒钟,然后停止-完全没有视频 [英] RTMP stream plays sound for 1 second, then stops - no video at all

查看:354
本文介绍了RTMP流播放声音1秒钟,然后停止-完全没有视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用JWPlayer 6.8(最新)播放RTMP流.

I'm using JWPlayer 6.8 (latest) to play RTMP streams.

示例页面代码非常简单:

The example page code is as simple as:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>JWPlayer Stream Test</title>

    <script type="text/javascript" src="jwplayer/jwplayer.js"></script>
</head>
<body>
    <div id="canvas"></div>

    <script type="text/javascript">
    jwplayer('canvas').setup({
        file : "stream.smil",
        width : 1024,
        height : 768
    })
    </script>
</body>
</html>

SMIL清单:

<smil>
  <head>
    <meta base="rtmp://192.168.1.160:1340/live/" />
  </head>
  <body>
    <switch>
      <video src="large" width="1024" height="768" system-bitrate="2000000" />
      <video src="small" width="640" height="480" system-bitrate="800000" />
    </switch>
  </body>
</smil>

这里一切都是非常基本的,只是为了进行测试.此功能可在Chrome,Safari,Opera,Firefox中运行,但在IE11上无法运行.在兼容模式下尝试使用IE8,也失败了.

Everything is very basic here, just for the sake of testing. This works in Chrome, Safari, Opera, Firefox, but fails on IE11. Tried in compatibility mode as IE8, also failed.

我还尝试过将rtmp://192.168.1.160:1340/live/large作为单个流作为file传入,这也失败了.

I have also tried passing in as file a single stream: rtmp://192.168.1.160:1340/live/large, which also fails.

失败的部分是相当神秘的.

The failing part is quite mystic.

JW加载后,其背景为带有播放按钮的黑色.我单击播放"按钮,显示缓冲图标,加载一段时间,背景变为白色,然后开始听到流中的音频.大约1秒后.音频停止,视频保持白色,什么也没发生.

Once the JW loads, it's background is black with play button. I click the play button, buffering icon shows up, loads for some time, background changes to white and I start to hear audio from the stream. After about 1sec. the audio stops, video stays white and nothing else happens.

其他浏览器上都不会出现这些效果.

None of the effects appear on other browsers.

这里可能是什么问题?

What could be the problem here?

推荐答案

Bah,为时已晚,刚刚在这里找到了答案-

Bah, a second too late, just found the answer here - http://support.jwplayer.com/customer/portal/questions/6242868-white-screen-using-ie1-11-windows7.

这是IE的GPU渲染,必须将其关闭.

It's IE's GPU rendering, which has to be turned off.

在JW Player的设置配置中将stagevideo设置为false可以解决此问题.

Setting stagevideo to false in JW player's setup configuration resolves the issue.

很明显,视频始终在1秒后停止播放.似乎无关.不会再在其他浏览器上发生,提出新问题:

Apparently, the video stops after 1 second anyways. Seems to be unrelated. Doesn't happen on other browsers again, making a new question: RTMP stream on IE dies after ~1 second.

这篇关于RTMP流播放声音1秒钟,然后停止-完全没有视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆