More Faster

34 views
Skip to first unread message

KATO Kanryu

unread,
Apr 20, 2011, 9:42:22 PM4/20/11
to pyffmpeg-dev
hi,

It needs to get a faster way to capture images from a video.

I tryed to run pyffmpeg with using example from
http://mono-comp.com/programming/python-ffmpeg/

after some modified the sample, pyffmpeg run and capture images from a
video.

but too slowly, it runs only 3 to 5 frames per second.

to use ffmpeg directly, it runs 17-25 frames per second, with
exporting in psd images.


I want to capture images from an established video,
to retouch that, and to encode again to another video.

comments?

nouvel

unread,
Apr 21, 2011, 2:16:36 AM4/21/11
to pyffmpeg-dev
Dear Kato Kanryu,

IMHO, for playing PyFFMPEG, as FFMPEG, generally runs fast, very fast
for some operations on some files.

What is slow in PyFFMPEG is seeking. Seeking has always been the big
issue...
The code you have been showing me is using seeking for extracting each
frame at
regular interval. When this interval is small it is recommended to use
play
and to drop all the frames except those you are interested in.

If this interval is large you should use the code as the one you
showed to me.

Have a look at the samples, there is one sample code doing keyframe
extraction (based on MPEG keyframes and
not regular time intervals) that can run extremely fast.

I did not include the code to save the image. But merging these codes
with your may help
you to get what you desire to achieve.

Best regards,

Bertrand

On Apr 21, 3:42 am, KATO Kanryu <k.kan...@gmail.com> wrote:
> hi,
>
> It needs to get a faster way to capture images from a video.
>
> I tryed to run pyffmpeg with using example fromhttp://mono-comp.com/programming/python-ffmpeg/

KATO Kanryu

unread,
Apr 27, 2011, 10:43:03 AM4/27/11
to pyffmp...@googlegroups.com
hi,

I have a sample for capturing frames from movie to image.

http://pastebin.com/vYpjT2t8

Todo:
- seeking by frames/seconds
- capture looping with generator

enjoy!

Kanryu

Reply all
Reply to author
Forward
0 new messages