Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HLS play error - hang in transmuxing #1449

Closed
PrasannaLearnyst opened this issue May 26, 2018 · 18 comments
Closed

HLS play error - hang in transmuxing #1449

PrasannaLearnyst opened this issue May 26, 2018 · 18 comments
Assignees
Labels
status: archived Archived and locked; will not be updated type: external An issue with an external dependency; not our issue; sometimes kept open for tracking

Comments

@PrasannaLearnyst
Copy link

What version of Shaka Player are you using?
Tested in the latest code and also in https://shaka-player-demo.appspot.com

Can you reproduce the issue with our latest release version?
Yes

Can you reproduce the issue with the latest code from master?
Yes

Are you using the demo app or your own custom app?
Demo app

What browser and OS are you using?
Chrome desktop browser MAC

What are the manifest and license server URIs?
URL1: https://s3-ap-southeast-1.amazonaws.com/learnyst/testfolder/sample/expresshls/hls.m3u8
URL2: https://s3-ap-southeast-1.amazonaws.com/learnyst/testfolder/sample/expresshls/hls1.m3u8

What did you do?
If we play using URL2 then we get error
Shaka Error MANIFEST.HLS_MASTER_PLAYLIST_NOT_PROVIDED ()
so the EXT-X-ENDLIST fro the hls1.m3u8 file

Creating new file without EXT-X-ENDLIST which is URL1 (hls.m3u8)
If we play using URL1 then, the video is played only for two seconds and stopped.

@PrasannaLearnyst PrasannaLearnyst changed the title HLS play error HLS play error - EXT-X-ENDLIST Support May 28, 2018
@ismena
Copy link
Contributor

ismena commented May 29, 2018

Hi @PrasannaLearnyst, thanks for reporting!
EXT-X-ENDLIST tag is a Media playlist tag and should not be part of the Master Playlist, so removing it is the right thing to do.

Regarding the playback getting stuck after 2 seconds, it looks the third segment somehow gets stuck in transmuxing and thus hangs the playback.
I tried it in Edge (as an example of a browser that has native support for ts) and it works.
@michellezhuogg could you advise on transmuxing, please?

@ismena ismena added type: bug Something isn't working correctly and removed needs triage labels May 29, 2018
@shaka-bot shaka-bot added this to the v2.5 milestone May 29, 2018
@PrasannaLearnyst
Copy link
Author

PrasannaLearnyst commented May 30, 2018

Hi @ismena,
Thank you for the response.
I have checked with chrome (Android) native player, its playing the video.
Can you please advice on this?

@ismena
Copy link
Contributor

ismena commented May 30, 2018

I don't think anything's wrong with the content. The notes I left are for other members of my team, so if someone other than me picks this up, they know what's already been done.

I think the problem is either on mux.js side (the open source library we use for transmuxing) or in our integration with them. We will investigate further and reach out to mux.js developers if need be.

@PrasannaLearnyst
Copy link
Author

@ismena ,

It will be helpful, thanks

@joeyparrish
Copy link
Member

Filed upstream against mux.js: videojs/mux.js#194

@joeyparrish joeyparrish added the type: external An issue with an external dependency; not our issue; sometimes kept open for tracking label Jun 1, 2018
@joeyparrish
Copy link
Member

joeyparrish commented Jun 1, 2018

We think the mux.js bug can be worked around in Shaka Player, effectively converted from a hang into an error, without us waiting for the bug to fixed upstream. We consider that an improvement, but mux.js will ultimately have to fix the bug.

@joeyparrish joeyparrish changed the title HLS play error - EXT-X-ENDLIST Support HLS play error - hang in transmuxing Jun 1, 2018
shaka-bot pushed a commit that referenced this issue Jun 1, 2018
prevents them from letting us know they're finished
transmuxing.

Issue #1449

Change-Id: Icfd4e16a29064783b57ef605228bfda4ca9bb169
@ismena ismena closed this as completed Jun 1, 2018
@ismena ismena reopened this Jun 1, 2018
@PrasannaLearnyst
Copy link
Author

PrasannaLearnyst commented Jun 2, 2018

@ismena @joeyparrish

Hi,
The mux people have replied with the below, can you please guide how to proceed?


