MP3 Encoding

MP3 Encoding using ASP.NET

This page includes examples that will help you encoding mp3 audio files from other format audio or videos in your .net applications using ASP.NET Video Converter

C# Sample Code

Sample code for encoding any format audio or video to mp3 audio format using media handler pro in .net applications (c#, vb.net, asp.net)


_mhandler.FFMPEGPath = HttpContext.Current.Server.MapPath("~\\ffmpeg\\ffmpeg.exe");
_mhandler.InputPath = RootPath + "\\contents\\video";
_mhandler.OutputPath = RootPath + "\\contents\\mp3";
_mhandler.FileName = "sample.mp4";
_mhandler.DisableVideo = true;
_mhandler.Channel = 2;
_mhandler.Audio_SamplingRate = 4800;
_mhandler.Audio_Bitrate = 192;
_mhandler.OutputExtension = ".mp3";
VideoInfo info = _mhandler.Process();
// Check for errors
if (info.ErrorCode > 0)
{
     Response.Write("Video processing failed, Error code " + info.ErrorCode + " generated");
     return;
}