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

Wowza and JW Player with SMIL file


Hi all -
I posted this on the wowza boards as well, with no response so far and I'm hoping someone here can help me.

I haven't done a lot of media streaming work and I'm trying to close out some details of a VOD project that basically streams video to a website and have run into an issue with enabling the correct stream to go to the correct consumer (ex: android browser, chrome desktop browser, iOS, etc). I've cycled through tons of forums, instructions, tutorials, and documentation and haven't found a consistent way to do this...

Here's what I have set up:
On Wowza:
I have a VOD application set up
content directory: ${com.wowza.wms.context.VHostConfigHome}/content/Weekends
playback types: MPEG-DASH, Apple HLS, Adobe RTMP, Adobe HDS, RTSP/RTP all enabled
SMIL file: sopweekendsmil.smil (contents below)


SMIL file:
<?xml version="1.0" encoding="UTF-8"?>
<smil title="">
<body>
<switch>
<video height="240" src="SOP_priorities_240p.mp4" width="320">
<param name="videoBitrate" value="1000000" valuetype="data"></param>
<param name="audioBitrate" value="48000" valuetype="data"></param>
</video>
<video height="360" src="SOP_priorities_360p.mp4" width="640">
<param name="videoBitrate" value="2000000" valuetype="data"></param>
<param name="audioBitrate" value="48000" valuetype="data"></param>
</video>
<video height="480" src="SOP_priorities_480p.mp4" width="720">
<param name="videoBitrate" value="2000000" valuetype="data"></param>
<param name="audioBitrate" value="48000" valuetype="data"></param>
</video>
<video height="540" src="SOP_priorities_540p.mp4" width="960">
<param name="videoBitrate" value="2500000" valuetype="data"></param>
<param name="audioBitrate" value="48000" valuetype="data"></param>
</video>
<video height="720" src="SOP_priorities_720p.mp4" width="1280">
<param name="videoBitrate" value="5000000" valuetype="data"></param>
<param name="audioBitrate" value="48000" valuetype="data"></param>
</video>
</switch>
</body>
</smil>

I have the above videos in the appropriate folder on the wowza server.

In the application webpage:
I'm using JW Player and have the following code to embed JW Player (version 6.9):

<script type="text/javascript">
jwplayer("myElement").setup({
fallback: true,
width: 640,
height: 480,
sources: [{
file: "http://[serverurl]:[port]/Weekends/smil:sopweekendsmil.smil/jwplayer.smil"
},{
file: "http://[serverurl]:[port]/Weekends/smil:sopweekendsmil.smil/playlist.m3u8"
},{
file: "http://[serverurl]:[port]/Weekends/smil:sopweekendsmil.smil/manifest.f4m"
},{
file: "http://[serverurl]:[port]/Weekends/smil:sopweekendsmil.smil/manifest.mpd"
}],
rtmp: {
bufferlength: '10'
},
plugins: {
'qualitymonitor-2':{}
}
});
</script>

(I don't really know what the qualitymonitor plugin does or if it works at all. Seems to have no influence if I take it out...).
I tried a bunch of variations with the JW Player syntax, but this worked on the desktop browsers (Chrome/Firefox). However, the only file/url that works correctly live seems to be the jwplayer.smil. None of the other ones work on the desktop browsers - I get a "No playable sources found" message if I take out the jwplayer.smil url to test the other ones. Also, this isn't working in any way on any mobile browsers no matter what I try. I've tried just a single file (ex: the .m3u8 smil url) and get the same error.

When I try the Test Players function in the Wowza server interface, the MPEG DASH test works correctly and the Adobe HDS works correctly (in chrome browser) but I can't seem to get those working outside of the Test Players.

I get the feeling that I'm missing some conceptual piece - do I need to create more actual files for the different consumers? Or is it possibly how I have JW Player set up? Or maybe something is being blocked?

Any help would be greatly appreciated.

12 Community Answers

Alex

JW Player Support Agent  
0 rated :

Hi, there!

My name is Alex and I am one of the Support Engineers here at JW Player. I would be more than happy to assist you with your issue.

In regards to the qualitymonitor plugin – I have the same thought you have. I’ve never seen it before so I have no idea what it does. We don’t provide support for any plugins, so I would recommend taking that out unless you find out what it does and its useful to you. :)

First of all, I would recommend updating your version of JW Player. We are on JW 7.1.5 now, but if you do not want to go up to JW 7, I would still recommend using the latest version of JW 6, which is 6.12. You should be able to find it on your Account Dashboard by clicking on the “Downloads & Keys” link.

Also, if you are able to serve your live stream in HLS and/or MPEG-DASH, I would recommend doing so and not using RTMP. RTMP is based on Adobe Flash, so it would not work on mobile devices at all and would require Flash Player in all desktop browsers. HLS is natively supported in both Safari for iOS and Chrome for Android, but you would have to add androidhls: true to your embed code to enable the support on Android.

If HLS is your primary source, and you have androidhls: true, then HLS should work natively in Safari for both Mac and iOS, Chrome for Android and Microsoft Edge for Windows 10. Our player would then still play the HLS stream in Chrome for Desktop, Firefox and Internet Explorer by using Flash Player.

Our support for MPEG-DASH was really developed in JW 7, so your success with DASH may be hit-or-miss in JW 6.

