Video Texture + synced Audio in Blender 2.5 - demo file

Thanks to Benoit Bolsee and Joerg Mueller recent commits we can now have Video and audio synced in BGE. Grab a blender 2.5 after revision 26708 and try it yourself !

Files needed:

1 Like

wow great ! … will have a try on this this week …

exelent ! it works out of the box with 2.5 alpha 1 ! …

I also like the way to call the function in 2.5 by calling the module and not the script…

I think I’ll use this version for my rework on my piece, showing here soon : http://cheminsdonde.be

Yes, GREAT!!!
Thank you for sharing!
Bye

how to put the video on texturevideo, but when I click the video it does not play the audio, do I run the audio with the video?
using Blender 2.49, use this feature to load the intro of the game I’m developing my tcc …

Works great with a single video texture within game.
But how can I make it handle multiple videos in different scenes?

I dont understand how this works. Controllers in the logic bricks refers to python modules which i cant found anywhere.

It does not work anymore with blender 2.57a. If someone knows why …
Not sure I can find where the problem comes from; I shall have a look to the 2.57 api…

On my PC it is working.
Windows XP 32 bit
Blender 2.57a 32 bit

Both files play_video_sound.blend and trailer_400p.ogg must be in the same directory.

It works with latest Blender with no problems. One thing I noticed is that the only audio system that works fine (here testing on windows) is the OpenAL. Change this in the user preference settings.

Don’t work.

The sound works fine, but the video freeze and after 3 second, blender crash.

I’m using Windows 7, 64 bits with blender 2.57.

I have tested it now on Windows 7 64 Bit:
Blender 2.57 32 bit --> no video, no blender crash
Blender 2.57 64 bit --> not video, no blender crash
Blender 2.57a 32 bit --> not video, no blender crash

The fault is that G.sound.time always gives 0.0 back.

Can you make sure your sound system is set to OpenAL?

Can you make sure your sound system is set to OpenAL?

Yes the sound system was set to OpenAL. But I found my fault. I haven’t connected a loudspeaker to the test PC, so Windows 7 did not initialized the audio driver.

Windows 7 64 Bit:
Blender 2.57 32 bit OpenAL --> working good
Blender 2.57a 32 bit OpenAL --> working good
Blender 2.57b 32 bit OpenAL --> working good

Blender 2.57 32 bit SDL --> working but the video is jerking
Blender 2.57a 32 bit SDL --> working but the video is jerking
Blender 2.57b 32 bit SDL --> working but the video is jerking

Blender 2.57 64 bit --> video freeze and after 4.2 second
Blender 2.57b 64 bit --> video freeze and after 4.2 second

I have tested Blender 2.57(b) 64 bit it with the video texture example form the tutorialsforblnder web site but with the same result.
So I think it must be a bug in Blender 2.57(b) 64 bit oder in the video texture module. http://www.tutorialsforblender3d.com/Game_Engine/VideoTexture/VideoTexture_Movie_1.html

Hello.

It does work through blender 2.57B.

But blenderplayer 2.57B generates an error:

AttributeError: ‘module’ object has no attribute ‘sound’
Python script error - object ‘Cube’, controller ‘c_update#CONTR#2’:
Traceback (most recent call last):
File “/home/me/Blender/scripts/video.py”, line 28, in update
G.video.refresh(True, G.sound.time)

I have a script file named video.py int the directory of your blender file.
Because it cannot find modules in the internal blender vieo.py script.

That is what I want for this point!

Video plays ok with Xp or Seven.

I have no sound with blenderplayer 2.57b and ubuntu 10.10.
If someone knows how to use sound using Blenderplayer 2.57b and Ubuntu…
It is not a user group problem: doing sudo ./myRuntime does not solve the problem.
It is not a Sdl or OpenAl setting in Blender.

I have no sound at all, not only for video; probably sound is not implemented in blenderplayer 2.57b, Linux version (implemented for windows)

It works for me in 2,57
change the script to
from bge import logic as GL

in trunk audio is working in blenderplayer. It was fixed last week
edit: and the file (as it’s) it’s working in trunk. I just tested.

Hey, works for me in w7 and blender 2.57
But has anyone been able to run the webcam as videotexture in real time?
in the first editions of VideoTexture script, it was amazing.
http://www.ashsid.sk/wp/?p=8⟨=en-us
I would get the same at 2.57
Thanks and regards