How to generate thumbnail from video using FFMPEG!

Posted by Coolbharat under ASP.NET on 10/22/2014 | Points: 10 | Views : 2574 | Status : [Member] | Replies : 0
I am assigned a project where users can upload videos and view them just like YOUTUBE.I need to generate Thumbnails of Videos while UPLOADING so that i can save them inside the database alongwith the video.Then i can populate the right/left panel with the thumbnails and when the user clicks on a thumbnail the video will start playing in the central player.
I have used FFMPEG.exe in the project.It is not generating the thumbnails so that they can be saved in the database.Then i tried to save it in a SERVER folder,but that even doesn't work.Below is my code.Please help me out.

String AppPath = Request.PhysicalApplicationPath;
//It represents the Phsical File System Path of the Currently executing Server Application's Root Directory.

String thumbname,thumbargs,thumbre;
//thumbname = txt_video_title.Text.ToString() + " " + ".Jpeg";
thumbname = AppPath +"images" +"\\"+ txt_video_title.Text.ToString() + ".Jpeg";
thumbargs = " -i \"" + FileUpload_contestant_video.PostedFile.FileName +"\"" +" \""+" -vframes 1 -ss 00:00:07 -s 150x150"+"\""+" "+"\"" + thumbname+"\"";

Process thumbproc = new Process();
thumbproc.StartInfo.FileName = AppPath + "FFMPEG/ffmpeg.exe";
thumbproc.StartInfo.Arguments = thumbargs;
thumbproc.StartInfo.UseShellExecute = false;
thumbproc.StartInfo.CreateNoWindow = false;
thumbproc.StartInfo.RedirectStandardOutput = false;
catch (Exception ex)

Thanks in advance


(No response found.)

Login to post response