Video texture properties

Blender 2.58, Python 2.5:
I’ve got a video loaded as a world texture (code here: http://stackoverflow.com/questions/6694005/blender-2-5-python-video-texture-info) What I need is to sync scene animation with video frames. How can I get fps and number of frames from a video-based texture?