question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

EOF exception comes while running DASH stream with TTML track

See original GitHub issue

ExoPlayer Version

2.17.1

Devices that reproduce the issue

NVDIA shield with Android 11

Devices that do not reproduce the issue

Not tested any other

Reproducible in the demo app?

No

Reproduction steps

Play the mpd , enable track selection parameters to select the text for eng and also enable the undefined language too

Expected result

Media should play successfully

Actual result

When exo player receives the first ttml segment -{mentioned as d1-1.m4s - in the log }, Following error is getting . video is not playing after the first frame . The segment data d1-1.m4s is uloaded in the 'media ’ field below as ttmlDump_org.txt.

MPD is also uploaded in media (renamed as txt in the Media as the xml was not supported)

CM_HttpSendResponse(): Sending AV 1385 Segment Sent =[d1-1.m4s] 963 D NvOsDebugPrintf: NVMEDIA: FrameRate = 59 960 I ACodec : Get OMX_IndexConfigScale: 0x10000/0x10000 960 I ACodec : Scaled Width is 1920, height is 1080 859 E EventLogger: internalError [eventTime=3.74, mediaPos=0.00, window=0, period=0, loadError 859 E EventLogger: java.io.EOFException 859 E EventLogger: at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFromUpstream(DefaultExtractorInput.java:296) 859 E EventLogger: at com.google.android.exoplayer2.extractor.DefaultExtractorInput.skipFully(DefaultExtractorInput.java:107) 859 E EventLogger: at com.google.android.exoplayer2.extractor.DefaultExtractorInput.skipFully(DefaultExtractorInput.java:115) 859 E EventLogger: at com.google.android.exoplayer2.extractor.mp4.FragmentedMp4Extractor.readAtomPayload(FragmentedMp4Extractor.java:457 859 E EventLogger: at com.google.android.exoplayer2.extractor.mp4.FragmentedMp4Extractor.read(FragmentedMp4Extractor.java:336) 859 E EventLogger: at com.google.android.exoplayer2.source.chunk.BundledChunkExtractor.read(BundledChunkExtractor.java:153) 859 E EventLogger: at com.google.android.exoplayer2.source.chunk.ContainerMediaChunk.load(ContainerMediaChunk.java:127) 859 E EventLogger: at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:412) 859 E EventLogger: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 859 E EventLogger: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 859 E EventLogger: at java.lang.Thread.run(Thread.java:923) 859 E EventLogger: ]

Media

ttmlDump_org.txt mpd.txt

Bug Report

  • You will email the zip file produced by adb bugreport to dev.exoplayer@gmail.com after filing this issue.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
icbakercommented, Nov 9, 2022

Thanks for the content, I was able to play it in our demo app by doing two things:

  1. Change the device time to 2021-06-09 21:06 UTC
  2. Hack DashMediaSource to stop it from using an NTP-based time source and use local device time by changing this line: https://github.com/google/ExoPlayer/blob/ab4d37f499ba49bb3cac7938eb03ebf7133ccfe6/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java#L761-L763

To this:

public void onInitialized() {
  onUtcTimestampResolved(System.currentTimeMillis() - SystemClock.elapsedRealtime());
}

I enabled the subtitle track while the content was playing, and saw subtitles appear on the screen.

So it looks like everything is working for me. If you make the same changes to the demo app, do you also see the subtitles?

0reactions
icbakercommented, Nov 18, 2022

If you’re trying to play live content long after it’s aired it should probably be served as VOD content instead? The intricacies of content preparation is out of scope for this issue tracker, but that is generally how I would expect ‘no longer live’ content to be served.

(I thought you were only trying to override the time in order to test some live behaviour to reliably repro this issue - using actually-live streams for repro can be annoying because they keep changing!)

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix the EOFException in Java.io - Rollbar
EOFException is a checked exception in Java that occurs when an end of file or end of stream is reached unexpectedly during input....
Read more >
java.io.EOFException Playing DASH url from Background after ...
I am using r2.2.0 and getting exception while playing video using DASH url .Scenario is while I pressed home button between playing content ......
Read more >
EOFException - Android Developers
Signals that an end of file or end of stream has been reached unexpectedly during input. This exception is mainly used by data...
Read more >
EOFException (Java Platform SE 7 ) - Oracle Help Center
Class EOFException​​ Signals that an end of file or end of stream has been reached unexpectedly during input. This exception is mainly used...
Read more >
When will an EOFException occur in JAVA's streams
Answering another part of your question: Yes, EOF means that no more data will be seen on the stream; ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found