mboumaraf / aforge

Automatically exported from code.google.com/p/aforge
Other
0 stars 0 forks source link

Add jump to specific frame in Video.FFMPEG #368

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hello
please add a method to able us to jump to a specific frame number in a video 
file.

for VideoFileReader and VideoFileSource classes

Original issue reported on code.google.com by AsefS...@gmail.com on 18 Nov 2013 at 6:59

GoogleCodeExporter commented 8 years ago
VideoFileReader reader = new VideoFileReader();

reader.open("path");

int j=0;
//calculate video time in seconds and place it 
//secondsToStart= time-to-jump
int seconds =secondsToStart*reader2.FrameRate;

                    while (j <= seconds)
                    {
                        reader.ReadVideoFrame().Dispose();
                        j++;
                    }
then save or utilize your desired frame.

Original comment by zamir...@gmail.com on 3 Mar 2014 at 11:55