omarica / androidtv-rapid-iptvplayer

A fast minimalist IPTV player for Android TV using Exoplayer and Firebase Database.
Apache License 2.0
11 stars 8 forks source link

White screen #2

Open matheusccarvalho opened 3 years ago

matheusccarvalho commented 3 years ago

Hello, when I start the application is only a white screen, nothing more. Would you help me ?

0m4ric4 commented 3 years ago

Hey @matex56, could you confirm that you have a Firebase project linked to the application properly? (You just need to paste the 'google-services.json' file that you get when you create a Firebase project to the 'app' folder) And then, you have to be having a Realtime Database like the following one:

image

Please let me know if you still have a problem 👍🏼

matheusccarvalho commented 3 years ago

Could you export your .json from the Realtime Database and send it to me, please?

0m4ric4 commented 3 years ago

Sure.

sample.json.zip

matheusccarvalho commented 3 years ago

Thanks, now I got it! Would I be able to generate a stream in VLC with a video and put it in the firebase? I was looking for IPTV apps with udp multicast, but I didn't find any

0m4ric4 commented 3 years ago

No problem. Actually yes, the application is based on exoplayer2 and it does support UDP Multicast, but the current code is not doing so.

I made some modifications to the VideoActivity.java: https://gist.github.com/omarica/7203149eb007d4ff9860d02fb2970049

In particular, in the play() function I modified the MediaSource. I haven't tried to run it, but please try and let me know

matheusccarvalho commented 3 years ago

In the new videoactivity.java, you are giving this error. Do you know what it can be?

F001

0m4ric4 commented 3 years ago

It's working fine with me, it seems like an import issue is the package name correct?

matheusccarvalho commented 3 years ago

The package name is correct, the error is pointing to the <> of List channels

matheusccarvalho commented 3 years ago

I deleted the videoactivity.java from before and put the new one you gave me

0m4ric4 commented 3 years ago

I apologize, there has been some error on my part. I updated the gist: https://gist.github.com/omarica/7203149eb007d4ff9860d02fb2970049 It should be working now.

Also, make sure you're using Java 1.8 since the code uses Lambda Expressions: File -> Project Structure Source Compatibility and Target Compatibility to Java 1.8.

image

matheusccarvalho commented 3 years ago

Have you tested multicast udp? I put a .ts video on the vlc, generating a stream with an ip and local port that I unlocked on my router. However, there was no result

0m4ric4 commented 3 years ago

I haven't tried. Check out exoplayer's documentation: https://exoplayer.dev/media-sources.html Modifying the media source is the way to go

0m4ric4 commented 3 years ago

Also, have a look at this resource: https://medium.com/@jatinmishra27/playing-udp-stream-in-exoplayer2-55ea3ea6e1db

matheusccarvalho commented 3 years ago

Were you able to reproduce something? Would you help me ? I'm putting a link in firebase but it doesn't reproduce anything F003

matheusccarvalho commented 3 years ago

the streams .json file inside assets, do I need to modify it?

0m4ric4 commented 3 years ago

the streams .json file inside assets, do I need to modify it?

No, this file isn't used anymore. Only through Firebase

0m4ric4 commented 3 years ago

Were you able to reproduce something? Would you help me ? I'm putting a link in firebase but it doesn't reproduce anything F003

Unfortunately, I don't have an environment ready to test Multicast UDP.

If you're on the same local network, and can confirm the stream is working through another player Then see the logs when you open the stream on the app, and see where it's going wrong

matheusccarvalho commented 3 years ago

I put an H.264 + MP3 (TS) file to generate a stream in VLC and tried to put this url in the firebase.

this was my debug tab with the following url without firebase: "udp: //@224.2.2.2: 1234"

W/ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@2a2a757 W/om.omarica.ipt: Accessing hidden method Landroid/media/AudioTrack;->getLatency()I (greylist, reflection, allowed) I/ExoPlayerImpl: Init ac53cd4 [ExoPlayerLib/2.10.4] [generic_x86, sdk_google_atv_x86, Google, 29] D/EGL_emulation: eglMakeCurrent: 0xcd3de540: ver 3 0 (tinfo 0xe42317b0) E/ExoPlayerImplInternal: Source error. com.google.android.exoplayer2.upstream.UdpDataSource$UdpDataSourceException: java.net.SocketTimeoutException: Poll timed out at com.google.android.exoplayer2.upstream.UdpDataSource.read(UdpDataSource.java:177) at com.google.android.exoplayer2.upstream.StatsDataSource.read(StatsDataSource.java:91) at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFromDataSource(DefaultExtractorInput.java:260) at com.google.android.exoplayer2.extractor.DefaultExtractorInput.advancePeekPosition(DefaultExtractorInput.java:135) at com.google.android.exoplayer2.extractor.DefaultExtractorInput.peekFully(DefaultExtractorInput.java:116) at com.google.android.exoplayer2.extractor.DefaultExtractorInput.peekFully(DefaultExtractorInput.java:126) at com.google.android.exoplayer2.extractor.ts.TsExtractor.sniff(TsExtractor.java:191) at com.google.android.exoplayer2.source.ProgressiveMediaPeriod$ExtractorHolder.selectExtractor(ProgressiveMediaPeriod.java:1047) at com.google.android.exoplayer2.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:947) at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:381) 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:919) Caused by: java.net.SocketTimeoutException: Poll timed out at libcore.io.IoBridge.poll(IoBridge.java:682) at java.net.PlainDatagramSocketImpl.doRecv(PlainDatagramSocketImpl.java:150) at java.net.PlainDatagramSocketImpl.receive0(PlainDatagramSocketImpl.java:141) at java.net.AbstractPlainDatagramSocketImpl.receive(AbstractPlainDatagramSocketImpl.java:164) at java.net.DatagramSocket.receive(DatagramSocket.java:847) at com.google.android.exoplayer2.upstream.UdpDataSource.read(UdpDataSource.java:175) at com.google.android.exoplayer2.upstream.StatsDataSource.read(StatsDataSource.java:91)  at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFromDataSource(DefaultExtractorInput.java:260)  at com.google.android.exoplayer2.extractor.DefaultExtractorInput.advancePeekPosition(DefaultExtractorInput.java:135)  at com.google.android.exoplayer2.extractor.DefaultExtractorInput.peekFully(DefaultExtractorInput.java:116)  at com.google.android.exoplayer2.extractor.DefaultExtractorInput.peekFully(DefaultExtractorInput.java:126)  at com.google.android.exoplayer2.extractor.ts.TsExtractor.sniff(TsExtractor.java:191)  at com.google.android.exoplayer2.source.ProgressiveMediaPeriod$ExtractorHolder.selectExtractor(ProgressiveMediaPeriod.java:1047)  at com.google.android.exoplayer2.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:947)  at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:381)  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:919) 

matheusccarvalho commented 3 years ago

this debug log was running endlessly, do you know what it could be? ![Uploading F008.png…]()

omarica commented 2 years ago

The repository is now updated. Could you try using one of these streams? https://github.com/Eyevinn/http-streaming-samples