Skip to content
This repository has been archived by the owner on Jan 12, 2019. It is now read-only.

First segment loaded but video never plays #1179

Closed
mlumbroso opened this issue Jun 25, 2017 · 12 comments
Closed

First segment loaded but video never plays #1179

mlumbroso opened this issue Jun 25, 2017 · 12 comments

Comments

@mlumbroso
Copy link

Description

Hello and thanks for this great plugin (I saw lots of exciting improvements to come, it's amazing)

My issue is I can't play some videos transcoded through Amazon Elastic Transcoder.
I can play them with no issues using Chrome native hls playback extension which uses hls.js under the hood.

You can see a reduced test case here, first segment is loaded but video never starts to play.

Sources

General Playlist : https://dezmjwlmbthdd.cloudfront.net/hls/9f53f380-19cf-45e1-822d-55f582159f75.m3u8
600k stream : https://dezmjwlmbthdd.cloudfront.net/hls/600k/9f53f380-19cf-45e1-822d-55f582159f75.m3u8

Checked both of them on http://inspectstream.theoplayer.com/ couldn't figure out if anything was wrong...

Steps to reproduce

Explain in detail the exact steps necessary to reproduce the issue.

  1. Open https://jsbin.com/sokapujetu/1/edit?html,output
  2. Click Play

Results

Expected

Video should start.

Error output

None

videojs-contrib-hls version

5.5.3 and 5.6.0

videojs version

5.16.0

Browsers

Reproduced on :
_ Windows 10 Chrome 59 + Firefox 54
_ Mac OS X El Capitan Chrome 59

It's working on OS X El Capitan Safari though (don't know if because of HLS native support).

Thanks for your help, tell me if there is anything I can do to assist in fixing, I'm not that conversant with the subtleties of HLS, but can definitely run some more testing if necessary :)

@mlumbroso mlumbroso changed the title First segment loaded but $video First segment loaded but video never plays Jun 25, 2017
@samueleastdev
Copy link

I feel like our issue is related.

Tested with this url this will work up to version 5.5.0 but doesn't work in version 5.6.0

Example here: http://jsbin.com/gavunimaku/1/edit?html,output

Simply switch the version in the url to see the error.

Thanks

@mjneil
Copy link
Contributor

mjneil commented Jun 26, 2017

It looks like the issue started happening after this merge #1099

@mjneil mjneil added the bug label Jun 26, 2017
@samueleastdev
Copy link

Just to update tested with 5.7.0 latest release and this still seems to be happening sometimes it will work and then it will stall again.

To test Example here: http://jsbin.com/gavunimaku/1/edit?html,output
Keep clicking run with js then click play.

version 5.5.0 will always play version 5.7.0 will play and then sometimes stall.

Thanks

@mlumbroso
Copy link
Author

mlumbroso commented Jun 28, 2017

Hey @samueleastdev , what I can see in addition, I think some behaviors you describe might be due to cache (the fact it's working sometimes with 5.7.0 seems to be)

5.7.0 : https://output.jsbin.com/hijexaz : when I first open without cache it never works. If I try after 5.5.0 which is working and loading the video, and then try to open back 5.7.0 then I can only get the sound (no video). If I do a hard refresh it stops working though, it must be related to the segments being cached when we open a working version => Please note this only happens for me on Chrome (Win 10), on Firefox it's constantly not working.

5.6.0 https://output.jsbin.com/hijexaz/1 : same behaviour as 5.7.0
5.5.0 https://output.jsbin.com/hijexaz/2 : working consistently

@mlumbroso
Copy link
Author

Hi,
Anything we can do to help fix the issue ?
Thanks :)

@mjneil
Copy link
Contributor

mjneil commented Jul 10, 2017

I'm currently working on a fix for this, stay tuned

@mjneil
Copy link
Contributor

mjneil commented Jul 10, 2017

@mlumbroso technically, the audio only fix does not address your issue, you just happened to expose the audio only issue indirectly. Your specific source has issues with the video not appearing when using the master m3u8 because the 600k stream only has audio codec information CODECS="mp4a.40.2" vs the other streams which have both video and audio CODECS="avc1.4d0016,mp4a.40.2". If the 600k stream is selected first, the player is going to think the stream only contains audio and will setup an audio only buffer. Including the video codec in there as well should solve your problems

@mjneil
Copy link
Contributor

mjneil commented Jul 12, 2017

This has been fixed by #1195 please update to videojs-contrib-hls v5.8.1 to start using the changes. If you still experience issues please open a new issue.

@mjneil mjneil closed this as completed Jul 12, 2017
@samueleastdev
Copy link

Awesome thanks, @mjneil ;) not sure whether this issue might be related.

videojs/video.js#4483

I haven't tested in IE ill run some tests today.

Thanks

@mlumbroso
Copy link
Author

Hi,
Thanks for the fix.

Just tested it here : https://jsbin.com/mexiyehepo/1/edit?html,output

It fixed the audio, but not the video that was working with 5.5.0 and then stopped working (see here : https://jsbin.com/mexiyehepo/2/edit?html,output )

Maybe there is the same issue for video codecs as per audio codecs ?

@mjneil
Copy link
Contributor

mjneil commented Jul 18, 2017

@mlumbroso did you see my previous comment regarding the CODECS specified in the manifest? Since one of your manifests only contains an audio codec, we treat it as an audio only source, and will not create video source buffers or append any video data. If I edit the CODEC attribute to also include a video codec, video plays just fine

@mlumbroso
Copy link
Author

mlumbroso commented Aug 7, 2017

Sorry, forgot to update you about this.
Thanks a lot for the investigation, thought the 2 issues were related in the first place, hence my question. This is actually a bug in Amazon Elastic Transcoder on their 600k preset with setting baseline, I've reported it to them. Thanks for your help and keep up the great work here :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants