01 - protected void Button1_Click(object sender, EventArgs e)
02 - {
03 - if (FileUpload1.HasFile)
04 - {
05 - string arq_tipo = FileUpload1.FileName.Remove(0, FileUpload1.FileName.Length - 3);
06 - if (arq_tipo.ToString() == "wmv")
07 - {
08 - string video = Server.MapPath("upload/") + "nome_do_video.wmv";
09 - string imagem = Server.MapPath("upload/") + "nome_da_imagem.jpg";
10 - FileUpload1.SaveAs(video);
11 - }
12 - }
13 - }01 - string executavel = Server.MapPath("ffmpeg/ffmpeg.exe");
02 - string parametros = " -y -i " + video + " -vframes 1 -ss 00:00:03 -an -vcodec mjpeg -f rawvideo " + imagem;
03 - System.Diagnostics.Process.Start(@executavel, parametros);using System;
using System.Data;
using System.Configuration;
using System.Collections;
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;
public partial class EnviarVideo : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
if (FileUpload1.HasFile)
{
string arq_tipo = FileUpload1.FileName.Remove(0, FileUpload1.FileName.Length - 3);
if (arq_tipo.ToString() == "wmv")
{
string video = Server.MapPath("upload/") + "nome_do_video.wmv";
string imagem = Server.MapPath("upload/") + "nome_da_imagem.jpg";
FileUpload1.SaveAs(video);
string executavel = Server.MapPath("ffmpeg/ffmpeg.exe");
string parametros = " -y -i " + video + " -vframes 1 -ss 00:00:03 -an -vcodec mjpeg -f rawvideo " + imagem;
System.Diagnostics.Process.Start(@executavel, parametros);
Label1.Text = "Vídeo enviado!";
}
}
}
}

Opinião do leitor:
Como assinar um RSS
Peixe Grande 2008
iPhone 3G no Brasil
© 2005 - 2008 - Oficina da Net - v 3.0 - É proibida a reprodução parcial ou completa do conteúdo deste site sem autorização por escrito. Resolução adequada: 1024x768px.