pudwerkin / pyffmpeg

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

Extracting all the frames from a given video #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. My purpose is to extract all the frames from a given video

2.I used the following code, it served the purpose but its getting crashed 
due to heavy memory usage.  
3. The code I used was ,
import pyffmpeg
frame_Number=0
while 1: 
        stream=pyffmpeg.VideoStream()
        stream.open('test_wmv.wmv')
        image=stream.GetFrameNo(frame_Number)
    except Exception,value:  
        print value
        break
    image.save('frame wmv %d.png'%(frame_Number))
    image=""
    frame_Number+=1

Expected to extract all the frames from a given video but the application 
crashed.

I am using it on Windows

-Regards,
Manoj

Original issue reported on code.google.com by chmano...@gmail.com on 9 Jul 2009 at 3:36

GoogleCodeExporter commented 9 years ago
move the file opening functions outside the loop?

Original comment by pahappo@gmail.com on 14 Aug 2009 at 1:06

GoogleCodeExporter commented 9 years ago

Original comment by bertrand...@gmail.com on 10 Nov 2009 at 6:59

GoogleCodeExporter commented 9 years ago

Original comment by bertrand...@gmail.com on 8 Jan 2010 at 3:43