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

Cloudfront RTMP and bufferlength


I am new to JW Player. I have recently purchased the JW Player commercial license and have setup an Amazon Cloudfront account.

I have the player embedded and playing. No problems here.

I cannot get the bufferlength setting to work. I am not sure if I am missing something or just approaching this whole RTMP thing from the wrong angle.

Here is the page with my video embedded:
http://www.earthwindwater.com.au/videos/action-videos/2011-southern-80-video-goggles

Here is the js file I have embedded in the post. I have done it this way to keep the post's html short, as it is used for a truncated RSS feed.

bc.. jwplayer('mediaplayer').setup({
'modes': [{
'type': 'flash',
'src': '/js/jwplayer/player.swf'
},{
'type': 'html5',
'config': {
'file': 'http://video.earthwindwater.com.au/video/ElmStreetSouthern80.mp4',
'provider': 'video'
}
}],
'id': 'playerID',
'width': '520',
'height': '292',
'title': 'Liquid Image Video Goggles | Southern 80 Water Ski Racing',
'description': 'Water Ski Racing in the 2012 Southern 80 Presidents Dash behind Elm Street at speeds in excess of 100Mph. An awesome video from the Liquid Image Video Goggles',
'duration': '8:54',
'file': 'video/ElmStreetSouthern80.mp4',
'bufferlength': '60',
'image': '/images/stories/video/ElmStreetSouthern80.jpg',
'provider': 'rtmp',
'streamer': 'rtmp://cdn.earthwindwater.com.au/cfx/st',
'plugins': {
'hd-2': {
'file': 'video/ElmStreetSouthern80HD.mp4',
'fullscreen': 'true'
},
'sharing-3': {
'code': '%3Ciframe%20frameborder%3D%220%22%20scrolling%3D%22no%22%20src%3D%22http%3A%2F%2Fwww.earthwindwater.com.au%2Fvideo%2FElmStreetSouthern80.html%22%20width%3D%22518%22%20height%3D%22292%22%3E%3C%2Fiframe%3E',
'link': 'http://www.earthwindwater.com.au/videos/action-videos/2011-southern-80-video-goggles'
}
}
});


Any tips would be welcomed.

Thanks

21 Community Answers

JW Player

User  
0 rated :

Forgot to write my problem.

I cannot get this stream to buffer. I set a buffer length to 30 (ie: I assume this is 30 seconds) and the player reloads after only a few seconds of playback on HD, and maybe 10 or 15 seconds on my standard definition size.

SD size has a bitrate of 1000 and the HD bitrate is 5000.

I have also tried 'bufferlength': '60', with the exact same results.

Any clues as to what I am missing in my code?

Ethan Feldman

JW Player Support Agent  
0 rated :

bufferlength doesn’t apply to RTMP in a lot of cases.

JW Player

User  
0 rated :

Ethan,

What do you mean in a lot of cases? Does that mean in some cases it does apply?

If so which ones?

Is the lack of bufferlength in RTMP a restriction due to the protocol or the architecture of JW Player?

Thanks
Paul

Ethan Feldman

JW Player Support Agent  
0 rated :

Sorry, what I meant was bufferlength does not take into consideration the amount of time it takes to connect to your RTMP application.

JW Player

User  
0 rated :

Ethan,

I would assume that it has already connected. It begins playback. Plays the low def for 5, 10 or 20 seconds then the loading icon comes up. I would have thought that it should play for length of the buffer as a bare minimum.

Thanks
Paul

JW Player

User  
0 rated :

Just a little progress report on my issue.

I received some recommendation regarding encoding etc. from another forum to reduce the CPU overhead of the flash player. I have made these changes to the encoded video hoping this may help my cause. Below is a link to this video.

I changed the size of the video to have dimensions as a multiple of x16
I changed the audio sampling rate to 44.1khz and bitrate of 96

http://www.earthwindwater.com.au/video/TWRPromoRTMP.html

With a bufferlength setting of 15 - the above video when played starts within 10 seconds. Plays for around 6 seconds then reloads, plays for another 10-12 seconds and reloads again.

With a bufferlength setting of 30 - the above video when played starts within 10 seconds. Plays for around 6 seconds then reloads, plays for another 15 seconds and reloads again.

The reload frequency is quite random, sometimes it will reload after approximately 10 seconds sometimes 30 seconds. The bufferlength seems to have no bearing, whether the settings is 15, 30 or 60 seconds.

