static public quickStartSync ( string exePath, string args = null ) : string[] | ||
exePath | string | |
args | string | |
리턴 | string[] |
/// <summary> /// Read a file's duration, used for when converting to PCM /// </summary> /// <param name="file"></param> private int getSecondsFromFile(string input) { int i = 0; var s = CliApp.quickStartSync(proc.executable,$"-i \"{input}\" -f null -"); if(s[2]=="0") // ffmpeg success { i = readSecondsFromOutput(s[1], @"\s*Duration:\s*(\d{2}):(\d{2}):(\d{2})"); } return i; }// -----------------------------------------
/// <summary> /// Read a file's duration, used for when converting to PCM /// </summary> /// <param name="file"></param> private int getSecondsFromFile(string input) { int i = 0; var s = CliApp.quickStartSync(proc.executable, string.Format("-i \"{0}\" -f null -", input)); if (s[2] == "0") // ffmpeg success { i = readSecondsFromOutput(s[1], @"\s*Duration:\s*(\d{2}):(\d{2}):(\d{2})"); LOG.log("[FFMPEG] : {0} duration in seconds = {1}", input, i); } return(i); }// -----------------------------------------