合并音频(wav内容) [英] Merging audio(wav content)

查看:109
本文介绍了合并音频(wav内容)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在数据库中有多个wav内容,我想制作/合并/合并到一个文件中以创建单个声音。



是否有任何api用于该任务或者.NET中的一些内置的inn命令,我可以用某种天才的方式使这个任务成为可能吗?

I have multiple wav content in database that I want to make/combine/merge into one file to create single sound.

Is there any api for that task or some built inn commands in .NET that can I can use in some genius way to make this task possible?

推荐答案

使用Windows API有很多方法可以做到这一点但是如果你真的有这样一个有限的问题,只是操纵媒体文件,我建议不要深入研究,因为你可以使用一个现成的工具,一个非常好的工具:FFMpeg或libavcodec。请参阅:

http://en.wikipedia.org/wiki/Ffmpeg [< a href =http://en.wikipedia.org/wiki/Ffmpegtarget =_ blanktitle =New Window> ^ ],

http://ffmpeg.org/ [ ^ ],

http://en.wikipedia.org/wiki/Libavcodec [ ^ ],

http://libav.org/ [ ^ ]。



在这两种情况下,您都可以获得免费的开源实用程序,几乎可以制作所有内容。



选择好的编码参数集以在文件大小和质量之间提供合理的权衡是一首单独的歌曲。您可能需要进行一段时间的实验并阅读一些实用建议以获得足够的经验。



您只需使用 System.Diagnostics执行该实用程序.Process.Start ,或者,如果这还不够好,您可以自己将库包装在.NET程序集中或找到合适的包装器。请参阅:

http://www.ffmpeg-csharp.com/ [ ^ ],

http://sourceforge.net/projects/sharpffmpeg/ [ ^ ],

http://vbffmpegwrapper.codeplex.com/ [ ^ ]。



毕竟,尝试找一些: http://bit.ly/VpboUJ [ ^ ]。



如果你想工作在你自己的包装但不知道如何,问一个问题,我会给你基本的想法(使用P / Invoke或C ++ / CLI混合模式项目)。



祝你好运,

-SA
There are many ways to do that with Windows APIs, but if you really have such a limited problem as just manipulation with media files, I would suggest not to dig into it, because you can use a ready-to-use tool, and a very good one: FFMpeg or libavcodec. Please see:
http://en.wikipedia.org/wiki/Ffmpeg[^],
http://ffmpeg.org/[^],
http://en.wikipedia.org/wiki/Libavcodec[^],
http://libav.org/[^].

In both cases, you can get free open-source utilities which can make nearly everything.

The selection of good sets of encoding parameters to provide a reasonable trade-off between size of the file and quality is a separate song. You may need to experiment for a while and read some practical recommendation to gain enough experience.

You could simply execute the utility using System.Diagnostics.Process.Start, or, if this is not good enough, you can wrap the library in a .NET assembly by yourself or find appropriate wrapper. Please see:
http://www.ffmpeg-csharp.com/[^],
http://sourceforge.net/projects/sharpffmpeg/[^],
http://vbffmpegwrapper.codeplex.com/[^].

After all, try to find some more: http://bit.ly/VpboUJ[^].

If you wish to work at such wrapper by yourself but don't know how, ask a question, I'll give you the basic ideas (using P/Invoke or C++/CLI "mixed-mode" project).

Good luck,
—SA


这篇关于合并音频(wav内容)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