TheWidlarzGroup / react-native-video

A <Video /> component for react-native
https://docs.thewidlarzgroup.com/react-native-video/
MIT License
7.23k stars 2.91k forks source link

build exoplayer with FFMPEG extension #3106

Open fgortiz opened 1 year ago

fgortiz commented 1 year ago

Is there a documented way to implement the ExoPlayer FFmpeg extension for this project?

freeboub commented 1 year ago

No, currently it is not possible. Exoplayer changed how they support it so now it is mandatory to build from exoplayer source. I think a patch in graddle is mandatory

fgortiz commented 1 year ago

In lieu of that, is there a list of audio codecs ExoPlayer (and therefore, RNV alpha) supports out of the box?

freeboub commented 1 year ago

Not so easy :) The list of codec supported by exoplayer: https://exoplayer.dev/supported-formats.html But it can also depend of the android integration / version ...

freeboub commented 5 months ago

I created a PR to build the app from exoplayer source here: https://github.com/TheWidlarzGroup/react-native-video/pull/3932 It shall be a first step to build exoplayer with gstreamer !

polaris018 commented 3 weeks ago

+1

freeboub commented 2 weeks ago

If someone need to implement it, here are the requiered steps

1/ build your app from expoplayer Sources. it is documented in react native video doc. 2/ you need to enable ffmpeg in the app: This is documented here: https://github.com/androidx/media/blob/release/libraries/decoder_ffmpeg/README.md The first step is to allow building ffmpeg and to link it with exoplayer I was able to reach these steps (I know it is possible to do it.) 3/ patch react native video to enable ffmpeg support. This is the last section of the doc: " Using the module with ExoPlayer" the code change should be in function:

private MediaSource buildMediaSource(Uri uri, String overrideExtension, DrmSessionManager drmSessionManager, long cropStartMs, long cropEndMs) {

but, please validate it as a POC first I let see together the api changes to implement is needed ! Thank you