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

m3u8 and XML playlists for RTMP and iOS dynamic streaming


Ethan: I am trying to build a page with dynamic streaming for both flash and iOS devices. Is this possible with the method used below?

The first page that I made points to a single rtmp stream with an m3u8 playlist as fallback for iOS devices. It works perfectly:
http://www.librarymedia.net/Documentary/ClickingWithTechnology.html

I tried to implement an xml playlist for the rtmp dynamic streaming functionality, but at first I got an error stating "Playlist could not be loaded: Error #1090". I ran the playlist through a validator and the error no longer appears, but the player does not load and nothing happens.

http://www.librarymedia.net/Documentary/ClickingWithTechnology2.html

Here's the code.
bc.. <script type="text/javascript">
jwplayer('mediaplayer').setup({
'id': 'playerID',
'width': '960',
'height': '540',
'skin': 'mediaplayer/glow.zip',
'playlistfile': 'playlist.xml',
'plugins': {
'qualitymonitor-2': {}
},
'modes': [
{type: 'flash', src: 'mediaplayer/player.swf'},
{
type: 'html5',
config: {
'file': 'http://63.116.232.5/vod/ClickingWithTechnology.m3u8',
'provider': 'video'
}
}
]
});
</script>


XML playlist:
bc.. <?xml version="1.0" encoding="utf-8"?> <rss version="2.0"
xmlns:media="http://search.yahoo.com/mrss/" xmlns:jwplayer="http://developer.longtailvideo.com/trac/" >
<channel>
<title>Single video with bitrate switching</title>
<item>
<title>Clicking With Technology</title>
<description>When an FMS 3.5 server is detected, bitrate switching is also continously done while watching the video.</description>
<media:group>
<media:content bitrate="1000" width="1920" url="ClickingWithTechnology_1000kbps.f4v" />
<media:content bitrate="800" width="960" url="ClickingWithTechnology_800kbps.f4v" />
<media:content bitrate="600" width="640" url="ClickingWithTechnology_600kbps.f4v" />
<media:content bitrate="400" width="320" url="ClickingWithTechnology_400kbps.f4v" />
<media:thumbnail url="splash.png" />
</media:group>
<jwplayer:type>rtmp</jwplayer:type>
<jwplayer:streamer>rtmp://63.116.232.5/vod/</jwplayer:streamer>
<jwplayer:duration>25:09</jwplayer:duration>
</item>
</channel>
</rss>


Thanks

34 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

If you are going to be using an XML playlist, you are going to need to use two XML files, one for Flash mode, one for HTML5 mode, as you can’t put the mode switch into an XML file itself.

Ethan Feldman

JW Player Support Agent  
0 rated :

If you are going to be using an XML playlist, you are going to need to use two XML files, one for Flash mode, one for HTML5 mode, as you can’t put the mode switch into an XML file itself.

JW Player

User  
0 rated :

bc.. you are going to need to use two XML files, one for Flash mode, one for HTML5 mode


Clarification: Are you saying that the playlists should be specified in the *mode* section of the code with an XML file for iOS and Flash?

Like this (playlist for rtmp, playlist2 for hls streaming)?:
bc.. <script type="text/javascript">
jwplayer('mediaplayer').setup({
'id': 'playerID',
'width': '960',
'height': '540',
'skin': 'mediaplayer/glow.zip',
'plugins': {
'qualitymonitor-2': {}
},
'modes': [
{
type: 'flash',
src: 'mediaplayer/player.swf',
'file': 'playlist.xml',
},
{
type: 'html5',
config: {
'file': 'playlist2.xml',
'provider': 'video'
}
}
]
});
</script>


Here's the updated page:
http://www.librarymedia.net/Documentary/ClickingWithTechnology2.html

PC browsers: nothing loads.
iPad: The video could not be loaded, either because the server failed or the format is not supported: http://www.librarymedia.net/Documentary/playlist2.xml

This playlist does not validate: http://validator.w3.org/
Missing "charset" attribute for "text/xml" document.

