Dim wshShell As Object wshShell = Server.CreateObject("Wscript.Shell") cmd = "cmd.exe /k """"" & szCAF_PATH & """ -i """ & szPhysicalPath & """ " & Arguments & " """ & szEncodedPath & """""" wshShell.Run(cmd) Dim strCommand As String = "taskkill /F /IM cmd.exe" wshShell.Run(strCommand, 0, True) szDownloadLink = szDownloadLink.Replace(".caf", ".mp3")
wshShell = HttpContext.Current.Server.CreateObject("Wscript.Shell") cmd = "cmd.exe /k """"" & File.CAF_PATH & """ -i """ & File.PhysicalPath & """ " & File.Arguments & " """ & File.EncodedPath & """""" wshShell.Run(File.cmd) strCommand = "taskkill /F /IM cmd.exe" wshShell.Run(strCommand, 0, True) File.DownloadLink = File.DownloadLink.Replace(".caf", ".mp3")
using System.Diagnostics; //... string path // path to ffmpeg.exe, use MapPath... string commandLine // command line parameterts for ffmpeg; use string.Format("... {0} {1}", inputFileName, outputFileName) Process convertor = Process.Start(path, commandLine); convertor.WaitForExit(); // at this point, you can use outputFileName
I highly recommend Avdshare Audio Converter. It can convert caf to various audio format like aiff, m4a, mp3, wav, wma, aac, etc. It also helps to convert voc, m4a, flac, ogg, aiff, ra, au, opus etc
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)