Code Monkey home page Code Monkey logo

xdroidffmpeg's Introduction

XDroidFFmpeg

Build Status

Xamarin.Android bindings for RxFFmpeg. (Kudos @microshow) This Java Bindings Library provides performant audio and video processing / editing powered by FFmpeg 4.0 + X264 + mp3lame + fdk-aac.

Platform Support Sample
Xamarin.Android
Xamarin.Forms

Why XDroidFFmpeg?

Using FFmpeg in (Xamarin.)Android seems easy at first - there are some projects around, but there are some gotchas like getting compilation for different ABIs right and adding support for hardware acceleration. RxFFmpeg is doing a great job of making it easy to run commands against ffmpeg. I was struggling with getting FFmpeg performance right on Xamarin.Android that's way I started binding RxFFmpeg since they have support for Android MediaCodec. One goal with this Java Bindings Library is to make it as easy as possible to call into the native ffmpeg commands from Xamarin.Android.

Major credits to @microshow for doing the hard work 👍.

Getting started

NuGet

XDroidFFmpeg is up on NuGet and GitHub

https://www.nuget.org/packages/XDroidFFmpeg

https://github.com/nor0x/XDroidFFmpeg/packages

Project

Start by adding a reference to RxFFmpeg_Bindings.csproj to the Xamarin.Android project. Set API Level and supported ABIs in the project properties. Hint: use arm64-v8a for best performance on supported devices.

Running ffmpeg commands

Running commands against ffmpeg is as simple as:

var command = cmd.Split(" ");
RxFFmpegInvoke.Instance.RunCommand(command, null);

For getting callbacks an implementation of IFFmpegListener can be passed to RunCommand

There is also a demo project which demonstrates adding .PNG watermark to an .MP4 video. To get the demo working you need to create a ffmpegtest folder in /storage/emulated/0/ and add a video.mp4 and watermark.png file to this folder.

Watermark Demo

More demo scenarios might be added in the future. Head over to ffmpeg documentation for more.

Contribution

Feel free to create issues and PRs 😃

xdroidffmpeg's People

Contributors

nor0x avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

dalalsunil1986

xdroidffmpeg's Issues

How to Use it from Xamarin.forms

How can i call the function from my xamarin.forms to xamarin.android ?
How to get this to work from my xamarin.forms project ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.