I am using following code for converting video files to flash movie file using ASP .NET. It think you also use this to do same. Just go through line by line and try to understand each step.
Code:
protected void convert_Click(object S, EventArgs E)
{
Process mp4;
string v1;
string mpg;
v1 = Page.MapPath("karina.wmv");
mpg = Page.MapPath("") + "\\v1.flv";
mp4 = new Process();
mp4.StartInfo.Arguments = " -i " + v1 + " -s 480*360 -deinterlace -ab 32 -r 15 -ar 22050 -ac 1 " + mpg;
mp4.StartInfo.FileName = Page.MapPath("mp4.exe");
mp4.Start(); // start !
mp4.WaitForExit();
mp4.Close();
}
public void ExtractImage()
{
Process mp4;
string v1;
string t;
v1 = Page.MapPath("v1.flv");
t = Page.MapPath("") + "\\frame.jpg";
mp4 = new Process();
mp4.StartInfo.Arguments = " -i \"" + v1 + "\" -s 108*180 -vframes 1 -f image2 -vcodec mjpeg \"" + t + "\"";
mp4.StartInfo.FileName = Page.MapPath("mp4.exe");
mp4.Start();
}
Bookmarks