Share via


Is it possible to extract the first frame of a video file and save as jpeg?

Question

Friday, July 30, 2010 5:11 PM

Need to pull / extract the first frame from a video file and same as jpeg.

Is that possible and if it is, where would i begin? 

All replies (6)

Wednesday, August 4, 2010 11:18 PM âś…Answered

Hi,

Of course, you can extract the first frame form a video. But I think it will be a little complex due to different video types. You can use IMediaDet interface to extract frames from video files.

# IMediaDet Interface
http://msdn.microsoft.com/en-us/library/dd390180(VS.85).aspx

Here is a sample using this interface.

# DirectShow.NET
http://www.codeproject.com/KB/directx/directshownet.aspx?msg=327673

Hope this helps.


Friday, July 30, 2010 5:20 PM

I literally just integrated something like this in my project.  The video, however, needs to be converted into FLV and you need to have FFMPEG in your application directory.  You will basically run a command line executable from your web app.  Here's the article I read to set me up:

http://jasonjano.wordpress.com/2010/02/09/a-simple-c-wrapper-for-ffmpeg/

This guy made a wrapper class in C# that can be called from code-behind.  I had to modify it a little for my purposes, but it works.


Friday, July 30, 2010 5:24 PM

Refer these links

http://local.dotnetnuke.com/Community/Forums/tabid/795/forumid/54/postid/80502/scope/posts/Default.aspx

http://www.online-tech-tips.com/computer-tips/extract-still-image-from-video/ 

http://forum.videohelp.com/threads/183523-How-to-capture-a-photo-off-a-dvd-or-a-video-file


Friday, July 30, 2010 5:36 PM

Anyone else.. i was looking for something to use within C#.. some of the links show applications where someone would install and manually do this.

 


Friday, July 30, 2010 5:43 PM

My link IS C#.  It relies on an executable that resides in your application directory (not installed), and uses the System.Diagnostics.Process namespace to execute ffmpeg.


Thursday, August 5, 2010 11:41 AM

If your question has been answered in such a way that your problem is solved, then please mark the question as solved (preferably marking the post that answered your question).

This will allow others who experience similar trouble to find that this question has been answered and also allows the rest of us to know that your problem is solved.

Or

If you have any solution please post it so that it help others.