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

Streaming consecutive videos with different aspect ratios

I have a stream from Wowza which is essentially a live stream, except it is playing stored videos according to a schedule. There is a mixture of SD and HD videos, which means that there are two different aspect ratios in the stream. I have the JWPlayer aspectratio set to 16:9 (which I understand can't be changed after the player has loaded), and stretching is uniform.

If the player is loaded while an SD video is playing, it will look fine, but if an HD video follows it, it is squeezed into the same dimensions as the SD video, and is thus distorted. And the opposite is true also: If the player is loaded while an HD video is playing, it fills the player and looks great, but then if an SD video follows, it will be stretched into the dimensions of an HD video. Then if the page is refreshed, all is well again.

Is this an issue of metadata, and does JWPlayer only gather metadata when the player is loaded? I think I have Wowza configured to send metadata for each video, but that doesn't seem to be helping.

Any guidance would be appreciated!

3 Community Answers

Cooper Reid

JW Player Support Agent  
0 rated :

Do the Low Quality and the HD versions have the same aspect ratio?


0 rated :

No, that's the problem. Also, these are not different versions of the same video, it's just that some of the videos are 16:9 HD videos and some are 4:3 SD videos, but they're in the same stream.

Cooper Reid

JW Player Support Agent  
0 rated :

It sounds like you’ll need to rebuild the player after the first SD video is complete, passing in a new 16:9 aspect ratio. Check out the API’s onComplete function:

function setupVideo(file, aspect) {
file: file,
aspectratio: aspect
jwplayer().onComplete(function() { setupVideo(fileName, aspectRatio); });

This question has received the maximum number of answers.