It looks like the 3rd segment does not contain any audio data, but the PMT says there is an audio track. Because of this code here https://github.com/videojs/mux.js/blob/master/lib/mp4/transmuxer.js#L1110 the transmuxer is waiting for audio data that is never coming.

You should be able to fix this by setting the remux option to false for the transmuxer.

  this.muxTransmuxer_ = new muxjs.mp4.Transmuxer({
    'keepOriginalTimestamps': true,
    'remux': false
  });

Note that this will result in separate data events for audio and video, which may require other code changes within Shaka.

@ismena
Copy link
Contributor

ismena commented Jun 4, 2018

@PrasannaLearnyst from their explanation, it sounds like the segment states that it has both audio and video, but in fact has only video.
Could you follow up on this with your encoder? (Feel free to join the discussion on the mux.js bug if they introduce new info).

Mux.js devs have given us a hint on how to work around the problem, but it does sound like the content's description of itself is incorrect (based on the info we get from mux.js, unfortunately I'm not an expert on ts).

@PrasannaLearnyst
Copy link
Author

PrasannaLearnyst commented Jun 5, 2018

@ismena the content works fine with chrome native HLS player and also in other players I checked online. I will check with my encoder also, but I think it is also good to fix in shaka player

@joeyparrish
Copy link
Member

Setting 'remux': false doesn't fix it. Instead, I get a MediaSource error from Chrome that says "Initialization segment misses expected aac track". I will follow up with mux.js.

@joeyparrish joeyparrish removed the type: bug Something isn't working correctly label Jun 12, 2018
@PrasannaLearnyst
Copy link
Author

PrasannaLearnyst commented Jun 12, 2018

@joeyparrish , thank you. Looking forward for the fix

@joeyparrish
Copy link
Member

So far, there doesn't seem to be an easy way to fix this in Shaka Player. I've tried a few things, but I've had no luck. I'm hoping for more feedback from mux.js, and possibly a fix from them. For now, this will stay marked as "external".

For a workaround that you can control @PrasannaLearnyst, could you demultiplex your TS content library? This is something you might be able to try with one asset just for testing purposes, and if it works, you could consider what it would take to do that to your entire content catalog.

@shaka-bot shaka-bot removed this from the v2.5 milestone Jun 12, 2018
@ismena
Copy link
Contributor

ismena commented Jun 12, 2018

@PrasannaLearnyst For some reason I have a feeling I've seen a comment from you saying that you checked and was audio in the segment in question after all. Am I imagining things?

(Apologies if I'm confused, but that's a whole different direction of the conversation with mux.js if that's the case).

joeyparrish pushed a commit that referenced this issue Jun 12, 2018
prevents them from letting us know they're finished
transmuxing.

Issue #1449

Change-Id: Icfd4e16a29064783b57ef605228bfda4ca9bb169
@joeyparrish
Copy link
Member

The workaround introduced by @ismena has been cherry-picked for v2.3.9 and v2.4.1.

joeyparrish pushed a commit that referenced this issue Jun 12, 2018
prevents them from letting us know they're finished
transmuxing.

Issue #1449

Change-Id: Icfd4e16a29064783b57ef605228bfda4ca9bb169
@sridhard
Copy link

sridhard commented Jul 6, 2018

@joeyparrish @ismena Any updates on this issue? can we use the master branch? I have seen that you have committed code for this issue

@ismena
Copy link
Contributor

ismena commented Jul 6, 2018

The code I have submitted is to make sure we throw an error in this case instead of hanging.
As for fixing the problem, @joeyparrish, could you give an update on what direction we want to go with this?

@joeyparrish
Copy link
Member

The workaround suggested by mux.js would take serious rearchitecture in Shaka Player, which we don't have the resources to work on right now. We are waiting for a fix from mux.js in videojs/mux.js#194

@joeyparrish
Copy link
Member

Closing this stale external (non-Shaka) issue. If you disagree, please reply with @shaka-bot reopen, and it will be automatically reopened.

@shaka-project shaka-project locked and limited conversation to collaborators Jun 7, 2020
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: external An issue with an external dependency; not our issue; sometimes kept open for tracking
Projects
None yet
Development

No branches or pull requests

5 participants