Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some vorbis files does not play in ogg container #10502

Open
1 task
Tolriq opened this issue Aug 3, 2022 · 10 comments
Open
1 task

Some vorbis files does not play in ogg container #10502

Tolriq opened this issue Aug 3, 2022 · 10 comments

Comments

@Tolriq
Copy link
Contributor

Tolriq commented Aug 3, 2022

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.
@icbaker
Copy link
Collaborator

icbaker commented Aug 3, 2022

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

@icbaker icbaker assigned rohitjoins and unassigned icbaker Aug 3, 2022
@Tolriq
Copy link
Contributor Author

Tolriq commented Aug 10, 2022

@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
Copy link
Contributor Author

Tolriq commented Sep 20, 2022

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

@rohitjoins
Copy link
Contributor

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

@rohitjoins
Copy link
Contributor

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

@Tolriq
Copy link
Contributor Author

Tolriq commented Sep 21, 2022

@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.

@rohitjoins
Copy link
Contributor

@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.

@Tolriq
Copy link
Contributor Author

Tolriq commented Sep 21, 2022

@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
Copy link
Contributor Author

Tolriq commented Nov 22, 2022

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
Copy link
Contributor Author

Tolriq commented Nov 22, 2022

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.
#10807

@Tolriq Tolriq mentioned this issue Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants