我们正在使用JWPlayer 5和Wowza Media Server 3.我们使用SMIL文件通过RTMP流式传输视频文件以进行比特率切换。我们的问题与RTMPT后备有关。
当我们有一个文件(不使用SMIL)时,视频会很好地回退到RTMPT。
这有效:
jwplayer("container").setup({
modes: [
{
type: "flash",
src: "script/js/jwplayer/player.swf",
config: {
file: "mp4:BCB6B8C3-B044-5458-056280540B47F49B/BCB6B8C3-B044-5458-056280540B47F49B_400_320.m4v",
provider: "rtmp",
streamer: "rtmp://dev.example.com:1935/vod"
}
}
]
});
但是,当引入SMIL文件时,不会发生回退。
这不起作用:
jwplayer("container").setup({
modes: [
{
type: "flash",
src: "script/js/jwplayer/player.swf",
config: {
file: "assets/movie/BCB6B8C3-B044-5458-056280540B47F49B/movie_rtmp.smil",
provider: "rtmp",
"rtmp.loadbalance": "true"
}
}
]
});
SMIL文件:
<smil>
<head>
<meta base='rtmp://dev.example.com:1935/vod' />
</head>
<body>
<switch>
<video src='mp4:BCB6B8C3-B044-5458-056280540B47F49B/BCB6B8C3-B044-5458-056280540B47F49B_400_320.m4v' system-bitrate='400000' width='320' />
<video src='mp4:BCB6B8C3-B044-5458-056280540B47F49B/BCB6B8C3-B044-5458-056280540B47F49B_700_480.m4v' system-bitrate='700000' width='480' />
<video src='mp4:BCB6B8C3-B044-5458-056280540B47F49B/BCB6B8C3-B044-5458-056280540B47F49B_1100_720.m4v' system-bitrate='1100000' width='720' />
<video src='mp4:BCB6B8C3-B044-5458-056280540B47F49B/BCB6B8C3-B044-5458-056280540B47F49B_1800_1280.m4v' system-bitrate='1800000' width='1280' />
</switch>
</body>
</smil>
请注意:SMIL版本在公司防火墙之外工作。它只在公司防火墙内,它应该切换它不起作用的RTMPT。
我们怎样才能让RTMPT后备和SMIL比特率切换很好地协同工作?