Cannot run program "…binffmpeg.exe": error=13, Permission denied

  android, android-ffmpeg, windows

Trying for this Jave program to work on my android where the host is a Windows 64 bit machine. Have created a class and extended FFMPEGLocator class defining the path to the ffmpeg executable in my file system. But doesn’t seem to work each time showing "error 13, permission denied". Could someone please put some light into this situation?

Class extended

   class SampleLocator extends FFMPEGLocator {
@Override
protected String getFFMPEGExecutablePath() {
    return "...binffmpeg.exe";
} }

audio converting code

File path =  Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
    File source = new File(url);
    targetFile = new File(path, "sample.wav");
    AudioAttributes audio = new AudioAttributes();
    audio.setCodec("pcm_s16le");
    audio.setBitRate(64000);
    audio.setChannels(2);
    audio.setSamplingRate(44100);
    EncodingAttributes attrs = new EncodingAttributes();
    attrs.setFormat("wav");
    attrs.setAudioAttributes(audio);
    Encoder encoder = new Encoder(new MyDefaultFFMPEGLocator());
    try {
        encoder.encode(source, targetFile, attrs);
       
    }
    catch (IllegalArgumentException | InputFormatException e){
        e.printStackTrace();
   
    } catch (EncoderException e) {
     
        e.printStackTrace();
    }

Source: Windows Questions

LEAVE A COMMENT