How to use ffmepg extension
💬 Questions and Help
Hi. I'm using ExoPlayerXamarin in my project and everything is OK. But on some devices there is not supported playing mpeg2 audio at hardware level. I know Exoplayer supports playing some audio formats using ffmpeg plugin. But I can't figure out how to use this plugin with ExoPlayerXamarin. I have initialized DefaultRenderersFactory like this:
DefaultRenderersFactory renderersFactory = new DefaultRenderersFactory(this); renderersFactory.SetExtensionRendererMode(DefaultRenderersFactory.ExtensionRendererModePrefer);
But it simply does not have any effect.
Can you please guide me how to use ffmpeg extension.
I have the same issue, did you find any solution ?
Yes I was able to do it. It was 2 years ago and I do not remember exact steps now but in general I have solved it by following this steps.
- I have installed ubuntu on a virtual machine.
- I have downloaded ffmpg sources and build it on linux.
- I have downloaded exoplayer sources from google
- I have copied so files from ffmpg build directory to exoplayers directory
- I have installed Googles Android Studio and build exoplayer with ffmpg.
- Then I have copied exoplayers jar or aar (do not remember exactly) files to the windows and created wrapper project to build exoplayer dll-s (you must copye ffmpg too).
- After that I have included this dlls to my project and it worked.
Sorry the project I'm worked is completed now and I do not remember exact steps but in general this is how I have done it. for me most difficult was a build process on linux. I had not any linux experience and it took for me many attempts before I have it done.
Thank you very much for that reply. I wasn't expecting such a quick and detailed message after two years. I am even surprised to receive an answer. ;-)
In my case, I discover that I can play a video in H265/AC3(5.1) on an Amazon firestick without further tweak, (it depends on the hardware). So I may avoid doing the process you describe, but it's good to known there is a solution. I may have a look later.
Thanks again and I hope this helps others.