hi,
I 'am building a .Net application (win. Forms) i need c# code to convert avi video format to mpeg video format.
i google alot and the answer is ffmpeg....but its source code is in c language....
we can also convert it by video header i.e. avi header to mpeg header...
but i m not getting how to do this.....
Help me, please.if any solution is there
Thank you in advance,
Thank you in advance,
2 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
niks lodhaPosted Jul 26, 2010, 2:52 AM
Lalit MPosted Jul 26, 2010, 2:42 AM
//Create object of Media_handler class
Media_handler _mediahandler=new Media_handler();
//Set root path of web application
string rootpath =Server.MapPath(Request.ApplicationPath);
// Set ffmpeg.exe path
string _ffmpegpath =HttpContext.Current.Server.MapPath("~\\ffmpeg\\ffmpeg.exe");
//Set path of source video directory, path where original video exist //'
string inputpath = rootpath + "\\Images\\Default";
//Set path of destination video directory, path where generated, encoded video will be store
string outputpath = rootpath + "\\Images\\MPEG";
//Call Convert_Media_To_MPEG function of Media_handler class to convert video to mpg format.
string mpg_video = _mediahandler.Convert_Media_To_MPEG(outfile, _ffmpegpath, InputPath, OutputPath);//where mpg_video is the name of mpg video that is generated and stored in mpg folder.
more ref you can check here