InDashPC.org Forum Index InDashPC.org
In Dash Car PC forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Need help with dump_video.py tutorial

 
Post new topic   Reply to topic    InDashPC.org Forum Index -> Software -> PyMedia Tutorials
View previous topic :: View next topic  
Author Message
JeffB1



Joined: 21 Dec 2006
Posts: 3

PostPosted: Thu Dec 21, 2006 6:40 pm    Post subject: Need help with dump_video.py tutorial Reply with quote

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.
Back to top
View user's profile Send private message
JeffB1



Joined: 21 Dec 2006
Posts: 3

PostPosted: Fri Dec 22, 2006 2:50 pm    Post subject: Reply with quote

I download Python 2.4 and and new versions of PyGame and PyMedia.
PyGame now installed correctly.
However, I still have the same problem with PyMedia.
Basically there is never any data in the Demuxer streams.
It doesn't matter what kind of file I feed it.

I just noticed that the pymedia/video/ext_codecs directory is empty except for __init__.py
Back to top
View user's profile Send private message
jbors
Site Admin


Joined: 12 Nov 2004
Posts: 1675

PostPosted: Sat Dec 23, 2006 8:31 am    Post subject: Reply with quote

Can you try to run recode_video.py ?
Usually when you feed the first AVI block you want to make it large enough so it get all the headers right.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    InDashPC.org Forum Index -> Software -> PyMedia Tutorials All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group