Skip to content

ExoPlayer 2.14.x support #150

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

Open
sdex opened this issue Apr 21, 2021 · 15 comments
Open

ExoPlayer 2.14.x support #150

sdex opened this issue Apr 21, 2021 · 15 comments

Comments

@sdex
Copy link
Contributor

sdex commented Apr 21, 2021

Hello.
Are there any plans to support the most recent ExoPlayer version (2.13.3) in the future?

@eneim
Copy link
Owner

eneim commented Apr 26, 2021

@sdex Yes. Not only because the new APIs, but also because the old versions are distributed via jcenter, which is soon not available anymore ...

@paulocoutinhox
Copy link

Hi @eneim,

Can you launch a new release with new ExoPlayer?

Thanks.

@eneim
Copy link
Owner

eneim commented May 8, 2021

@paulo-coutinho It is not ready. 2.13.x has too many changes compared to 2.11.x, I need to consume the diff first, before integrating it into the library. Sorry, this is something I can not speed up.

@paulocoutinhox
Copy link

Please @eneim, i see that it is very required in issues. Please update it. Please! Please! Please! rsrsrsrs

@eneim
Copy link
Owner

eneim commented May 13, 2021

@paulo-coutinho Gonna aim for ExoPlayer 2.14.0 instead. It has something I can use to reduce the responsibility of kohii-core. And it comes with RTSP support (https://github.com/google/ExoPlayer/blob/dev-v2/RELEASENOTES.md#2140-2021-05-13).

@paulocoutinhox
Copy link

WOW!!!! NICE!!! Man!!! Great news. Very thanks man.

@eneim
Copy link
Owner

eneim commented May 13, 2021

@paulo-coutinho Thanks. Not that it will be ready at the same time as the release of ExoPlayer 2.14.0, but I'm working on it now :D.

@eneim
Copy link
Owner

eneim commented May 16, 2021

@paulo-coutinho Please try the latest snapshot (version is in the README). It is not 100% yet, please try and see if it fits your need, or report any issue you find. It will help a lot. Thanks.

@candyman15
Copy link

@eneim Hi, I wonder How to use 2.14.0 version. I can't search readme about that. Please tell me

like this

implementation "im.ene.kohii:kohii-core:xxxxx" // core library
implementation "im.ene.kohii:kohii-exoplayer:xxxx" // default support for ExoPlayer
implementation "com.google.android.exoplayer:exoplayer:xxxx" // required ExoPlayer implementation.

@sdex sdex changed the title ExoPlayer 2.13.x support ExoPlayer 2.14.x support May 20, 2021
@xibaca
Copy link

xibaca commented Jun 3, 2021

@candyman15 2.14.0 isn't released yet, you have to use latest snapshot version for that.

implementation "im.ene.kohii:kohii-core:1.3.0.2014000-SNAPSHOT"
implementation "im.ene.kohii:kohii-exoplayer:1.3.0.2014000-SNAPSHOT"
implementation 'com.google.android.exoplayer:exoplayer:2.14.0'

but I noticed that snapshot version of kohii-exoplayer isn't published, so I cloned latest Kohii sources myself, tweaked the build.gradle of kohii-exoplayer and published it to my maven local in order to be able to use it.

The change was simple: I added to kohii-exoplayer/build.gradle the following line at the end of it:

apply from: rootProject.file('gradle/release_maven.gradle')

Then the Gradle task for publishing to maven local became available for publishing this module.

@xibaca
Copy link

xibaca commented Jun 3, 2021

@eneim I have a question - should RTSP support be available out-of-the-box if I use latest Kohii snapshot? Or do you expect users will have to customize the creation of a Kohii instance in order to use it (e.g. passing your own mediaSourceFactory for example).

I'm not being able to get rtsp streams to play when using latest Kohii snapshot as wrapper library whereas I've observed these streams are playing as expected when using latest ExoPlayer 2.14.0 directly (without Kohii).

@eneim
Copy link
Owner

eneim commented Jun 4, 2021

@guilhermesgb I think RTSP will work out of the box. My simplest demo just work well by replacing the mp4 url (from asset) with "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov" (source: https://www.wowza.com/html/mobile.html). Can you check your setup with this url? If your url doesn't work can you share it so I can help investigate?

@eneim
Copy link
Owner

eneim commented Jun 4, 2021

It might be better check the dependency as well, I'm using com.google.android.exoplayer:exoplayer:version to include everything. Maybe you need to adjust that.

@xibaca
Copy link

xibaca commented Jun 4, 2021

@eneim once again thanks for your replies and support.

Thanks for clarifying that it should work out of the box.

I'm having problems with ExoPlayer 2.14.0 itself, it's not playing my live RTSP feeds with underlying H264 video codec as well as I would expect. But using the RTSP url you shared with me worked fine, the ExoPlayer 2.14.0 demo could play it successfully.

When I used the Kohii sample (latest snapshot mapping to ExoPlayer 2.14.0) to also play the rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov feed, it didn't work, though. I got an underlying crash whose log and video capture I'm sharing below.

Latest snapshot I'm using is 5f96d8c, and the only local change I've made is the one I mentioned a few comments above to enable publishing :kohii-exoplayer to mavenLocal (adding apply from: rootProject.file('gradle/release_maven.gradle') to the end of its build.gradle).

I wonder if the same issue is happening to Kohii when I'm using it in my client application, but the release version issues no logs and silently fails without crashing the entire app?

kohii-exoplayer-rtsp-crash.log
kohii-exoplayer-rtsp-crash

@eneim
Copy link
Owner

eneim commented Jun 5, 2021

@guilhermesgb Thanks for the check. It's actually my fault when not including the release script for sub modules. It is fixed now and all the modules are available in the snapshot repo.

Regarding the later issue, I could reproduce it on my end and it seems to be an issue with the "repeat mode" of ExoPlayer. The following patch is what I did that make it works (the video is played). You can pull the latest dev-v1 and apply it to try:

Index: kohii-sample/src/main/java/kohii/v1/sample/ui/combo/ExoVideosAdapter.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- kohii-sample/src/main/java/kohii/v1/sample/ui/combo/ExoVideosAdapter.kt	(revision 01e4661621f2784ae0c86d5f0788f45a342fbf21)
+++ kohii-sample/src/main/java/kohii/v1/sample/ui/combo/ExoVideosAdapter.kt	(date 1622894656006)
@@ -61,10 +61,13 @@
       MediaItem(Uri.parse(item.uri), item.extension, drmItem)
     val itemTag = "${javaClass.canonicalName}::${item.uri}::${holder.adapterPosition}"
 
-    holder.rebinder = kohii.setUp(mediaItem) {
+    holder.rebinder = kohii.setUp(
+        // mediaItem
+        "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov"
+    ) {
       tag = itemTag
       // preLoad = false
-      repeatMode = Player.REPEAT_MODE_ONE
+      // repeatMode = Player.REPEAT_MODE_ONE
       callbacks += object : Callback {
         override fun onRemoved(playback: Playback) {
           playback.removeStateListener(holder)

I'm gonna try to reproduce it using ExoPlayer only and see if it worth an issue on the ExoPlayer library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants