Skip to content

Xamarin binding library around @tanersener's Mobile-FFmpeg library. The native Android and iOS library is located here: https://github.com/tanersener/mobile-ffmpeg

License

Notifications You must be signed in to change notification settings

Laerdal/Laerdal.FFmpeg

Repository files navigation

Laerdal.FFmpeg

Xamarin.iOS package : https://github.com/Laerdal/Laerdal.FFmpeg.iOS

Xamarin.Android package : https://github.com/Laerdal/Laerdal.FFmpeg.Android

Xamarin binding library around @tanersener's Mobile-FFmpeg library.

The native Android and iOS libraries can be found here: https://github.com/tanersener/mobile-ffmpeg

Mobile FFmpeg Package Laerdal.FFmpeg
Audio NuGet Badge
Full NuGet Badge
Full.Gpl NuGet Badge
Https NuGet Badge
Https.Gpl NuGet Badge
Min NuGet Badge
Min.Gpl NuGet Badge
Video NuGet Badge

External libraries

Package External libraries
Audio lame libilbc libvorbis opencore-amr opus shine soxr speex twolame vo-amrwbenc wavpack
Full fontconfig freetype fribidi gmp gnutls kvazaar lame libaom libass libiconv libilbc libtheora libvorbis libvpx libxml2 opencore-amr opus shine snappy soxr speex twolame vo-amrwbenc wavpack
Full.Gpl fontconfig freetype fribidi gmp gnutls kvazaar lame libaom libass libiconv libilbc libtheora libvorbis libvpx libxml2 opencore-amr opus shine snappy soxr speex twolame vid.stab vo-amrwbenc wavpack x264 x265 xvidcore
Https gmp gnutls
Https.Gpl gmp gnutls vid.stab x264 x265 xvidcore
Min -
Min.Gpl vid.stab x264 x265 xvidcore
Video fontconfig freetype fribidi kvazaar libaom libass libiconv libtheora libvpx snappy

Known limitation: Due to issue with webp.framework on Xamarin iOS on linking stage we temporary removed it from usage

How to use

Simply add the Nuget package you want into ALL of your Xamarin projects (Shared, iOS and Android). On iOS it will depend on the iOS package and on iOS it will depend on the Android package.

Known issue:

For iOS build, when linking you might get the following error :

Can't register the class when the dynamic registrar has been linked away.

To fix it you can either :

  • Switch to <MtouchLink>SdkOnly</MtouchLink> or <MtouchLink>None</MtouchLink>
  • Add <MtouchExtraArgs>--optimize=-remove-dynamic-registrar</MtouchExtraArgs> to the .csproj of your iOS project

PS. If you know how I could fix it please PR or send a message :)

Folder structure

  • Laerdal.FFmpeg = Xamarin Nuget Library project and nuget files
  • Laerdal.FFmpeg.Output = Build output from building Laerdal.FFmpeg

Local build

Steps to build

1) Checkout

git clone https://github.com/Laerdal/Laerdal.FFmpeg.git

2) Run build script

Usage:

./build.sh [-p|--package [audio|full|full-gpl|https|https-gpl|min|min-gpl|video]] [-r|--revision build_revision] [-c|--clean-output] [-v|--verbose]

Parameters:

  • -p | --package [audio|full|full-gpl|https|https-gpl|min|min-gpl|video]
  • -r | --revision [build_revision]
    • Sets the revision number, default = mdd.hMMSS
  • -c | --clean-output
    • Cleans the output before building
  • -v | --verbose
    • Enable verbose build details from msbuild tasks
  • -h | --help
    • Prints this message

To build only full and full-gpl, clean the output and run objective sharpie to update the ApiDefinitions :

./build.sh -p full -p full-gpl -c -s

To build everything :

./build.sh