I’m trying to get video4Linux to output to the videotexture. According to the wiki this is possible, but it doesn’t say how. I tried switching the source to /dev/video0 (this is a webcam in my laptop, it works perfect in cheese and skype, so it is not a driverproblem). If I switch the source to an avi and ad
GameLogic.video.source.play()
GameLogic.video.source.repeat =-1
it all works well. But /dev/video0 gives me nothing. What am I doing wrong? This is my code:
import VideoTexture
contr = GameLogic.getCurrentController()
obj = contr.owner
if not hasattr(GameLogic, 'video'):
matID = VideoTexture.materialID(obj, 'IMVJWall')
GameLogic.video = VideoTexture.Texture(obj, matID)
movie = '/dev/video0'
GameLogic.video.source = VideoTexture.VideoFFmpeg(movie)
GameLogic.video.source.scale = True
if hasattr(GameLogic, 'video'):
GameLogic.video.refresh(True)