Hi,
Based on my understanding, you want to convert video to flv format. If I have misunderstood you, please feel free to let me know.
There is a great sample from: http://www.codeproject.com/KB/aspnet/ffmpeg_csharp.aspx. It contains the illumination about file format converting.
I list it and change something to meet your requirement.
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Diagnostics;
protected void Button1_Click(object sender, EventArgs e)
{
// preview frame
Process ffmpeg; // creating process
string video;
string thumb;
video = Page.MapPath("first.3gp"); // setting video input name with path
thumb = Page.MapPath("") +"\\frame.jpg"; // thumb name with path !
ffmpeg = new Process();
ffmpeg.StartInfo.Arguments = " -i \""+video+"\" -s 108*80 -vframes 1 -f image2 -vcodec mjpeg \""+thumb+"\""; // arguments !
ffmpeg.StartInfo.FileName = Page.MapPath("ffmpeg.exe");
ffmpeg.Start(); // start !
}
protected void convert_Click(object sender, EventArgs e)
{
//converting video 1.wmv to video.flv
Process ffmpeg; // creating process
string video;
string mpg;
video = Page.MapPath("1.wmv"); // setting video input name with path
mpg = Page.MapPath("") + "\\video.flv"; // thumb name with path !
ffmpeg = new Process();
ffmpeg.StartInfo.Arguments = " -i \"" + video + "\" -target vcd \"" + mpg + "\""; // arguments !
ffmpeg.StartInfo.FileName = Page.MapPath("ffmpeg.exe");
ffmpeg.Start(); // start !
}
You have to download ffmpeg.exe into your WebSite MagPath. There is a link available to download this file: http://ffdshow.faireal.net/mirror/ffmpeg/
After downloading ffmpeg.rev11143.7z(newest) in above link, please put pthreadGC2.dll and ffmpeg.exe into your associated path in WebSite.
Hope this can help.