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

Why JWPlayer is adding non existing variant time from master playlist?


Hi

We are generating multi-bitrate HLS video and playing it using JWP. Master M3U8 is generating fine and looks like below

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=600000,RESOLUTION=640x360,NAME="360p"
/live/524-040524_low/index.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2750000,RESOLUTION=1280x720,NAME="720p"
/live/524-040524_high/index.m3u8

Looks all fine when we stream both low and high variant at the same time. But if we generate only 720p and play same format of M3U8 file, JWPlayer sometime add the length of non existing 360p variant assuming the length to be same of 720p. For example if 720p video length is 21:15 min. It sometime shows 42:15 min. This does not happen every time but happens often.

9 Community Answers

devops

User  
0 rated :

Another thing I forget to mention that JWP not only shows the doubled video duration but also playing it twice. To clarify the issue I am describing it more elaborately

We are generating multi-bitrate HLS Live Stream and playing it with JWP. Generated M3U8 looks like above. When we push both variants all goes fine. But if we push only one variant say 720p, Mater M3U8 has both low and high variants' individual playlist links as we are pushing only 720p so no 360p is generating.

We expected that JWP will ignore the variants for which there are no actual variant playlist. In this case 360p even it is listed in Master M3U8.

But we are experiencing that JWPlayer sometime showing double video length. For example if 720p video length is 21:15 min. It sometime shows 42:15 min. It is not only showing video length wrongly but also playing it twice. This does not happen every time but happens often.

When we remove the non existing 360p link from Master M3U8 all goes fine. To reproduce it you can take a Master Playlist file with two variants and do not generate one of them and try to play it using JWPlayer.

JWPlayer version: 6.10.4906
JWPlayer Config:

(function(player, $) {
"use strict";

var TestPage = {
playerContainer: 'playerContainer',
alertStack: $("#playButton"),
bindEvent: function() {
this.alertStack.bind('click',this.playHLS);
},
playHLS: function() {

var hlsUrl = $('#hlsUrl').val();

player(this.playerContainer).setup({
aspectratio: "16:9",
width: "100%",
height:"400px",
autostart: true,
title: "",
androidhls: true,
playlist: [ {
sources: [ {
file: hlsUrl
} ]
} ]
});
},
init: function() {

this.bindEvent();
this.playHLS();
}
}

TestPage.init();

})(jwplayer, jQuery);

devops

User  
0 rated :

Another thing I forgot to mention that JWP not only shows the doubled video duration but also plays it twice. To clarify the issue, I am describing it more elaborately.

Our Scenario:
We are generating multi-bitrate HLS live stream and playing it with JWP. Generated m3u8 looks like the one posted above in the original post. When we push both variants, JWP behaves normally. But if we push only one variant, say 720p, while the other variant, 360p's entry is there in master m3u8 but the actual variant m3u8 doesn't exist, then this behavior happens.

Expected Behavior:
We expected that JWP will ignore the variants for which there are no actual variant playlist. In this case the 360p stream should be ignored since its m3u8 is non-existent, even it is listed in master m3u8.

Current Behavior:
But we are experiencing that JWPlayer is sometimes showing double video length. For example if 720p video length is 21:15 min. It sometime shows 42:15 min. It is not only showing video length wrongly but also playing it twice. This does not happen every time but happens often.

Steps to Reproduce:
Please go to http://streaming.sandbox2000.com/ and press play button for several time. You should see the problem.

JWPlayer version: 6.10.4906
JWPlayer Config:

(function(player, $) {
"use strict";

var TestPage = {
playerContainer: 'playerContainer',
alertStack: $("#playButton"),
bindEvent: function() {
this.alertStack.bind('click',this.playHLS);
},
playHLS: function() {

var hlsUrl = $('#hlsUrl').val();

player(this.playerContainer).setup({
aspectratio: "16:9",
width: "100%",
height:"400px",
autostart: true,
title: "",
androidhls: true,
playlist: [ {
sources: [ {
file: hlsUrl
} ]
} ]
});
},
init: function() {

this.bindEvent();
this.playHLS();
}
}

TestPage.init();

})(jwplayer, jQuery);

Andrew

JW Player Support Agent  
0 rated :

Again, we’ll need a link that shows this behavior if possible.

devops

User  
0 rated :

I have posted it already
Please go to http://streaming.sandbox2000.com/ and press play button for several time. You should see the problem.

Andrew

JW Player Support Agent  
0 rated :

Oops. Sorry for missing that. Is there any way that you can upgrade this to 6.12? This was just released to self-hosted channels. We’ve made some massive improvements to HLS since 6.10. Let me know if the issue persists!

devops

User  
0 rated :

I have upgraded JWPlayer as your suggestion and tested it. Now it is showing video length fine but it shows 404 error for non existing variant (in this case the low variant). If I click play button for several times it loads and play the high variant but the loading spinner does not disappear. You can check this from same link given above. Thanks

Andrew

JW Player Support Agent  
0 rated :

Thanks for the information. I’ve passed this over to our player team to see if we can handle this in a more graceful way in the future.

devops

User  
0 rated :

When will this bug get resolved? Any timeline?

Andrew

JW Player Support Agent  
0 rated :

At this point, this is a feature request to deal with an error in a more graceful way. The current workaround would be to use a single quality stream rather than a manifest with one functional stream.

This question has received the maximum number of answers.