또 귀찮게 물어 볼게 있어서 왔습니다 (지송요~)
저번에 하던 WMEncoder는 다 완성했는데 wmv로만 인코딩 돼서 어쩔수 없이 버리고 이번에 다시 FFmepg로 다시 하고 있습니다
그런데
FFmpeg로 인코딩할때 progressbar는 아니더라도 timer로 텍스트박스에 인코딩중 이라는 메세지라도 나오게 할려고 하는데
이것도 작동을 안합니다. 무엇이 잘 못 돼 있는지 한 번 봐 주시겠습니까?
초짜라 모든 게 힘드네요 ㅠㅠ
public partial class Form1 : Form
{
Encoder enc = new Encoder();
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
timer1.Enabled = true;
timer1.Interval = 50;
}
private void button1_Click(object sender, EventArgs e)
{
enc.FFmpegPath = @"C:\ffmpeg\bin\ffmpeg.exe";
VideoFile inputv = new VideoFile(@"C:\welcome.wmv");
string outputVPath = @"C:\OutputVideo.mp4";
EncodedVideo encoded = enc.EncodeVideo(inputv, QuickVideoEncodingCommands.WMVLowQualityQVGA, outputVPath);
if (encoded.Success)
{
MessageBox.Show(encoded.EncodedVideoPath);
MessageBox.Show(encoded.EncodingLog);//<<=========================
}
else
{
MessageBox.Show(encoded.EncodingLog + " 실패했음");
}
}
private void timer1_Tick(object sender, EventArgs e)
{
Process[] mProcess = Process.GetProcessesByName("ffmpeg");
if (mProcess.Length > 0)
{
label1.Text = "인코딩중........";
}
else
{
label1.Text = "???";
}
}
}
[최초 등록일: ]
[최종 수정일: 12/28/2011]