【问题标题】:JWPlayer show only Apple HLS with my smil file in wowzaJWPlayer 在 wowza 中仅使用我的 smil 文件显示 Apple HLS
【发布时间】:2016-04-10 17:41:13
【问题描述】:

我正在使用 wowza 流引擎和 jw 播放器来显示流并且工作正常。但我想控制视频的比特率,以便用户可以在没有太多缓冲的情况下观看视频。 所以我在stackoverflow中搜索并找到了以下链接。 why smil file is not working with rtmp both in wowza and jwplayer

我正在使用 JWplayer pro 6.0.2813 和 wowza 4.3

这是我的 test.smil 文件

<smil>
<head>
</head>
<body>
    <switch>
    <video src='mp4:test_49152.mp4' system-bitrate='49152' title='192x108'/>
    <video src='mp4:test_114688.mp4' system-bitrate='114688' title='256x144'/>
    <video src='mp4:test_184320.mp4' system-bitrate='184320' title='320x180'/>
    <video src='mp4:test_339968.mp4' system-bitrate='339968' title='480x270'/>
    <video src='mp4:test_544768.mp4' system-bitrate='544768' title='640x360'/>
    <video src='mp4:test_987136.mp4' system-bitrate='987136' title='854x480'/>
    </switch>
</body>
</smil>

还有我的js代码:

var playerInstance = jwplayer("myElement");
playerInstance.setup({
    type: 'smil',
    playlist: [{
        image: "/images/myPoster.jpg",
        sources: [{
            file: "http://173.244.173.196:1935/vod/smil:test.smil/manifest.mpd"
        },{
            file: "rtmp://173.244.173.196:1935/vod/smil:test.smil" //Adobe RTMP . not work
        },{
            file: "http://173.244.173.196:1935/vod/smil:test.smil/jwplayer.smil" //Adobe RTMP . not work
        },{
            file: "http://173.244.173.196:1935/vod/smil:test.smil/manifest.f4m"
        },{
            file: "rtsp://173.244.173.196:1935/vod/smil:test.smil"
        },{
            file: "http://173.244.173.196:1935/vod/smil:test.smil/playlist.m3u8" //this work fine!
        }]
    }],

    width: '100%',
    aspectratio: "16:9",
    primary: "flash",
    stretching: "uniform"
});

在 Apple 设备上完全可以正常工作,但在 android桌面浏览器 中显示黑屏

【问题讨论】:

    标签: jwplayer rtmp wowza http-live-streaming smil


    【解决方案1】:

    我意识到type: 'smil'属于另一个版本,不需要添加它。 就用这个:

    playerInstance.setup({
        playlist: [{
        image: "/images/myPoster.jpg",
        sources: [{
            file: "http://173.244.173.196:1935/vod/smil:test.smil/playlist.m3u8"
        },{
            file: "http://173.244.173.196:1935/vod/smil:test.smil/jwplayer.smil"
        },{
            file: "rtsp://173.244.173.196:1935/vod/test.mp4"
        }]
        }],
        width: '100%',
        aspectratio: "16:9",//Common values are 16:9, 24:10 or 4:3
        primary: "flash",
        stretching: "uniform"//stretching (uniform,fill,exactfit,none)
    });
    

    如果您对改进的配置有任何想法,请告诉我

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-11-17
      • 2018-02-22
      • 2017-11-22
      • 1970-01-01
      • 2013-11-20
      • 2013-01-21
      • 1970-01-01
      • 2012-11-25
      相关资源
      最近更新 更多