从视频提取音频作为MP3文件c# [英] extract audio as a MP3 file from video c#
问题描述
我想使用c#从MP3视频文件中提取音频。音频的比特率应该能够指定。有人可以帮我吗?我已经看过是否,但是我不知道是否可以与否有关,而不提示CMD。
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.
请不要建议我下面的文章。对于大于700mb
http://www.codeproject.com/Articles/7388/A-Simple-C-Wrapper-for-the-AviFile-Library
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
推荐答案
您可以调用ffmpeg二进制文件而不创建单独的控制台窗口。我假设C#/ .NET有模板,但如果没有,那么WinAPI的方法是在CreateProcess()调用中指定运行的ffmpeg命令和stdin / stdout的虚拟句柄。这里描述的内容如下: http ://msdn.microsoft.com/en-us/library/windows/desktop/ms682499(v = vs85).aspx
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
这篇关于从视频提取音频作为MP3文件c#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!