Ethan Feldman

JW Player Support Agent  
0 rated :

This link seems to take about 7 seconds to load for me on a basic cable connection.

JW Player

User  
0 rated :

Ethan,

How long does it play for before reloading? I am trying to work out why the buffering settings don't seem to be making any difference whatsoever. If I set the buffer to 30 seconds, I still only get about 5 - 10 seconds playback before it begins reloading. I would have thought it would play for at least 30 seconds. Likewise, even if I change the bufferlength to 60 seconds, I will still only get 5 - 10 seconds of initial playback before a reload

Thanks
Paul

Ethan Feldman

JW Player Support Agent  
0 rated :

Hi Paul,

The bufferlength variable is not for how long the video plays, it is for how long it takes to buffer initially only.

http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/12536/configuration-options

Best,
-Ethan

JW Player

User  
0 rated :

That is correct. I did read that and investigate these options before posting these questions. In reading that description of the bufferlength option, if it is set to 60, it will buffer 60 seconds of video before it begins playback. So one would assume that the player would then be able to play that 60 seconds of video un-interrupted.

This is not the case, which would lead me to believe that for some reason the bufferlength variable I am setting is not working correctly.

Any ideas???

Ethan Feldman

JW Player Support Agent  
0 rated :

Let me ask here. Possibly the video file has something wrong with it?

JW Player

User  
0 rated :

No worries, thanks. The video plays perfectly in using the download mode (not RTMP)

I did have trouble with this initially, but found the post referring to QTIndexSwapper. This fixed my download version issues. I am using the same video file for RTMP

Ethan Feldman

JW Player Support Agent  
0 rated :

Okay, that rules that one out. Hmm, I will ask around here and see what else it could be…

JW Player

User  
0 rated :

Any update on this? I am having a similar problem. I have been hosting videos on Bluehost. They stream very nicely. I am experimenting with moving them to Cloudfront. They play okay but there is stuttering...same as described above.

Thanks.

Ethan Feldman

JW Player Support Agent  
1 rated :

Do you have a link?

JW Player

User  
-1 rated :

I have the jw player code in s download distribution and the video vile on a streaming distribution on amazon. A code snippet of my embed is below. It works, it just has pretty bad stutter as described above. I'm on a high speed cable modem connection (comcast). Like I said, they stream great from a Bluehost server. Not sure what the difference is with amazon and rtmp.


<div id='sliderVideo1'>Loading the player...</div>
<script type='text/javascript'>
jwplayer('sliderVideo1').setup({
flashplayer: 'https://dxxxxxxxxxxxxx.cloudfront.net/player.swf',
file: 'XXX-YYY.mp4',
provider: 'rtmp',
streamer: 'rtmp://sxxxxxxxxxxxxx.cloudfront.net/cfx/st',
height: 200,
image: '" . MEDIA_URL . "VideoImage1.png',
width: 370
});
</script>
</div>

Ethan Feldman

JW Player Support Agent  
0 rated :

Yes, so I would like to see a link so I can test as well. I am on a cable connection.

JW Player

User  
0 rated :

It's the "Buying a Guitar" video. All the others are still being hosted from bluehost.

http://cmiguitar.org/beta2/?page_id=291&course=1

This link will work for the next little while. Let me know if you can't view it.

Thanks.

Ethan Feldman

JW Player Support Agent  
0 rated :

I am playing the video. I got one buffer icon at 10 and 20 seconds in, but nothing stuttered. After that it continued to stream correctly for me. I am using Time Warner Cable as my ISP (Cable, NYC).

JW Player

User  
0 rated :

Thanks for taking a look.

By stutter I guess what I really meant is the video playback stops and the buffer icon shows up. If that happens to often it's a pretty annoying experience.

If I clear my cache then play the video I get quite a lot of buffer icons. I find this a little odd because the video is not being cached. I've verified this by watching the cache file while I play the video. My understanding is rtmp doesn't use the cache anyway so I guess this isn't a surprise.

I don't get any buffer icons when I stream from bluehost. I guess the more likely situation is my connection to bluehost is higher bandwidth than my connection to the amazon servers. You get fewer buffer icons than I do so your connection must be higher bandwidth than mine as well.

Maybe the solution is dynamic bit rate switching.

Ethan Feldman

JW Player Support Agent  
0 rated :

Yeah, I think that would be the solution, since if the connection drops, the playback will suffer.

This question has received the maximum number of answers.