Skip to content

Support Ogg files with multiple tracks #2876

@MSOB7YY

Description

@MSOB7YY

Version

Media3 1.8.0

More version details

some ogg files (created from flac with libvorbis) are not playing at all, sometimes showing "(0) Source Error"
i have all extensions enabled, and DefaultRenderersFactory.EXTENSION_RENDERER_MODE_PREFER is set

my dependencies section:

dependencies {
    def extensions_version = "1.8.0"
    implementation "androidx.media3:media3-decode-av1:$extensions_version" // av1 extension
    implementation "androidx.media3:media3-decode-ffmpeg:$extensions_version" // ffmpeg extension
    implementation "androidx.media3:media3-decode-flac:$extensions_version" // flac extension
    implementation "androidx.media3:media3-decode-iamf:$extensions_version" // iamf extension
    implementation "androidx.media3:media3-decode-opus:$extensions_version" // opus extension
    implementation "androidx.media3:media3-decode-vp9:$extensions_version" // vp9 extension
    implementation "androidx.media3:media3-extractor:$extensions_version"
    def exoplayer_version = "1.8.0"
    implementation "androidx.media3:media3-exoplayer:$exoplayer_version"
    implementation "androidx.media3:media3-exoplayer-dash:$exoplayer_version"
    implementation "androidx.media3:media3-exoplayer-hls:$exoplayer_version"
    implementation "androidx.media3:media3-exoplayer-smoothstreaming:$exoplayer_version"
    implementation "androidx.annotation:annotation:1.8.1"
}

i'm using v1.8.0 but i also tried v1.9.0-alpha01 with the same results

how the files where created:

def convert_flac_to_ogg(flac_path, ogg_path, quality=8):
    os.makedirs(os.path.dirname(ogg_path), exist_ok=True)
    command = [
        "ffmpeg",
        "-i", flac_path,
        "-c:a", "libvorbis",
        "-qscale:a", str(quality),
        ogg_path
    ]
    print(f"Converting: {flac_path} -> {ogg_path}")
    subprocess.run(command, check=True)

ps: file plays normally using mpv

Devices that reproduce the issue

  • Redmi Note 10 (Android 11)
  • Redmi Note 14 Pro (Android 14)
  • (probably not device related)

Devices that do not reproduce the issue

none

Reproducible in the demo app?

Yes

Reproduction steps

  1. Play any file from the sample below
  2. no sound or progress

Expected result

should play normally

Actual result

player just stalls, no progress or sound, sometimes showing "(0) Source Error"

Media

https://github.com/user-attachments/files/19930802/1973.-.Ring.Ring.zip

Bug Report

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions