ダウンロードしたffmpegバイナリを呼び出した際にPermission deniedがでて起動することができない。
Unityで開発しております。
OSX向けのアプリのStreamingAssetsフォルダにダウンロードしてきたffmpegバイナリを入れ、こちらを呼び出して圧縮を行おうとしました。
以下作成したコードになります。
private IEnumerator ffmpeg( string a_path )
{
input = "\'"+a_path+"\'";https://qiita.com/drafts/new
output = "\'"+UnityEngine.Application.persistentDataPath + "/work/"+"hoge.mp4"+"\'";
string ffmpegExePath = Application.streamingAssetsPath + "/KirinUtil/ffmpeg_mac/ffmpeg";
Process process = new Process();
string option = "-i";
option += " "+input;
option += " -vf";
option += " scale=480:270";
option += " -an";
option += " -preset veryfast";
option += " -tune film";
option += " -crf 23";
option += " -threads 2";
option += " "+output;
string l_cmd = ffmpegExePath + option;
process.StartInfo.FileName = "/bin/bash";
process.StartInfo.Arguments = "-c \" " + l_cmd + " \"";
process.StartInfo.CreateNoWindow = true;
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardError = true;
process.StartInfo.RedirectStandardOutput = true;
process.EnableRaisingEvents = true;
process.ErrorDataReceived += new DataReceivedEventHandler(ProcessErrorDataReceived);
process.OutputDataReceived += new DataReceivedEventHandler(ProcessOutputDataReceived);
process.Exited += new EventHandler(ProcessExited);
process.Start();
process.BeginOutputReadLine();
process.BeginErrorReadLine();
}
こちら動かした際にPermission deniedが出て起動できませんでした。
こちら何かご存じでしょうか。
Homebrewでインストールしたffmpegは呼び出すことには成功しております。
配布することを考えておりますので、インストールさせることはしたくありません。
よろしくお願いします。