ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

Some vorbis files does not play in ogg container

Open Tolriq opened this issue 3 years ago • 8 comments
trafficstars

ExoPlayer Version

2.18.1

Devices that reproduce the issue

All

Devices that do not reproduce the issue

None

Reproducible in the demo app?

Yes

Reproduction steps

Play the attached file

Expected result

The media should play.

From my understanding after some research, it seems that this file also embed a "fake" Theora track that stream the cover. But the file have a valid Vorbis track that plays normally on other players.

The ogg parser should support those file and only return the Vorbis tracks, specially when providing a music only player.

Actual result

2022-08-03 10:25:55.919 Error/ExoPlayer: playerFailed [eventTime=3707.62, mediaPos=0.00, window=3, period=3, errorCode=ERROR_CODE_PARSING_CONTAINER_UNSUPPORTED com.google.android.exoplayer2.ExoPlaybackException: Source error at com.google.android.exoplayer2.ExoPlayerImplInternal.handleIoException(ExoPlayerImplInternal.java:632) at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:602) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.os.HandlerThread.run(HandlerThread.java:67) Caused by: com.google.android.exoplayer2.source.UnrecognizedInputFormatException: None of the available extractors (Mp3Extractor, FlacExtractor, OggExtractor, WavExtractor, MatroskaExtractor, Mp4Extractor, FragmentedMp4Extractor) could read the stream. at com.google.android.exoplayer2.source.BundledExtractorsAdapter.init(BundledExtractorsAdapter.java:92) at com.google.android.exoplayer2.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:1017) at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:412) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:920)

Media

01 - Living In A Ghost Town.ogg.zip

Bug Report

  • [ ] You will email the zip file produced by adb bugreport to [email protected] after filing this issue.

Tolriq avatar Aug 03 '22 08:08 Tolriq

I can reproduce the issue - I suspect (haven't verified) that OggExtractor.sniff() is returning false for this file.

icbaker avatar Aug 03 '22 09:08 icbaker

@icbaker Is there some docs published (apart from the standard Javadoc) about extractors and writing our own?

Got more and more request to support DSD / DSF so I think I'll have to write a DSF extractor and might look too at this Ogg multitrack issue, but don't really know where to start about the link between extractors and track counts / selection.

Tolriq avatar Aug 10 '22 09:08 Tolriq

Bump on this one I got more and more report about this :(

Tolriq avatar Sep 20 '22 18:09 Tolriq

@Tolriq I'll take a look on this issue in this week. Thank you for your patience.

rohitjoins avatar Sep 20 '22 19:09 rohitjoins

It seems we have an issue for this enhancement. I will close this one, so that we can track it in one place. Will check if we can pick this up for our next release.

Duplicate of #4970

rohitjoins avatar Sep 21 '22 01:09 rohitjoins

@rohitjoins This is not the same issue.

This one is a music only file with an unwanted theora track that is unluckily first . The goal is not to support the still image theora track, it's to be able to play the valid vorbis track. This is a much simpler need to do what you do on other multi track containers.

Tolriq avatar Sep 21 '22 05:09 Tolriq

@Tolriq It seems we are not able to able to parse a file which contains theora track and hence cannot play this media. I understand that ignoring theora track and only playing vorbis track should be simpler than supporting theora track but still requires us to find a way to do so.

If you feel this is urgent, please feel free to send a PR as I couldn't find an easy way to ignore theora tracks from .ogg files.

rohitjoins avatar Sep 21 '22 13:09 rohitjoins

@rohitjoins I tried to look quickly into it, but I lack documentation about the extractors handling of multiple tracks in files.

I asked earlier in this issue but got no answer. Javadoc is hard to follow about how and when track information is passed in / out.

Current ogg extractor only support single track but ogg container can have multiple tracks.

According to https://xiph.org/vorbis/doc/oggstream.html all initial pages must appear before any data page. So it's more about having the sniff check the next page to see if it's another initial page and see if it's supported. That's easy.

But then no idea how to report the multiple tracks and get the info later to start at the proper page. There's nearly all already in from what I see, just check the next(s) initial pages and map the tracks to that initial page.

Tolriq avatar Sep 21 '22 14:09 Tolriq

Can someone please take 1 min to answer my questions about extractors and multi tracks so I can do the PR and stop getting those kind of reviews?

image

Tolriq avatar Nov 22 '22 06:11 Tolriq

So I decided to leave the track numbering and attribution to the one who will implement Theora support.

Opened that properly ignore invalid track and allow playing of the first valid one. https://github.com/google/ExoPlayer/pull/10807

Tolriq avatar Nov 22 '22 20:11 Tolriq