5

Ok it seems that whenever I tell ffmpeg to take a screen cap half way though the clip (clip can be as long as 10 hours) it uses 100% of 1 cpu core and takes ages… whereas if I let it do a frame at the start it goes real quick, as if it scans though the video to get to the middle instead of just jumping to it!

Here is the code im currently using:

ffmpeg -y -itsoffset -“500"  -i “clipname.mov" -vcodec png -vframes 1 -an -f rawvideo “clipScreenshot001.png”

This can take several minutes.

These are HD videos too, 720p/1080p and allot of the time they are raw unedited clips (e.g. very long).

So I was hoping for some better software that will make screen captures from video much faster (has to be linux and scriptable).

2
  • 1
    I found this => fengcool.com/2008/12/… It might help you with your problem.
    – brozo
    Commented Feb 6, 2010 at 21:08
  • 2
    Probably your video does not contain enough reference frames or are not indexed. Capturing a frame far forward into the stream will always require a complete scan and decoding: IO intensive and computation costly. It always takes very long. Unless you prepare it in advance, you need to process the video at least once. Essentially you can either (1)reencode the video with another format with reference frames indexed (.avi mpeg for example) you can later capture screen at the desired spots much faster. Or, (2) you can capture, say one per second, and keep all the captured screens.
    – PA.
    Commented Feb 8, 2010 at 18:00

1 Answer 1

7
+100

Try to use seek (the -ss flag) instead of delaying (the -itsoffset), i.e.:

ffmpeg -y -ss 3000 -i "clipname.mov" -vframes 1 "clipScreenshot001.png"
1
  • 1
    huh, I thought I had tried that, guess not. It now makes a screenshot in under a second which would take about 5 minutes before, THANK YOU! To be honest I didn't think anyone would figure this question out, but Im one happy guy now that it is (and my CPU thanks you too :))
    – Mint
    Commented Feb 11, 2010 at 7:00

Not the answer you're looking for? Browse other questions tagged or ask your own question.