Playback Error - media3 Exoplayer
Version
Media3 main branch
More version details
Playback error
androidx.media3.exoplayer.ExoPlaybackException: Source error
at androidx.media3.exoplayer.ExoPlayerImplInternal.handleIoException(ExoPlayerImplInternal.java:736)
at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:708)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:223)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: androidx.media3.datasource.FileDataSource$FileDataSourceException: java.io.FileNotFoundException: []: open failed: ENOENT (No such file or directory)
at androidx.media3.datasource.FileDataSource.openLocalFile(FileDataSource.java:205)
at androidx.media3.datasource.FileDataSource.open(FileDataSource.java:116)
at androidx.media3.datasource.DefaultDataSource.open(DefaultDataSource.java:275)
at androidx.media3.datasource.StatsDataSource.open(StatsDataSource.java:86)
at androidx.media3.exoplayer.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:1045)
at androidx.media3.exoplayer.upstream.Loader$LoadTask.run(Loader.java:421)
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:923)
Caused by: java.io.FileNotFoundException: []: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:492)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:289)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:152)
at androidx.media3.datasource.FileDataSource.openLocalFile(FileDataSource.java:186)
at androidx.media3.datasource.FileDataSource.open(FileDataSource.java:116)
at androidx.media3.datasource.DefaultDataSource.open(DefaultDataSource.java:275)
at androidx.media3.datasource.StatsDataSource.open(StatsDataSource.java:86)
at androidx.media3.exoplayer.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:1045)
at androidx.media3.exoplayer.upstream.Loader$LoadTask.run(Loader.java:421)
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:923)
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Linux.open(Native Method)
at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:254)
at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7554)
at libcore.io.IoBridge.open(IoBridge.java:478)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:289)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:152)
at androidx.media3.datasource.FileDataSource.openLocalFile(FileDataSource.java:186)
at androidx.media3.datasource.FileDataSource.open(FileDataSource.java:116)
at androidx.media3.datasource.DefaultDataSource.open(DefaultDataSource.java:275)
at androidx.media3.datasource.StatsDataSource.open(StatsDataSource.java:86)
at androidx.media3.exoplayer.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:1045)
at androidx.media3.exoplayer.upstream.Loader$LoadTask.run(Loader.java:421)
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:923)
The issue is media 3 exoplayer. All I did update to the current version. I kept getting this. I changed the version back to 1.3.1 instead of 1.4.0. 1.3.1 works. the new one just crashes on random videos all the video is encoded as h.264.m3u8
Devices that reproduce the issue
Android TV's
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
I click on a video, the video does not play. just sits there spinning.
Expected result
it's supposded to play the video
Actual result
it does nothing in the video
Media
https://itiswritten.tv/api/v2/videos/the-mouth-of-truth
https://itiswrittenvod.akamaized.net/25fe1281-684a-4565-a582-1f082ec44418/ba6a9358-50e8-48ea-9187-c4976bbae3fe/d4a743ca-d185-4d6a-b7f3-22ddc20245b9/video_h264.m3u8
Bug Report
- [ ] You will email the zip file produced by
adb bugreportto [email protected] after filing this issue.
https://itiswrittenvod.akamaized.net/25fe1281-684a-4565-a582-1f082ec44418/ba6a9358-50e8-48ea-9187-c4976bbae3fe/d4a743ca-d185-4d6a-b7f3-22ddc20245b9/video_h264.m3u8
This link works for me in the demo app built at 1.4.0.
The stack trace you've pasted indicates you are using FileDataSource, which only supports the file:// URI scheme for reading local files on the device, but the URIs you have provided are https:// URIs. The stack trace also indicates ProgressiveMediaPeriod is being used, but the URI you've provided is an HLS stream, so I'd expect to see it played with HlsMediaPeriod.
In that sense, the failure you're seeing is expected. But I guess the question is why you are seeing FileDataSource and ProgressiveMediaPeriod being used with 1.4.0.
When it works with 1.3.1, what DataSource and MediaSource implementations are being used?
How are you configuring your ExoPlayer instance, are you customizing the MediaSource or DataSource at all? If not, you will be using DefaultDataSource by default, which has logic to select a DataSource implementation based on the URI scheme, which should only pick FileDataSource when Util.isLocalFile returns true:
https://github.com/androidx/media/blob/b01c6ffcb3fca3d038476dab5d3bc9c9f2010781/libraries/datasource/src/main/java/androidx/media3/datasource/DefaultDataSource.java#L252-L259
And this just checks the scheme for file:// or 'empty-string':
https://github.com/androidx/media/blob/b01c6ffcb3fca3d038476dab5d3bc9c9f2010781/libraries/common/src/main/java/androidx/media3/common/util/Util.java#L462-L465
This logic in DefaultDataSource didn't change between 1.3.1 and 1.4.0.
Hey @gitbritt. We need more information to resolve this issue but there hasn't been an update in 14 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@gitbritt if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.