As for HDS, our player only supports HDS in JW 7 and only when it is served by Akamai, because it requires a plugin from them to work. If you’re using Wowza, it won’t work.

I know that was a lot of information but I hope it benefits you. Please let me know if you need any more help or have any other questions.

Thank you!

ben N/A

User  
0 rated :

Ok - so I updated to JW 7 and to test everything from the above, I disabled RTMP from the server and removed HDS as well, given the akamai limitation.

I added "androidhls: true" as well (and took out the qualitymonitor thing).

Here's mu current embed code:

jwplayer("myElement").setup({
fallback: true,
width: 640,
height: 480,
androidhls: true,
file: "http://[serverurl]:[port]/Weekends/smil:sopweekendsmil.smil/jwplayer.smil"
},{
file: "http://[serverurl]:[port]/Weekends/smil:sopweekendsmil.smil/playlist.m3u8"
},{
file: "http://[serverurl]:[port]/Weekends/smil:sopweekendsmil.smil/manifest.mpd"
}],
rtmp: {
bufferlength: '10'
}

});

Now on the web (OSX), the player loads and it looks like everything is going to work but I get the loading 'wheel' when I click 'play' and the video never starts. Again, on Wowza, the streams play correctly in the test player. One note I fogot in the original post - Wowza is hosted on one domain and the site showing the videos is on a separate domain/machine. Could that be what's locking it up?

ben N/A

User  
0 rated :

(had a typo in the embed code. Fixed:

jwplayer("myElement").setup({
fallback: true,
width: 640,
height: 480,
androidhls: true,
sources: [{
file: "http://[serverurl]:[port]/Weekends/smil:sopweekendsmil.smil/jwplayer.smil"
},{
file: "http://[serverurl]:[port]/Weekends/smil:sopweekendsmil.smil/playlist.m3u8"
},{
file: "http://[serverurl]:[port]/Weekends/smil:sopweekendsmil.smil/manifest.mpd"
}],
rtmp: {
bufferlength: '10'
}
});

ben N/A

User  
0 rated :

The above means I fixed the posted code, not the problem itself - the problem still persists!

ben N/A

User  
0 rated :

[UPDATE]
I got it working with the following:
jwplayer("myElement").setup({
fallback: true,
width: 640,
height: 480,
androidhls: true,
sources: [{
file: "http://[serverurl]:[port]/Weekends/smil:sopweekendsmil.smil/jwplayer.smil",
type: "rtmp"
},{
file: "http://[serverurl]:[port]/Weekends/smil:sopweekendsmil.smil/playlist.m3u8",
type: "hls",
"default": "true"
},{
file: "http://[serverurl]:[port]/Weekends/smil:sopweekendsmil.smil/manifest.mpd",
type: "dash"
}],
rtmp: {
bufferlength: '10'
}
});

It seems that the "default" like is very important. I could not get the OSX chrome or firefox browsers to play anything with RTMP turned off on wowza, but once I turned RTMP back on AND made HLS the default, it worked on OSX browsers and mobile (only tested on android thus far).

Any idea why OSX browsers aren't automatically picking up a playable stream?

Alex

JW Player Support Agent  
0 rated :

Hi, Ben.

Our player, especially in JW 7, respects the order of the sources you have in your embed code. This means that our player will do whatever it can to play the first source, then the second, then the third. If the SMIL manifest that you have as your first source is RTMP and the RTMP server is turned off, our player sees that the URL is legit but it just doesn’t serve anything. You ended up getting past this by setting the HLS stream (your second source) as the default. The same thing would have been possible if you switched the order of the SMIL and the HLS stream.

I hope that helps! Please let me know if you need any more help or have any other questions.

Thank you!

ben N/A

User  
0 rated :

Ah - that clarifies. One follow up though - I turned RTMP back on because the other options seemed not to work on the desktop browsers for some reason, so RTMP *is* running and when it's turned off, nothing seems to work on the desktop.

Given that, shouldn't JW Player have seen the RTMP stream and recognized that it couldn't play that on mobile and bumped to the next one in order? Or does it not behave that way exactly?

Thanks again!
Ben

Alex

JW Player Support Agent  
0 rated :

Hi, Ben.

I believe that would be the case, yes. Do you have the player embedded somewhere where I can take a look?

ben N/A

User  
0 rated :

Sure - http://www.solsystech.com has a sample vid with the following embed:

<script type="text/javascript">
jwplayer("myElement").setup({
fallback: true,
width: 640,
height: 480,
androidhls: true,
sources: [{
file: "<?php echo $jwUrl; ?>",
type: "rtmp"
},{
file: "<?php echo $hlsUrl; ?>",
type: "hls",
"default": "true"
},{
file: "<?php echo $dashUrl; ?>",
type: "dash"
}],
rtmp: {
bufferlength: '10'
}
});
</script>

I can take out the 'default' for testing...

Alex

JW Player Support Agent  
0 rated :

Hi, Ben.

Yes – please take out the default option and let me know when you do.

Thanks.

ben N/A

User  
0 rated :

Ok - I took it out, but it's actually working now across all the platforms I've tried on. May have been some kind of caching issue that resolved itself. I *think* I'm good to go for the moment. Thanks for your help Alex.

Ben

Alex

JW Player Support Agent  
0 rated :

Hi, Ben.

I agree – looks like it’s still working for me.

Thanks!

This question has received the maximum number of answers.