Last post Jun 21, 2016 07:02 AM by aakashpawar
Jul 18, 2009 08:11 AM|liju.thn|LINK
I want to get the thumbnail image from the video uploaded through the file uploader control.
Please dont redirect to ffmpeg. I was using that and it failed for videos larger than 5 MB. I am restricting the admin to upload only flv videos.
But i want the thumbnails to be generated from that while uploading, so that i can update database as well
Jul 21, 2009 01:26 AM|liju.thn|LINK
nobody knows the solution?. I wonder no body used FFMPEG to generate thumbnail images from big flash video files.
I have been pissed up with this. some body plz help
Jul 21, 2009 01:34 AM|manoj0682|LINK
check out this link
Jul 21, 2009 01:42 AM|liju.thn|LINK
I am asking about video, not images
Jul 21, 2009 01:49 AM|manoj0682|LINK
I doubt that you might get exact code, you might have to adjust that code and check out....
Jul 21, 2009 01:57 AM|liju.thn|LINK
i googled and couldnt find any suitable article.If you provide some links it would be helpful
I am using the FFMPEG comand like the one below to generate the thumbnail
string imgargs = " -i \"" + inputPath + "\\" + fileName.Remove(fileName.IndexOf(".")) + ".flv" + "\" -f image2 -ss 1 -vframes 1 -s 152x148 -an \"" + imgpath + "\\" + fileName.Remove(fileName.IndexOf(".")) + ".jpg" + "\"";
Jul 21, 2009 08:51 AM|liju.thn|LINK
So nobody knows about this? Even there is no way to contact the guys who made the FFMPEG tool. I have wasted my 1 full week in this. There is no method or what to grab the thumbnails while uploading a video? fed up
Feb 02, 2010 10:36 PM|nsupreetha|LINK
I tried using Microsft.Expression.Encoder.dll inside my ASP.net application to generate a thumbnail of a video while uploading and the same is working.
MediaItem mediaItem = new MediaItem(clientFilepath);
MemoryStream memory = new MemoryStream();
BinaryFormatter binForm= new BinaryFormatter();
Bitmap bitmap = mediaItem.MainMediaFile.GetThumbnail(new TimeSpan(0, 0, 5), new System.Drawing.Size(640, 480));
thumbnailBytes = memory.GetBuffer();
Hope this helps you!
Jun 21, 2016 07:02 AM|aakashpawar|LINK
I had created thumbnail from video using "ffmpeg.exe"
private static void CreateAndSaveVideoThumbnail(string mediaFile, string outputPath)
Logger(Environment.NewLine + AppDomain.CurrentDomain.BaseDirectory + Environment.NewLine);
string thumbpath = outputPath;
string thumbname = thumbpath;
string thumbargs = "-i " + mediaFile + " -vframes 1 -ss 00:00:05 -s 320x240 " + thumbname;
var thumbproc = new Process();
thumbproc.StartInfo.FileName = AppDomain.CurrentDomain.BaseDirectory + "\\ffmpeg.exe";
thumbproc.StartInfo.Arguments = thumbargs;
thumbproc.StartInfo.UseShellExecute = false;
thumbproc.StartInfo.CreateNoWindow = false;
thumbproc.StartInfo.RedirectStandardOutput = false;
catch (Exception ex)
and using NReco.VideoConverter
private static void CreateAndSaveVideoThumbnail(string inputFile, string outputFile)
Logger("Input File :" + inputFile + Environment.NewLine + "Output File : " + outputFile);
var ffMpeg = new NReco.VideoConverter.FFMpegConverter();
ffMpeg.GetVideoThumbnail(inputFile, outputFile, 5);
catch (Exception ex)
Both the codes works fine, but the issue I am having is, it works fine locally but not on Server, It is throwing me error
"This program is blocked by group policy. For more information, contact your system administrator".