VideoTexture module seems to be working but it's not

I’ve started looking into the VideoTexture module and downloaded the demo off the blender wiki. The first thing I noticed was that the code uses “IMvideo.png” to call the texture that’s going to be replaced. This line had an error so I changed it to the “MAVideoMat” and it worked.

My first question… why couldn’t the demo call on the packed texture ‘video.png’. I haven’t been able to get it to successfully use the texture name at all yet.

Once I got the demo working I tried applying VideoTexture my project. After a failed attempt at seeing any changes using VideoTexture.ImageFFmpeg() I decided to just to use the demos code and call the ogg video file that came with it. I still had no luck. Blender is showing no errors and I used ‘print “switch”’ to test that the code was being ran and it was.

c1 is the material applied to my cube.
The scripts run on my cube.

When the ‘S’ key is pressed

import VideoTexture

contr = GameLogic.getCurrentController()
obj = contr.getOwner()
if not hasattr(GameLogic, 'video'):
    matID = VideoTexture.materialID(obj, 'MAc1') = VideoTexture.Texture(obj, matID)
    movie = GameLogic.expandPath('//trailer_400p.ogg') = VideoTexture.VideoFFmpeg(movie) = True
    print "switched"

This is always running

# refresh video
if hasattr(GameLogic, 'video'):

Last question,, gives a list of attributes that you can use. I wanted to debug using .status but I couldn’t figure out how to get it to work.

I tried using


It came back with errors.

Thanks, I wasn’t sure if my build worked with this, but it does.
I don’t have a ‘ret’ key on my keyboard so I changed it to ‘W’ in the game logic
and it plays the peach movie, it’s pretty cool :smiley:
I thought it would be a little easier to set up than this when I was messing around
with it last night, I was looking around for the ‘video texture’ buttons.:smiley:
I was certain I uploaded a ffmpeg crippled videotexture player onto graphicall!
Maybe your object needs a special active object name?
Edit, I guess not it’s just ‘cube’

Did you have any problem with the code ‘IMvideo.png’

and if you press ‘enter’ on the keyboard sensor it displays ‘return’ so that was probably working.

No I don’t have a problem, if I try to run the python script I get errors,
but if I just play it’s fine. I didn’t know 'Enter ’ fed out 'RET in the keyboard sensor,
Ive seen keyboards with RET before though, so I figured it was linux/apple thing or something. :smiley:
Not like you need a special keyboard to run linux.

I got it!!!

I had to enter Texture Face mode and turn off ‘lights’.

I still can’t get it to accept the image name rather than the material but I suppose I can work around that.

I’d like to know how to use the status attribute for debugging if anyone can explain how.