JeffB1
Joined: 21 Dec 2006 Posts: 3
|
Posted: Thu Dec 21, 2006 6:40 pm Post subject: Need help with dump_video.py tutorial |
|
|
This is my very first look at PyMedia.
I am on Win32 using Python 2.3.
I am trying to read an .avi file.
I am following the tutorial in the file dump_video.py.
The first problem I have is that this tutorial requires PyGame and PyGame did not install properly. PyGame can't find jpeg.dll. I commented out the PyGame code and moved onward.
The second problem I have is that dm.streams contains either (None, None) or (None, ) depending upon which .avi file I try.
Thus this line throws the following exception:
v= filter( lambda x: x[ 'type' ]== muxer.CODEC_TYPE_VIDEO, dm.streams )
Traceback (most recent call last):
File "vid_bmp.py", line 53, in ?
dumpVideo( sys.argv[ 1 ], sys.argv[ 2 ], int( sys.argv[ 3 ] ) )
File "vid_bmp.py", line 16, in dumpVideo
v= filter( lambda x: x[ 'type' ]== muxer.CODEC_TYPE_VIDEO, dm.streams )
File "vid_bmp.py", line 16, in <lambda>
v= filter( lambda x: x[ 'type' ]== muxer.CODEC_TYPE_VIDEO, dm.streams )
TypeError: unsubscriptable object
The third problem that I have is that
vcodec.getCodecID('PIX_FMT_RGB555') returns 'no codec exists'
vcodec.getCodecID('PIX_FMT_RGB24') returns 'no codec exists'
vcodec.getCodecID('PIX_FMT_MONOBLACK') returns 'no codec exists'
The fourth problem that I have is that tutorial says to use the number 2 for the format number parameter. Since getCodecID does not seem to work, how do I know what format 2 represents.
Any help would be appreciated. |
|