The HTTP Content-Type header (text/xml) sent by your web server (Apache/2.2.3 (Red Hat)) did not contain a "charset" parameter, but the Content-Type was one of the XML text/* sub-types.

This is the code for playlist2.xml (not sure what xml and rss versions should be):
bc.. <?xml version="1.0" encoding="utf-8"?> <rss version="2.0"
xmlns:media="http://search.yahoo.com/mrss/" xmlns:jwplayer="http://developer.longtailvideo.com/trac/" >
<channel>
<title>Single video with bitrate switching</title>
<item>
<title>Clicking With Technology</title>
<description>FMS 4.5 dynamic streaming playlist.</description>
<media:group>
<media:content bitrate="1000" width="1920" url="ClickingWithTechnology_1000kbps.f4v.m3u8" />
<media:content bitrate="800" width="960" url="ClickingWithTechnology_800kbps.f4v.m3u8" />
<media:content bitrate="600" width="640" url="ClickingWithTechnology_600kbps.f4v.m3u8" />
<media:content bitrate="400" width="320" url="ClickingWithTechnology_400kbps.f4v.m3u8" />
<media:thumbnail url="splash.png" />
</media:group>
<jwplayer:type>rtmp</jwplayer:type>
<jwplayer:streamer>http://63.116.232.5/hls-vod/</jwplayer:streamer>
<jwplayer:duration>25:09</jwplayer:duration>
</item>
</channel>
</rss>



Sorry for all of the questions (I'm a noob). Thank you for the help.

Ethan Feldman

JW Player Support Agent  
0 rated :

Yes, that is exactly what I am saying.

What do you mean nothing loads?

I went to – http://www.librarymedia.net/Documentary/ClickingWithTechnology2.html

It loaded fine.

JW Player

User  
1 rated :

bc.. What do you mean nothing loads?


Sorry. I meant to say that the video does not play and I'm getting the following error on the iPad:
"The video could not be loaded, either because the server failed or the format is not supported:http://www.librarymedia.net/Documentary/playlist2.xml"

Are there any examples of what I'm trying to do (a player set-up that uses dynamic streaming with both flash (RTMP) and iOS?

Thanks for hanging in there with me.

JW Player

User  
0 rated :

Carlos, Ethan, I'm trying to do the same thing with JWPlayer and Wowza.
I want to take advantage of dynamic streaming for both Flash and iOS, but I don''t see an example for this either.

Thanks,
triple

JW Player

User  
0 rated :

hey Carlos... read this! I think it can help... http://www.mediaserve.com/clients/knowledgebase/87/How-do-I-configure-JW-Player-for-multi-bitrate-live-Wowza-streaming.html

JW Player

User  
0 rated :

Ethan,

Hopefully this helps. I think Carlos and I are trying to do the same thing. I've been working all day on this with no luck. If he is in fact trying to do something different, please feel free to move this post.

I would like to put together the basic code necessary to implement a video player utilizing the JW Player, with multi bit rate support for both the Flash player and iOS devices. I have RTMPe working alone, but I do not understand how to call a multi-bitrate playlist for iOS simultaneously.

In the example I am working from, I do not understand how the "url" is being called for the iOS xml code. Can you show me how to do this properly?

If you would like to create your own example, my test files are named accordingly:

sample_01_2400Kb.mp4
sample_01_1800Kb.mp4
sample_01_900Kb.mp4

------------------------
The player page example code:

<div id='player'>This div will be replaced by the JW Player.</div>
<script type='text/javascript' src='/jwplayer.js'></script>
<script type='text/javascript'>
jwplayer('player').setup({
'id': 'playerID',
'width': '640',
'height': '480',
'file': '/flash-mbr.xml',
'modes': [
{type: 'flash', src: '/player.swf'},
{
type: 'html5',
config: {
'file': '/ios-mbr.xml'
}
}
]
});
</script>

-------------------------
iOS xml example code:

<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/"
xmlns:jwplayer="http://developer.longtailvideo.com/">

<channel>
<title>iOS Multi Bit Rate Playlist</title>

<item>
<title>Live Streaming</title>

<description>Put your description here.</description>
<media:group>
<media:content bitrate="500"
url="[iOS URL]/livestream_1/playlist.m3u8" width="600" />
<media:content bitrate="350"
url="[iOS URL]/livestream_2/playlist.m3u8" width="480" />
<media:content bitrate="200"
url="[iOS URL]/livestream_3/playlist.m3u8" width="320" />
</media:group>

<jwplayerrovider>video</jwplayerrovider>
</item>

</channel>
</rss>

-----------------------------
Flash xml example code:

<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/"
xmlns:jwplayer="http://developer.longtailvideo.com/">

<channel>
<title>Flash Multi Bit Rate Playlist</title>

<item>
<title>Live Streaming</title>

<description>Put your description here.</description>
<media:group>
<media:content bitrate="500" url="livestream_1" width="600" />
<media:content bitrate="350" url="livestream_2" width="480" />
<media:content bitrate="200" url="livestream_3" width="320" />
</media:group>

<jwplayer:streamer>[RTMP URL]</jwplayer:streamer>
<jwplayerrovider>rtmp</jwplayerrovider>
</item>

</channel>
</rss>

--------------------------------
Thanks,
triple

JW Player

User  
0 rated :

bc.. I think Carlos and I are trying to do the same thing.


We are, except that you are trying to make it work with live streams and I'm trying to make it work with a single file encoded in different bit-rates and frame sizes.

I've managed to get a player set-up with a single rtmp stream and an .m3u8 playlist for iOS that works using the following code, but when I switch everything to .xml files everything stops working.
http://www.librarymedia.net/Documentary/ClickingWithTechnology.html
bc.. <script type="text/javascript">
jwplayer('mediaplayer').setup({
'id': 'playerID',
'width': '960',
'height': '540',
'provider': 'rtmp',
'skin': 'mediaplayer/glow.zip',
'streamer': 'rtmp://63.116.232.5/vod/',
'file': 'ClickingWithTechnology_600kbps.f4v',
'image': 'splash.png',
'modes': [
{type: 'flash', src: 'mediaplayer/player.swf'},
{
type: 'html5',
config: {
'file': 'http://63.116.232.5/vod/ClickingWithTechnology.m3u8',
'provider': 'video'
}
}
]
});
</script>



When specify the two XML files with the *mode* nothing works, so I think this is a problem with the way I've made the XML files and testing with an iPad does result in the error
iPad: The video could not be loaded, either because the server failed or the format is not supported: http://www.librarymedia.net/Documentary/playlist2.xml

This is the code that I'm trying to use (note the playlist.xml and playlist2.xml files in the *mode* for both rtmp and iOS):
bc.. <script type="text/javascript">
jwplayer('mediaplayer').setup({
'id': 'playerID',
'width': '960',
'height': '540',
'skin': 'mediaplayer/glow.zip',
'modes': [
{
type: 'flash',
src: 'mediaplayer/player.swf',
'file': 'playlist.xml',
},
{
type: 'html5',
config: {
'file': 'playlist2.xml',
'provider': 'video'
}
}
]
});
</script>



triple: put your code inside <code> tags, it makes it easier to read (see the formatting options link).

Thanks for the input triple, hopefully Ethan or someone else will help us figure this out.

JW Player

User  
0 rated :

hey Carlos!

Thanks for the tags tip. I'll do that now.

Actually, I am trying to do VOD streaming too. Don't let that link I sent fool you, it's just the closest thing I could find to what we're trying to do. I have multi-bitrate mp4 files too.

One thing... try your flash 'file': 'playlist.xml', before 'modes'...

bc.. 'skin': 'mediaplayer/glow.zip',
'file': 'playlist.xml',
'modes': [
{
type: 'flash',
src: 'mediaplayer/player.swf'
},



Newb here too, so not sure.

Hopefully Ethan with the long black tail shows up!

Ethan Feldman

JW Player Support Agent  
0 rated :

Hi Guys.

Carlos, there is an obvious issue with your XML file.

http://www.librarymedia.net/Documentary/playlist2.xml

You are linking to the RTMP stream and M3U8 files … in the same playlist! You can’t do that.

If you want to use a playlist, you need one playlist just for Flash (RTMP) and one playlist just for HTML5 (m3u8).

Here is a sample of XML playlists that works in HTML5 mode – http://developer.longtailvideo.com/player/trunk/fl5/js/test/examples/xmlplaylists.html

Here is the XML file that we use on this sample – http://developer.longtailvideo.com/player/trunk/fl5/js/test/examples/assets/mrss.xml

triple, HTML5 doesn’t really support Bitrate switching…

Also, please provide a link (like carlos did).

JW Player

User  
0 rated :

triple: As Ethan pointed out to me in his first response, the playlist xml files (one for rtmp, one for iOS) have to be specified in the *modes* section of the code. Your code has it in the player setup (move it to the modes section as I've done, see above).

bc.. Ethan: You are linking to the RTMP stream and M3U8 files ... in the same playlist! You can't do that.


Where did you see that? I just checked both of my xml files and I don't see this (playlist.xml for rtmp and playlist2.xml for iOS), but *this is definitely a problem with my xml files.* I'm going to look at the xml examples that you provided.

I'm also going to take a step back and just try to implement a player with an rtmp xml playlist to narrow the problem down. If that doesn't work, it will confirm my hunch regarding xml.

triple: hang in there, I think we'll get it eventually :-)

Thanks Ethan

Ethan Feldman

JW Player Support Agent  
0 rated :

Carlos – This file – http://www.librarymedia.net/Documentary/playlist2.xml

You have a streamer there, and m3u8 files that are not absolutely referenced !

<rss version="2.0" 
	xmlns:media="http://search.yahoo.com/mrss/" 
	xmlns:jwplayer="http://developer.longtailvideo.com/trac/wiki/FlashFormats">  
<channel> 
    <title>Single video with bitrate switching</title> 
    <item> 
      <title>Clicking With Technology</title> 
      <description>FMS 4.5 dynamic streaming playlist.</description> 
      <media:group> 
        <media:content bitrate="1000" width="1920" url="ClickingWithTechnology_1000kbps.f4v.m3u8" /> 
        <media:content bitrate="800" width="960" url="ClickingWithTechnology_800kbps.f4v.m3u8" /> 
        <media:content bitrate="600" width="640" url="ClickingWithTechnology_600kbps.f4v.m3u8" /> 
        <media:content bitrate="400" width="320" url="ClickingWithTechnology_400kbps.f4v.m3u8" /> 
        <media:thumbnail url="splash.png" /> 
      </media:group> 
      <jwplayer:type>rtmp</jwplayer:type> 
      <jwplayer:streamer>http://63.116.232.5/hls-vod/</jwplayer:streamer>       
    </item> 
  </channel> 
</rss>

JW Player

User  
0 rated :

I have been working on the same thing using live streams. Setting up the HLS SMIL file was fairly easy, but it sounds like I need to use XML instead. If you figure this out I hope you will write up a clear set of instructions.

JW Player

User  
0 rated :

Ethan,

First a side note...after reading Wowza's tutorial, I'm a bit confused again. Can iOS do multi-bitrate or not?

"Adaptive bitrate (ABR) video on demand streaming to Flash, the iOS devices and Silverlight requires that you have multiple files pre-encoded to the desired bitrates for streaming." (http://www.wowza.com/forums/content.php?35-How-to-play-a-video-on-demand-file)

Okay! Here's my code... the player is not even showing up on the page. I checked my file paths by building a basic rtmp player and that works perfectly.

Carlos confirmed with you that the 'file' info for flash should be inside "modes" but I'm seeing it outside 'modes' on a similar example to what we're trying to do: http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/18530/embedding-an-rtmp-stream-with-an-html5-fallback

Maybe we are missing some variables before 'modes'?

triple

Player:
bc.. <script type='text/javascript' src='/bbb/player/jwplayer.js'></script>
<div id='player'>This div will be replaced by the JW Player.</div>
<script type='text/javascript'>
jwplayer('player').setup({
'id': 'playerID',
'width': '768',
'height': '432',
'modes': [
{type: 'flash', src: '/bbb/player/player.swf',
config: {
'file': '/bbb/playlists/bbb-flash.xml',
},
{type: 'html5',
config: {
'file': '/bbb/playlists/bbb-ios.xml'
}
}
]
});
</script>



http://cke18.com/videos/test-20/

JW Player

User  
0 rated :

Triple,

Inside the config statement for each mode you may need to put a tag for provider. Something like this:

bc.. <script type='text/javascript' src='/bbb/player/jwplayer.js'></script>
<div id='player'>This div will be replaced by the JW Player.</div>
<script type='text/javascript'>
jwplayer('player').setup({
'id': 'playerID',
'width': '768',
'height': '432',
'modes': [
{type: 'flash', src: '/bbb/player/player.swf',
config: {
'provider': "rtmp",
'file': '/bbb/playlists/bbb-flash.xml',
},
{type: 'html5',
config: {
'provider': "http",
'file': '/bbb/playlists/bbb-ios.xml'
}
}
]
});
</script>

JW Player

User  
0 rated :

triple:

Your code looks right, but I can't tell why the player is not loading.

bc.. Ethan:You have a streamer there, and m3u8 files that are not absolutely referenced !


I had already tried putting the absolute paths to the streams in the xml file. No dice. This does not work and my hunch is that there is a problem either with my xml files or JW's implementation of this.

Although I looked at them, the xml links you provided were not for dynamic streams. Which leads to this question:
bc.. *Is there a working example that you can show us that for dynamic streaming to both flash and ios using two separate xml files in modes?*


There doesn't seem to be a working example of this anywhere on this site. I'm temporarily giving up on this and will get back to it mid-next week.

JW Player

User  
0 rated :

thanks Kit!
I'll try that. In the meantime, maybe Ethan can catch up. Keep posting if you figure out your live version, maybe it helps.
triple

Ethan Feldman

JW Player Support Agent  
0 rated :

@Kit – We don’t yet support HLS, we are working on a provider for it.

@Carlos – We don’t have an exact example of this on our site I’m afraid, but I know people have done it before, and it is definitely possible.

It is basically done by combining the following tutorials:

http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/18508/jw-embedder-modes
http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/18530/embedding-an-rtmp-stream-with-an-html5-fallback
http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/24/creating-a-playlist

@triple – Please provide a link to where you have been trying to do this.

JW Player

User  
0 rated :

I have been unsuccessful getting this to work using XML playlist files.

I have achieved success however using a combination of a JSON inline playlist for RTMP Dynamic Streaming, and a SMIL playlist for HTTP streaming. I am encoding four different bitrates on a Cisco encoder, so this is all based on a live stream scenario. My site is all behind a corporate firewall so I can't provide a link. This is what I did.

This is my HTML:
bc.. <script type='text/javascript' src='http://10.32.167.25/jwplayer/jwplayer.js'></script>

<div id='mediaplayer'>This div will be replaced by the JW Player</div>

<script type='text/javascript'>
jwplayer('mediaplayer').setup({
width: 854,
height: 480,
provider: "rtmp",
streamer: "rtmp://10.32.167.25/live/",
levels: [
{ bitrate: 400, file: "Live400", width: 440 },
{ bitrate: 543, file: "Live550", width: 548 },
{ bitrate: 737, file: "Live750", width: 684 },
{ bitrate: 1000, file: "Live1000", width: 854 }
],
modes: [
{type: "flash", src: "http://10.32.167.25/jwplayer/player.swf"},
{type: "html5",
config: {provider: "http",
file: "http://10.32.167.25:1935/live/smil:livelist.smil/playlist.m3u8"
}
}
]
});
</script>



This is my SMIL:
bc.. <smil>
<head>
</head>
<body>
<switch>
<video src="Live1000" system-bitrate="1000000"/>
<video src="Live750" system-bitrate="737000"/>
<video src="Live550" system-bitrate="543000"/>
<video src="Live400" system-bitrate="400000"/>
</switch>
</body>
</smil>


The SMIL file must be installed in the correct directory on your server (in my case WowzaMediaServer/content).

In both a Flash environment and iOS devices I see the stream and it changes in response to bandwidth conditions.

Ethan Feldman

JW Player Support Agent  
0 rated :

Link?

JW Player

User  
0 rated :

Sorry. This is for streaming on a corporate intranet. There is no public website.

Ethan Feldman

JW Player Support Agent  
0 rated :

Can you provide a link via email?

JW Player

User  
0 rated :

Hello everyone.

I've given up trying to make this work with xml files. Maybe when the player supports f4m manifest files this will become a lot easier to do. I have no clue how to implement them properly or what I was doing wrong to get it to work (did I have to specify the video type:mp4 in the xml file, was there a cross-domain.xml issue?...etc).

Hopefully someone can figure that out and post a solution and a working example on this thread.

In any event, I have now moved on to trying a setup that uses dynamic streaming for both Flash and iOS (my intended goal) using *
levels within the flash mode* and an *m3u8 playlist file for the HTML 5 mode*.

This is the page: http://www.librarymedia.net/Documentary/ClickingWithTechnology1.html

bc.. <script type="text/javascript">
jwplayer('mediaplayer').setup({
'flashplayer': 'mediaplayer/player.swf',
'id': 'playerID',
'width': '960',
'height': '540',
'provider': 'rtmp',
'streamer': 'rtmp://63.116.232.5/vod/',
'file': 'ClickingWithTechnology_600kbps.f4v',
'image': 'splash.png',
'skin': 'mediaplayer/glow.zip',
'plugins': {
'qualitymonitor-2': {}
},
'modes': [
{
type: 'flash',
src: 'mediaplayer/player.swf',
levels: [
{ bitrate: 1000, file: "rtmp://63.116.232.5/vod/mp4:ClickingWithTechnology_1000kbps.f4v", width: 1920 },
{ bitrate: 800, file: "rtmp://63.116.232.5/vod/mp4:ClickingWithTechnology_800kbps.f4v", width: 960 },
{ bitrate: 600, file: "rtmp://63.116.232.5/vod/mp4:ClickingWithTechnology_600kbps.f4v", width: 640 },
{ bitrate: 400, file: "rtmp://63.116.232.5/vod/mp4:ClickingWithTechnology_400kbps.f4v", width: 320 }
],
},
{
type: 'html5',
config: {
'file': 'http://63.116.232.5/vod/ClickingWithTechnology.m3u8',
'provider': 'video'
}
}
]
});
</script>


I have the provider, streamer, and file specified under the setup and it appears that the player is not switching to different frame sizes but sticking to the size that I specified under setup. Should these parameters be under the mode for flash? When I try that nothing works. Frustrating.

Thanks.

Ethan Feldman

JW Player Support Agent  
0 rated :

Hi Carlos,

The issue here is is that you are pointing to the full path to the rtmp locations in your levels block, for example:

{ bitrate: 1000, file: "rtmp://63.116.232.5/vod/mp4:ClickingWithTechnology_1000kbps.f4v", width: 1920 },


This will not work.

I think this will work, however:
<script type="text/javascript">
  jwplayer('mediaplayer').setup({
    'flashplayer': 'mediaplayer/player.swf',
    'id': 'playerID',
    'width': '960',
    'height': '540',
    'provider': 'rtmp',
    'streamer': 'rtmp://63.116.232.5/vod/',
    'image': 'splash.png',
	'skin': 'mediaplayer/glow.zip',
	'plugins': {
       'qualitymonitor-2': {}
    },
	'modes': [
        {
	type: 'flash', 
	src: 'mediaplayer/player.swf',
	levels: [
            { bitrate: 1000, file: "ClickingWithTechnology_1000kbps.f4v", width: 1920 },
            { bitrate: 800, file: "ClickingWithTechnology_800kbps.f4v", width: 960 },
            { bitrate: 600, file: "ClickingWithTechnology_600kbps.f4v", width: 640 },
			{ bitrate: 400, file: "ClickingWithTechnology_400kbps.f4v", width: 320 }
        ],
},        
{
          type: 'html5',
          config: {
           'file': 'http://63.116.232.5/vod/ClickingWithTechnology.m3u8',
           'provider': 'video'
          }
        }  
    ]
  });
</script>

JW Player

User  
0 rated :

Hello,

i'm actually working on a player for our live streaming,
finding some info around the web including this page i've created this one.
Everything works fine with flash but nothing happens on iOS.
I don't understand if a solution was found.
Thanks in advance Vicinio

http://wpc.6481.edgecastcdn.net/006481/player/quality_ios.html

Here the details

HTML

bc.. <script type='text/javascript' src='http://wpc.XXXX.edgecastcdn.net/XXXXXX/player/jwplayer.js'></script>

<div id='mediaplayer'></div>

<script type="text/javascript">
jwplayer('mediaplayer').setup({
'flashplayer': 'http://wpc.XXXX.edgecastcdn.net/XXXXXX/player/player.swf',
'autostart': true,
'rtmp.subscribe': 'true',
'playlistfile': 'http://wpc.XXXX.edgecastcdn.net/XXXXXX/player/playlist_web.xml',
'modes': [
{type: 'flash', src: 'http://wpc.XXXX.edgecastcdn.net/XXXXXX/player/player.swf'},
{
type: 'html5',
config: {
'file': 'http://wpc.XXXX.edgecastcdn.net/XXXXXX/player/playlist_ios.xml'
}
}
]
});
</script>



FLASH PLAYLIST

bc.. <rss version="2.0"
xmlns:media="http://search.yahoo.com/mrss/"
xmlns:jwplayer="http://developer.longtailvideo.com/trac/wiki/FlashFormats">
<channel>
<title>MBR</title>
<item>
<title>Live</title>
<description>When an FMS 3.5 server is detected, bitrate switching is also continously done while watching the video.</description>
<media:group>
<media:content bitrate="1000" width="720" url="push-sourn_source" />
<media:content bitrate="500" width="480" url="push-sourn_500k" />
<media:content bitrate="250" width="360" url="push-sourn_250k" />
<media:content bitrate="150" width="180" url="push-sourn_150k" />
</media:group>
<jwplayer:type>rtmp</jwplayer:type>
<jwplayer:streamer>rtmp://fml.XXXX.edgecastcdn.net/XXXXXX/</jwplayer:streamer>
</item>
</channel>
</rss>


IOS PLAYLIST

bc.. <rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/"
xmlns:jwplayer="http://developer.longtailvideo.com/">

<channel>
<title>iOS Multi Bit Rate Playlist</title>

<item>
<title>Live Streaming</title>

<description>Put your description here.</description>
<media:group>
<media:content bitrate="500"
url="http://XX.XX.XX.XXX/live/test_source/playlist.m3u8" width="720" />
<media:content bitrate="350"
url="http://XX.XX.XX.XXX/live/test_500k/playlist.m3u8" width="480" />
<media:content bitrate="250"
url="http://XX.XX.XX.XXX/live/test_250k/playlist.m3u8" width="360" />
<media:content bitrate="150"
url="http://XX.XX.XX.XXX/live/test_150k/playlist.m3u8" width="180" />
</media:group>

<jwplayerprovider>video</jwplayerprovider>
</item>

</channel>
</rss>

Ethan Feldman

JW Player Support Agent  
0 rated :

Just use a single m3u8 file for html5 mode. Bitrate switching doesn’t work in HTML5 mode.

JW Player

User  
0 rated :

Ok i understand, now i've correct it with a single m3u8 but still have same problem
http://wpc.6481.edgecastcdn.net/006481/player/test.html

JW Player

User  
0 rated :

I've found this code working as i need:

bc.. <script type='text/javascript' src='http://wpc.6481.edgecastcdn.net/006481/player/jwplayer.js'></script>
<div id='mediaplayer'></div>

<script type="text/javascript">

jwplayer('mediaplayer').setup(
{
'flashplayer': 'http://wpc.6481.edgecastcdn.net/006481/player/player.swf',
'autostart': true,
'rtmp.subscribe': 'true',
provider: "rtmp",
streamer: "rtmp://fml.6481.edgecastcdn.net/206481",
levels: [
{ bitrate: 1000, file: "push-diretta_source", width: 720 },
{ bitrate: 500, file: "push-diretta_500k", width: 480 },
{ bitrate: 250, file: "push-diretta_250k", width: 360 },
{ bitrate: 150, file: "push-diretta_150k", width: 180 }
],
modes: [

{
type: 'html5',
config: {
provider: 'video',
levels: [
{ bitrate: 1000, file: "http://wpc.6481.edgecastcdn.net/806481/live/live/diretta_source/playlist.m3u8", width: 720 },
{ bitrate: 500, file: "http://wpc.6481.edgecastcdn.net/806481/live/live/diretta_500k/playlist.m3u8", width: 480 },
{ bitrate: 250, file: "http://wpc.6481.edgecastcdn.net/806481/live/live/diretta_250k/playlist.m3u8", width: 360 },
{ bitrate: 150, file: "http://wpc.6481.edgecastcdn.net/806481/live/live/diretta_150k/playlist.m3u8", width: 180 }
]
}
},
{
type: 'flash',
src: 'http://wpc.6481.edgecastcdn.net/006481/player/player.swf'
}
]
}
);

</script>


Streaming works fine but now i've to fix player dimension because i would like to remove black bar on left and right side, any idea? Encoder is push streaming at 720x576.
Thanks in advance
Vicinio

Ethan Feldman

JW Player Support Agent  
0 rated :

Glad you got it.

To fix that, under:

‘autostart’: true,

Add:

‘stretching’: ‘exactfit’,

JW Player

User  
0 rated :

Thanks Ethan,
yes, suppose that it's the right one, added but if i want to change player size? Is it possible? ( Using stretching i can fix it but i've test that with the correct aspect ratio i don't need to use stretching)
Other question, if i would like to test with quality monitor i don't have a chance to use it with my code?
Thanks in advance
Patrick

Ethan Feldman

JW Player Support Agent  
0 rated :

If you use the stretching variable, the video will stretch, regardless of the size.

If you want to add the plugin, under:

‘rtmp.subscribe’: ‘true’,

Add:

‘plugins’: ‘qualitymonitor’,

JW Player

User  
0 rated :

www.bilalsalim.webs.com vist the site

Ethan Feldman

JW Player Support Agent  
0 rated :

What does this have to do with the JW Player?

This question has received the maximum number of answers.