这是indexloc提供的服务,不要输入任何密码
Skip to content

MetadataRetriever#retrieveDurationUs hanging #2640

@PaulWoitaschek

Description

@PaulWoitaschek

Version

Media3 pre-release (alpha, beta or RC not in this list)

More version details

1.8.0-rc01

Devices that reproduce the issue

Pixel 7 + Robolectric

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Not tested

Reproduction steps

  1. Create a large aac file (80 hours, > 2gb) (see media)
  2. Parse the duration
  MetadataRetriever.Builder(context, MediaItem.fromUri(uri))
        .build()
        .use {
          it.retrieveDurationUs().await().microseconds
        }

Expected result

It returns with the duration in time

Actual result

It hangs, after 10 minutes of waiting for the future I've given up.

Media

You can generate it using:

ffmpeg -f lavfi -i nullsrc=size=600x600 -filter_complex 'geq=random(1)*255:128:128' -vframes 1 -c:v png -f image2 -y cover.png
ffmpeg -f lavfi -i 'sine=frequency=1000:duration=289008' -i metadata.ffmeta -i cover.png -map 0:a -map_metadata 1 -map 2:v -disposition:v:0 attached_pic -c:a libfdk_aac -b:a 64k -c:v copy -movflags +faststart -y example.m4b

The bug originated here:
PaulWoitaschek/Voice#2896 (comment)

Bug Report

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions