i'm using http://videocapture.sourceforge.net/ to get data from camera
and to encode it using pymedia.
video file is created but it seems to slow or to fast. using
time.sleep() it looks almost fine but it's not.
any help is appreciated.
Aljosa Mohorovic
params:
>>>
params = {
'type': 0,
'gop_size': 12,
'frame_rate_base': 125,
'max_b_frames': 0,
'height': 240,
'width': 320,
'frame_rate': 2997,
'deinterlace': 0,
'bitrate': 2700000,
'id': vcodec.getCodecID( 'mpeg1video' )
}
<<<
loop part:
>>>
img = cam.getImage()
s = pygame.image.fromstring(img.tostring(), (320,240), "RGB")
ss = pygame.image.tostring(s, "RGB")
bmpFrame= vcodec.VFrame( vcodec.formats.PIX_FMT_RGB24,
s.get_size(), (ss,None,None))
yuvFrame= bmpFrame.convert( vcodec.formats.PIX_FMT_YUV420P )
d = e.encode( yuvFrame )
fw.write( d.data )
#time.sleep(interval)
<<<
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Pymedia-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pymedia-users