Skip to content

Live streaming issue when using ExoPlayer version 2.17.0 and above  #10065

Closed

Description

@tpuserhp

I can stream a m3u8 link from my app when using ExoPlayer 2.16.1 libraries,. But when using ExoPlayer 2.17.0 or 2.17.1 libraries, I don't see the streaming from my app. I then use the demo app of 2.12.3 version and can see the streaming. for that link. But when using the demo app of 2.17.0, I don't see the streaming. I would appreciate if the support could review and recommend actions that I can take. I will submit the link later. Thanks .

Activity

  1. tpuserhp commented on Mar 14, 2022

    @tpuserhp
    Author

    I have emailed the link to support for testing. Thanks.

  2. icbaker commented on Mar 14, 2022

    @icbaker
    Collaborator

    Thanks for the link. I tried it with the 2.17.1 demo app and observed that playback never started (player stayed in the buffering state forever). I observed the same behaviour on 2.17.0.

    On the 2.16.1 demo app the playback starts successfully.

    So something seems to have changed between 2.16.1 and 2.17.0. Over to @christosts to take a closer look at this HLS stream.

  3. christosts commented on Mar 25, 2022

    @christosts
    Contributor

    I can verify the problem. I'll try to get a fix in next week.

    Note to self: The loading thread is blocked on TimestampAdjuster.sharedInitializeOrWait() because the first HlsMediaChunk loaded is not a master timestamp source. In 2.16.1 on the other hand, the first chunk loaded is a master timestamp source. I need to check if a load re-ordering has happened between 2.16.1 and 2.17.1.

  4. tpuserhp commented on Mar 25, 2022

    @tpuserhp
    Author

    Thanks for the issue investigation and the update!!!

  5. christosts commented on Mar 28, 2022

    @christosts
    Contributor

    The symptom seems to be related with HLS chunkless preparation which is enabled by default in the 2.17 release. To quickly fix the problem in 2.17, you may instantiate the player with an HLS media source that has chunkless preparation disabled:

    HlsMediaSource.Factory factory = 
      new HlsMediaSource.Factory(dataSourceFactory).setAllowChunklessPreparation(false);
    ExoPlayer player =  
      new ExoPlayer.Builder(context).setMediaSourceFactory(factory).build();

    I still need to check if there is a bug in chunkless preparation or this playlist is incompatible with the feature. I'll update this issue accordingly.

    Information on chunkless preparation on this blog post.

  6. tpuserhp commented on Mar 28, 2022

    @tpuserhp
    Author

    Thank you support for providing the quick fix which works very well . My app is now running release 2.17 with no problem from that playlist. Much appreciated!!

  7. christosts commented on Mar 31, 2022

    @christosts
    Contributor

    Root-causing the issue: the player fails to load/prepare the playlist in chunkless mode because the playlist contains the CODECS attribute but it is missing the audio codec. The player assumes the video variants are prepared but the audio one is not, and the player gets stuck.

    If you have access to the encoding/packaging process, I'd suggest you update how the playlist is created and add the audio codec to CODECS. Then try with chunkless preparation, you might see some improvements in start-up time.

    On the ExoPlayer side, we submitted a fix to detect this case and fall back to traditional preparation. The fix will be available on the next ExoPlayer release.

  8. tpuserhp commented on Mar 31, 2022

    @tpuserhp
    Author
  9. locked and limited conversation to collaborators on May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions