gregoryscode / XamarinAndroidFFmpeg

FFmpeg library binding for Xamarin Android
MIT License
5 stars 1 forks source link

Don't know how to make the addon work #1

Open zoriya opened 6 years ago

zoriya commented 6 years ago

Hello,

I'm a new user of ffmpeg and of your addon but i don't know how to make this works. Everytime i run a command i get this error:

Android.Views.WindowManagerBadTokenException: < Timeout exceeded getting exception details>

I tried to run this command on xamarin android:

await FFmpegLibrary.Run(Application.Context, "-y -i " + filePath + " -vn -ar 44100 -ac 2 -b:a 256k -f mp3 " + outputPath);

How should i use this command ?

Thanks for reading and porting ffmpeg on xamarin.

coolhunter33 commented 6 years ago

@AnonymusRaccoon, you just need to do smth like this:

Device.BeginInvokeOnMainThread(async () =>
{
    await FFMpeg.Xamarin.FFmpegLibrary.Run(Forms.Context, cmd);
});