androidx / androidx/media

Problem getting video-only samples from custom SampleStream

Open
#2,753 2 comments 0 reactions 1 assignee View on GitHub

@tonihei is already working on this.

Since Sep 5, 2025.

question
Dominant language
Java
Stars
3k
Forks
955
Avg merge
12d 14h
Merged PRs (30d)
2

Description

1. Overview

We recently released Media3 DataSource example for our own SLDP low latency streaming protocol. SLDP is a WebSockets-based protocol that we made back in 2017 as a replacement for RTMP which was being discontinued by Adobe at the time. The backend for SLDP protocol is Nimble Streamer, our software media server for video/audio streaming.

We decided to open its source to allow our customers having better adoption via Media3 and opened its implementation as a DataSource: https://github.com/Softvelum/sldp-media3-exo-plugin

We have an issue with video-only mode. Kristina Simakova advised us to post a question here in case there is some solution from Media3 team.

2. Problem Description

Playback is not started if stream is video-only. Both video+audio and audio-only streams work fine.

3. Reproduction

a. Fork sldp-media3-exo-example

b. In ExoScreen.kt disable audio track:

trackSelector.setParameters(
        trackSelector.parameters
            .buildUpon()
            .setDisabledTrackTypes(setOf(C.TRACK_TYPE_AUDIO))
    )

c. First video frame is displayed, but playback is not started.

4. Stream Availability

Test stream URL is wss://demo-nimble.softvelum.com/live/bbb
Same stream using VP8 codec wss://demo-nimble.softvelum.com/live/bbb-360p-25fps-vp8
Same stream via HLS https://demo-nimble.softvelum.com/live/bbb-360p/playlist.m3u8

5. Analysis & Observations

Our understanding of ExoPlayer's behavior in this scenario is as follows:

  • a. SldpMediaSource downloads the manifest and returns available tracks via getTrackGroups callback. We use 2 track groups for video and audio.
  • b. ExoPlayer picks desired tracks via selectTracks then calls readData method of SldpSampleStream instance.
  • c. It appears ExoPlayer in case if single video track is available read first 16 frames and doesn't call readData anymore.

6. Questions for the ExoPlayer Team

What would be the right way to provide video-only samples from SampleStream implementation?

Thank you for your time and assistance.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.