转换WAV到MP3 - ASP.NET [英] Converting wav to mp3 - ASP.NET

查看:164
本文介绍了转换WAV到MP3 - ASP.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法为WAV文件转换为MP3在ASP.NET?我听说LAME,但还没有找到一个Web应用程序的任何实例。另外,我不知道这是否可以用于商业用途。

Is there a way to convert WAV files to MP3 in ASP.NET? I have heard of LAME but haven't found any examples for a web application. Also, I wasn't sure if it can be commercially used.

感谢

推荐答案

试试这个code:

public void mciConvertWavMP3(string fileName, bool waitFlag) {
        string outfile= "-b 32 --resample 22.05 -m m \""+pworkingDir+fileName + "\" \"" + pworkingDir+fileName.Replace(".wav",".mp3")+"\"";
        System.Diagnostics.ProcessStartInfo psi=new System.Diagnostics.ProcessStartInfo();
        psi.FileName="\""+pworkingDir+"lame.exe"+"\"";
        psi.Arguments=outfile;
        psi.WindowStyle=System.Diagnostics.ProcessWindowStyle.Minimized;
        System.Diagnostics.Process p=System.Diagnostics.Process.Start(psi);
        if (waitFlag)
        {
        p.WaitForExit();
        }
 }

这篇关于转换WAV到MP3 - ASP.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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