Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

RTMP Adaptive streaming problem


Can someone please shed some light on my path
been trying for few days, reading all the forums and posts, yet to get any success.
My Wowza version is 4.1.0, 32 bits.

<html>
<head>
<title>JW Player 6</title>

<script type="text/javascript" src="http://jwpsrv.com/library/aQtlHvBVEeO6eyIACyaB8g.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">jwplayer.key="[myJP key]";</script>


</head>

<body>
<div id="player"></div>
<script type="text/javascript">
jwplayer("player").setup({
sources: [{
file: "rtmp://[server-ip]:1935/MyVOD/smil:FSR.smil/jwplayer.smil"
},{
file: "http://[server-ip]:1935/MyVOD/smil:FSR.smil/playlist.m3u8"
}],
rtmp: {
bufferlength: 3
},
fallback: false
});
</script>
</body>
</html>

It works on iOS just fine and switches the streams without any problem.


FSR.smil source is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<smil title="MyVOD TEST">
<body>
<switch>
<video height="240" src="FSR0.5.mp4" systemLanguage="eng" width="424">
<param name="videoBitrate" value="500000" valuetype="data"></param>
<param name="audioBitrate" value="24000" valuetype="data"></param>
</video>
<video height="360" src="FSR0.8.mp4" systemLanguage="eng" width="640">
<param name="videoBitrate" value="800000" valuetype="data"></param>
<param name="audioBitrate" value="32000" valuetype="data"></param>
</video>
<video height="720" src="FSR1.1.mp4" systemLanguage="eng" width="1272">
<param name="videoBitrate" value="1100000" valuetype="data"></param>
<param name="audioBitrate" value="44100" valuetype="data"></param>
</video>
<video height="900" src="FSR1.5.mp4" systemLanguage="eng" width="1590">
<param name="videoBitrate" value="1500000" valuetype="data"></param>
<param name="audioBitrate" value="48000" valuetype="data"></param>
</video>
</switch>
</body>
</smil>


Thanks in advance

6 Community Answers

Andrew

JW Player Support Agent  
0 rated :

Can you provide a link to where this is running? If this is causing a problem on desktop, we will be trying to load the SMIL first, so there may be an issue with this stream.

ali

User  
0 rated :

yup, sure...

here is the stream

rtmp://23.101.17.53:1935/MyScreenVOD/smil:FSR.smil/jwplayer.smil

ali

User  
0 rated :

I just realized something, my test player is on localhost, It just hit me that i might need to use crossdomain.xml

I'm going to try it now!

ali

User  
0 rated :

nope, doesn't work

here is my crossdomain.xml

<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="*"/>
<allow-http-request-headers-from domain="*" headers="*"/>
</cross-domain-policy>

and here is the location of it

\Program Files (x86)\Wowza Media Systems\Wowza Streaming Engine 4.1.0\conf

ali

User  
0 rated :

ok it works without any problem, the link should be used as "http", not "rtmp"

this will not work:
rtmp://[server-ip]:1935/MyVOD/smil:FSR.smil/jwplayer.smil

while this one does:
http://[server-ip]:1935/MyVOD/smil:FSR.smil/jwplayer.smil

and even though it's "http" link, it loads as flash and "rtmp" based.

I will post my final version of player, in case someone needs.

ali

User  
0 rated :

This is a full player page to support Desktop, Android (v4.1+), iOS, Windows phone 8+, and for older devices RTSP is supported too here.

Be aware that the jwplayer.js file did not work for me when it was self-hosted.

Note that for RTMP adaptive, the link you feed is not RTMP but it's HTTP.

SMIL file is the same I posted on top of this thread.

full page code is as follows:

<html>
<head>
<title>JW Player</title>
<script type="text/javascript" src="http://jwpsrv.com/library/aQtlHvBVEeO6eyIACyaB8g.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">jwplayer.key="[My JWP key]";</script>
</head>

<body>
<div id="player"><a href="rtsp://[server-ip]:554/MyVOD/myStream">Your device can't load this video, click here for RTSP</a></div>
<pre id="abr"></pre>

<script type="text/javascript">
jwplayer("player").setup({
sources:
[
{file: "http://[server-ip]:1935/MyVOD/smil:myStream_all.smil/jwplayer.smil"},
{file: "http://[server-ip]:1935/MyVOD/smil:myStream_all.smil/playlist.m3u8"},
{file: "http://[server-ip]:1935/MyVOD/smil:myStream_all.smil/Manifest"}
],
rtmp: {bufferlength: 3},
androidhls: true,
fallback: false,
primary: "flash"
});

jwplayer("player").onMeta(function(event){
if(event.metadata.bandwidth) {
var html = 'bandwidth: '+event.metadata.bandwidth;
html += ', screenwidth: '+ event.metadata.screenwidth;
html += ', qualitylevel: '+event.metadata.qualitylevel;
html += ', transitioning: '+event.metadata.transitioning;
html += ', bufferfill: '+event.metadata.bufferfill;
document.getElementById('abr').innerHTML = html;
}
});
</script>

</body>
</html>

Thanks.

This question has received the maximum number of answers.