Reputation: 7780
Is there an alternative to PyMedia to decode different video formats and be able to extract frames as images for further processing?
Currently I have to be able to do something like the following (not working code extract, just to give an idea):
demuxer = muxer.Demuxer(FORMAT)
streams = demuxer.parse(open(VIDEO).read(BUFFER_SIZE))
codec = vcodec.Decoder(CODEC)
for stream in streams:
frame = codec.decode(stream[1])
fdata = frame.convert(2)
img = Image.fromstring("RGB", fdata.size, fdata.data)
# ...further processing of image...
Upvotes: 1
Views: 3690
Reputation: 14095
Pyffmpeg seems to be lagging a few years behind most recent ffmpeg releases, so not sure whats the status there :S One possible solution could be moviePy, which is also ffmpeg based... According to this video intro it may be promising
Upvotes: 1
Reputation: 2341
You can try Pyffmpeg https://code.google.com/p/pyffmpeg/...
Upvotes: 3