-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Black Screen while move next video in Recycleview #188
Comments
You should change MemoryMode.BALANCED to "MemoryMode.HIGH" |
@lantmtekup Thanks for replay, i have also try with MemoryMode.HIGH but i can't see any changes on output |
Hi @t-yagnesh let me take a look. By the way, is it possible for you to reproduce the issue using the sample code? It is Ok if not, but it is helpful for me to reproduce it though. |
android-recording-14-feb-2023_Ay57jdI0.mp4@eneim i have try with your tiktok-sample you can check in my video, when i scroll to next video every time display black screen [My Expectation] |
@t-yagnesh Thanks. Can you share your device model and Android OS? I will see what can be done and what may affect the settings. And if it is not private, can you share the URL you used in this demo? (You can send them via email if needed -> [email protected]). |
@eneim |
@eneim you can check your sample code apk with my video url, https://drive.google.com/file/d/1ASuimB-9meXDW2KQNdIKSG81Nh3MoohN/view?usp=sharing |
@t-yagnesh First, it seems to work fine on my test (Pixel 6, Android 13). There is of course a blink of black screen where the video frame is pushed when it is visible, but not as bad as your example. kohii_issue_188.mp4I think there are a couple of factors to investigate:
Also:
|
@eneim I am creating social media platform in which any register user can upload video with any format, so i need to always load video from url if possible can you give me example source code regarding this point currently i am using "com.google.android.exoplayer2.ui.PlayerView" in adapter xml
|
What I commented is about finding the root cause. And since you own the video server, please read through the comment, and research about how to optimize the video encoding strategy to make it load faster. In the VideoViewHolder file of the TikTok sample, you can navigate to the layout and find the text "surface_type". Change it to "texture_view". It is a normal Android View component and the "surface_type" is an attribute with predefined values. |
@eneim Got it, Thank you for your support |
hi @eneim i have updated video formate as HLS with m3u8 based on multiple resolutions still i got black screen when i scroll to nextvideo i want to load/prepare upcoming item in recycleview, regarding this i have ask to chatGPT Can you explain me this coding please, i got this example code from chatGPT Code : https://dpaste.org/B4SVa i can't able to add this code i think it's not compatible with latest kohii version |
hi @eneim i have updated video formate as HLS with m3u8 based on multiple resolutions still i got black screen when i scroll to nextvideo i want to load/prepare upcoming item in recycleview, regarding this i have ask to chatGPT Can you explain me this coding please, i got this example code from chatGPT Code : https://dpaste.org/B4SVa i can't able to add this code i think it's not compatible with latest kohii version |
@t-yagnesh Does your issue reproducible using the URLs in this repo (this one --> https://github.com/eneim/kohii/blob/a8ed5788a28f3ed8e4580bcc8f41849bc768ce2c/kohii-sample-tiktok/src/main/assets/caminandes.json)? Because I cannot reproduce the issue with it. If it happens with your videos, then that is definitely the bottleneck. Merely changing the file is not the root cause. Please double check how fast you can download your video using something else. If you have the link to your HLS, I can give it a try, but again please make sure your video is light enough. And also check your network connection and so on. Kohii doesn't help speed up your download speed if it is slow. |
@eneim please check in attached video, i have added first 3 video url from your repo json file android-recording-06-apr-2023_3U0f1hvs.mp4still display black screen while scroll to next video |
@t-yagnesh What you really should do is to get the playback status, or network activity. The 1st and 2nd video has the black frame by itself. And I think you can see in your video that the 3rd, 4th, 5th video start playback instally. I think it is not that the library or the app doesn't work. Even if you download the video before hand, the scroll speed can impact that. Screen.Recording.2023-04-06.at.22.34.35.movI think if you can customize ExoPlayer to download and render it really fast, then you can provide it to the library's Pool to make it work the way you want. If this is the limitation of ExoPlayer, then I cannot do anything better. |
[Current Version]
com.google.android.exoplayer:exoplayer:2.17.1
im.ene.kohii:kohii-core:1.4.0.2017001
im.ene.kohii:kohii-exoplayer:1.4.0.2017001
[Problem]
Black Screen within 2-3 seconds while move next video in Recycleview also same in viewpager
[Expected Result]
Can we Load upcoming video so we can preview immediately without black screen
[Code]
Fragment
FullVideoListAdapter
The text was updated successfully, but these errors were encountered: