cachapa / AerialDream

A screensaver for Android inspired on the one from the Apple TV
GNU General Public License v3.0
116 stars 27 forks source link

Screen Saver Freezes on certain videos (404) #44

Open amirHizkiya opened 1 year ago

amirHizkiya commented 1 year ago

Hi,

After running the screen saver for a while I would come back to my TV either being stuck on a black screen or a frozen picture.

Took me a while to investigate, but searching through Logcat it seems as though the app is hitting a 404 on some videos and just bugs out.

Maybe we can we remove those videos from the playlist, but more importantly maybe we can gracefully handle a 404 to just skip to the next video.

Note: I'm still trying to track down the videos, it seems to be coming from either the 2018 4K or 2019 4K playlist. I'll update if I get anymore information. I think one is Los Angeles and one is Hong Kong.

Edit: Note sure where its coming from.

amirHizkiya commented 1 year ago

Maybe this will help.

09-09 11:44:59.145 15437 15455 E ExoPlayerImplInternal: Playback error 09-09 11:44:59.145 15437 15455 E ExoPlayerImplInternal: com.google.android.exoplayer2.ExoPlaybackException: Source error 09-09 11:44:59.145 15437 15455 E ExoPlayerImplInternal: at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:580) 09-09 11:44:59.145 15437 15455 E ExoPlayerImplInternal: at android.os.Handler.dispatchMessage(Handler.java:102) 09-09 11:44:59.145 15437 15455 E ExoPlayerImplInternal: at android.os.Looper.loop(Looper.java:193) 09-09 11:44:59.145 15437 15455 E ExoPlayerImplInternal: at android.os.HandlerThread.run(HandlerThread.java:65) 09-09 11:44:59.145 15437 15455 E ExoPlayerImplInternal: Caused by: com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 404 09-09 11:44:59.145 15437 15455 E ExoPlayerImplInternal: at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.open(DefaultHttpDataSource.java:383) 09-09 11:44:59.145 15437 15455 E ExoPlayerImplInternal: at com.google.android.exoplayer2.upstream.StatsDataSource.open(StatsDataSource.java:84) 09-09 11:44:59.145 15437 15455 E ExoPlayerImplInternal: at com.google.android.exoplayer2.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:1015) 09-09 11:44:59.145 15437 15455 E ExoPlayerImplInternal: at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:415) 09-09 11:44:59.145 15437 15455 E ExoPlayerImplInternal: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 09-09 11:44:59.145 15437 15455 E ExoPlayerImplInternal: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 09-09 11:44:59.145 15437 15455 E ExoPlayerImplInternal: at java.lang.Thread.run(Thread.java:764) 09-09 11:44:59.151 15437 15437 W System.err: com.google.android.exoplayer2.ExoPlaybackException: Source error 09-09 11:44:59.151 15437 15437 W System.err: at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:580) 09-09 11:44:59.151 15437 15437 W System.err: at android.os.Handler.dispatchMessage(Handler.java:102) 09-09 11:44:59.151 15437 15437 W System.err: at android.os.Looper.loop(Looper.java:193) 09-09 11:44:59.151 15437 15437 W System.err: at android.os.HandlerThread.run(HandlerThread.java:65) 09-09 11:44:59.151 15437 15437 W System.err: Caused by: com.google.android.exoplayer2.upstream.HttpDataSource$InvalidResponseCodeException: Response code: 404 09-09 11:44:59.151 15437 15437 W System.err: at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.open(DefaultHttpDataSource.java:383) 09-09 11:44:59.151 15437 15437 W System.err: at com.google.android.exoplayer2.upstream.StatsDataSource.open(StatsDataSource.java:84) 09-09 11:44:59.151 15437 15437 W System.err: at com.google.android.exoplayer2.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:1015) 09-09 11:44:59.152 15437 15437 W System.err: at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:415) 09-09 11:44:59.152 15437 15437 W System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 09-09 11:44:59.152 15437 15437 W System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 09-09 11:44:59.152 15437 15437 W System.err: at java.lang.Thread.run(Thread.java:764)

cachapa commented 1 year ago

Thanks for the report, but this project is in maintenance mode.

If you'd like to submit a fixed playlist I'd be glad to approve though.

amirHizkiya commented 1 year ago

Gotcha. I think the playlists are downloaded direct from Apple so I don't think I have access to them.

cachapa commented 1 year ago

Exactly, so if there are 404 errors, then that either means the playlist is wrong (we might be fetching an old version) or something else is going on.

amirHizkiya commented 1 year ago

Oh. I thought that maybe it was a 404 on the video itself because its not all videos.

cachapa commented 1 year ago

That's what I meant. If some videos are no longer loading, we may be fetching from an old playlist which is pointing to videos that are no longer there.

I doubt Apple is using a playlist where some videos are throwing 404s, so the most likely explanation is that there is a new playlist somewhere which doesn't have that problem.

The issue is that Apple also tends to change their playlist format over time, so it's not guaranteed that the fix will be as simple as updating the playlist URL. Worth a try though.

youngkong10 commented 4 months ago

Hey I use this app all the time on my chromecast and its great, so thanks for making it. I also have these 404 issues and found a couple links that might have more updated versions of the playlists if you are still interested. Hope this is helpful.

https://gist.github.com/theothernt/57a51cade0c12c407f48a5121e0939d5

https://github.com/enen92/screensaver.atv4/pull/55