ExoPlayerXamarin icon indicating copy to clipboard operation
ExoPlayerXamarin copied to clipboard

How to use ffmepg extension

Open earkania opened this issue 5 years ago • 3 comments

💬 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.

earkania avatar Sep 09 '20 20:09 earkania

I have the same issue, did you find any solution ?

milouz-corp avatar Jul 17 '22 13:07 milouz-corp

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.

  1. I have installed ubuntu on a virtual machine.
  2. I have downloaded ffmpg sources and build it on linux.
  3. I have downloaded exoplayer sources from google
  4. I have copied so files from ffmpg build directory to exoplayers directory
  5. I have installed Googles Android Studio and build exoplayer with ffmpg.
  6. 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).
  7. 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.

earkania avatar Jul 17 '22 14:07 earkania

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.

milouz-corp avatar Jul 17 '22 15:07 milouz-corp