2 years ago

#50614

test-img

MaminDev2

use FFMpeg in xamarin android

I'm using xamarin.android to create an android application. for working on the output of recorded audios in android for changing its pitch and the other thing with NWaves package, I need to change its format to .wav. I tried to use many audio convertors but all of them threw exceptions, but it should work with FFmpeg. However, I used this code but it doesn't generate any file.

List<string> cmd = new List<string>();
        cmd.Add("ffmpeg");
        cmd.Add("-i");
        cmd.Add("/storage/emulated/0/Android/data/com.companyname.pushersvc/demo.3GP");
        cmd.Add("/storage/emulated/0/Android/data/com.companyname.pushersvc/test.wav");


        string cmdParams = string.Join(" ", cmd);

        await FFMpeg.Xamarin.FFMpegLibrary.Run(
            Application.Context,
            cmdParams
            );
        return new FileInfo(path);

I read this and FFMpeg docs, but all of them used .mp4 convertor. I also read ffmpeg doc for audio converting which you can see the code, which is not working

android

audio

ffmpeg

xamarin.android

android-ffmpeg

0 Answers

Your Answer

Accepted video resources