libgdx / gdx-video

A libGDX cross platform video rendering extension
Apache License 2.0
147 stars 48 forks source link

Exo player #6

Closed marekhalmo closed 8 years ago

marekhalmo commented 9 years ago

Hello, could you integrate with exoplayer?

Would be awesome to see all the new features (incl. ext codec support)

https://github.com/google/ExoPlayer

RBogie commented 9 years ago

I personally don't have any time for this integration. Maybe later. Of course, if you have an implementation, I would love a PR ;)

marekhalmo commented 9 years ago

Hi,

Thanx for the answer... im just testing the original implementation (a slight mod). Seems to work ok, but some users report missing surface view even for api 19.. i will create an issue when i have more info.

I would like to see ext codecs working with this..

If i have some time i can check if exo player can be integrated.

I can share the code then.. On Jul 27, 2015 8:39 PM, "Rob Bogie" notifications@github.com wrote:

I personally don't have any time for this integration. Maybe later. Of course, if you have an implementation, I would love a PR ;)

— Reply to this email directly or view it on GitHub https://github.com/libgdx/gdx-video/issues/6#issuecomment-125300975.

SonicACCEL commented 9 years ago

I'm really interested in your findings @marekhalmo

I'm looking for the best way to implement video in a LibGDX project that will be deployed to both Android and Windows and do hardware accelerated video decoding on both platforms

For Android ExoPlayer (MediaCodec) is the proper way I believe, but for Intel devices it's done via the VA API

Is using something like GStreamer or VLCJ a recommended solution? Or am I missing something with GDX-Video?

Any advice will be extremely appreciated :)

marekhalmo commented 9 years ago

Hello, sorry i had no time to try this yet.. i'm very busy now..

RBogie commented 9 years ago

@SonicACCEL: The android version is already hardware accelerated. It supports all formats that the normal android media player supports. The computer version currently does not use hardware acceleration, and runs only ogg/theora. However, this is only done because of licensing. If you check the licenses and pay a fee if needed, you can recompile your own ffmpeg to be used by the library. This can be done for ANY codec that ffmpeg has support for. Ffmpeg has several codecs for which it can use hardware acceleration :wink:

I hope this information helps you a bit.

PS: I did have a quick lookthrough the ExoPlayer, and saw that it supports much more formats. Are these hardware accelerated? If so, I'm wondering how...

SonicACCEL commented 9 years ago

@marekhalmo No problem! I look forward to seeing anything developments when you find the time

@Robbiedobbie Thank you for the useful information.

It is good to hear that GDX-Video on Android does all the hardware acceleration. Do you know if this is even the case for Android 4.0 since it used OpenMax instead of MediaCodec?

Interesting about the desktop version.. but it sounds like we can recompile to enable DXVA2 for Windows and support any format?

I wonder if you have ever thought of using LibVLC as the cross platform video solution for LibGDX? It is also available for every platform and is actively being maintained so maybe it might be a useful combination.

RBogie commented 8 years ago

Using LibVLC has been considered when starting to build the library. However, it has no advantages over ffmpeg. Ffmpeg is available on android as well, but hardware acceleration requires us to use the native android media player.

Since implementing exoplayer would require the whole android player to be rewritten, and since the hardware supported media formats won't change anyway, there are no plans to implement this in the foreseeable future. Therefore, I will close this issue now.