1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| try
{
// Vérifie que le fichier existe sinon redirige sur la page suivante après une pause de qques secondes
if (System.IO.File.Exists(this.Server.MapPath(".").Replace(@"\", @"/") + "/" + linkMedia) == false)
{
Process ffmpeg = new Process();
string[] parts = linkMedia.Split('/');
string video = parts[2];
string video1 = Page.MapPath(video);
ffmpeg.StartInfo.Arguments = " -i \"" + video + "\" -target webm \"";
ffmpeg.StartInfo.FileName = Page.MapPath("ffmpeg.exe");
ffmpeg.Start(); //ligne ou l'exception ce déclenche avec le message :" interception Win32 : le fichier spécifier et introuvable "(voir pj)
ffmpeg.WaitForExit();
}
}
catch (Exception e)
{
skeleton = "<html><head><meta http-equiv=\"refresh\" content=\"5\" /></head><body bgcolor=\"#000000\" scroll=\"no\"><font size=\"1\" face=\"verdana\" color=\"#FFFFFF\">" + e + "</font></body></html>";
} |
Partager