开发者

Is there an alternative to PyMedia

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 worki开发者_JAVA百科ng 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...


You can try Pyffmpeg https://code.google.com/p/pyffmpeg/...


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