Durga
Durga

Reputation: 1303

Capturing Images from Playing Video File

I am developing C# desktop application and referring this link to Play video file http://www.codeproject.com/Articles/2632/DirectShow-MediaPlayer-in-C , now from this playing video file ,when I click on this panel (shown in above link ) how to capture Images from playing video file,I searched but I found all examples showing capturing Images from some device(for eg.webcam,etc..) ,In my case Its not device it's file which I am browsing from Directory and Playing ,as I am new to this Video capturing Please direct me how I can do this

Upvotes: 2

Views: 1780

Answers (3)

dymanoid
dymanoid

Reputation: 15227

You can also use a "SampleGrabber" DirectShow filter: just place it in the filter chain between your source filter and render filter.

More info about SampleGrabber: see MSDN

Upvotes: 1

Roman Ryltsov
Roman Ryltsov

Reputation: 69734

"Capture" normally refers to image acquisition when you obtain the image from external source. You want to take a copy of currently displayed video frame instead. There are several ways to do it and when it comes to playback when video is being visualized, the video renderers typically offer GetCurrentImage method which returns a copy of currently displayed video frame, possibly even converted to RGB.

Method syntax slightly differs between video renderer versions.

See previous topics on achieving this:

Upvotes: 3

You need a filter which captures screen and sends the video down the stream.

In the DirectShow Library there is a sample filter called PushSource and inside there is PushSourceDesktop.

At Codeplex there are Examples like this (Click me) or Information (Click me) about Filters.

Upvotes: 1

Related Questions