im working right now the first time with VideoTextures in Blender.
I have right now a little problem, I know that my webcam is a Video4Linux2 Device - is it possible that it can work with the actual Blender Version?
I saw this post -> http://www.blender.org/forum/viewtopic. ... hlight=v4l and I thought - maybe there is already a solution for this? (Because the post is from 2008).
This is the Code that i use - is there something wrong?
Code: Select all
import GameLogic as G
import VideoTexture as VT
cont = G.getCurrentController()
obj = cont.owner
matID = VT.materialID(obj, 'MAvideo')
G.video = VT.Texture(obj, matID)
S1 = G.expandPath("/dev/video0")
video_source = VT.VideoFFmpeg(S1, 1, 25.0, 320, 240)
video_source.repeat = -1
video_source.scale = True
#video_source.flip = False
#video_source.deinterlace = True
G.video.source = video_source
#sound = cont.actuators["a_sound"]
#G.sound = sound
Thank you for your help