问题
I want to extract audio from a video file as a MP3 using c#. The bit-rate of the audio should be able to specify. Could someone please help me on this? I have already looked at "whether" but I'm not sure whether it is possible to do with "whether" without prompting CMD.
Please don't suggest me following article. it doesn't work properly for file that are larger than 700mb http://www.codeproject.com/Articles/7388/A-Simple-C-Wrapper-for-the-AviFile-Library
回答1:
You could call an ffmpeg binary without creating a separate console window. I'd assume C#/.NET has templates for that, but if not then the WinAPI way to do it is to specify the ffmpeg command to run and dummy handles for stdin/stdout in your CreateProcess() call. Something like that is described here: http://msdn.microsoft.com/en-us/library/windows/desktop/ms682499(v=vs.85).aspx
来源:https://stackoverflow.com/questions/14326268/extract-audio-as-a-mp3-file-from-video-c-sharp