PDA

View Full Version : Playing a video on a object that is moving.


Jose
05-16-2013, 01:03 PM
Hi,

Some background to understand my problem.

In my code I have a car that you can drive with the keyboard.

I added a plane (geometric plane, not an airplane) in front of the car. I have a parent relationship between the plane and the car. So that the plane moves with the car.

Then I want to project a video in the plane that is in front of the car. So I apply the video with a texture (myScreen.texture(LCVideo))

I get this error message:

** ERROR: Failed to construct graph (Pins cannot connect due to not supporting the same transport.)
** ERROR: Failed to load video: 'LandoltCTest.avi'

I'm able to play the video on another code so its not the video.

Below is the part of the code of interest:

LCVideo = viz.addVideo( 'LandoltCTest.avi' )
myScreen = vizshape.addPlane( size=(0.5,0.5),axis=vizshape.AXIS_Y,cullFace=True)
myScreen.parent(self.body)
myScreen.setPosition([0,.75,1])
myScreen.setEuler([0,-90,0])
myScreen.texture(LCVideo)

Thank you of any help that can be given here. This is my first post.

Jeff
05-17-2013, 03:01 PM
The code you posted looks fine. Was the other code that loaded the video running on a different machine?

Jose
05-20-2013, 07:21 PM
It was the same machine, same video for both codes.

Jeff
05-21-2013, 01:42 PM
Can you attach or upload (http://upload.worldviz.com) a simple script with the video that reproduces the issue?

Jose
05-22-2013, 11:23 AM
Here are the files. (https://notredame.box.com/s/96epe30c57whx3ynq1o7)

The Racetrack.py file is the one to run. The code posted in the first post is from Car.py line 257 to 270.

The code where the video work is Vizard1TestMovie.py

Thanks

lee.cofer
01-29-2015, 08:52 AM
Has this problem been resolved?

I am getting the same error when I try to use .addvideo, as the original poster did.

It does work when I run it in Vizard4, but when I run it in Vizard5 it throws the error.

Any thoughts?

farshizzo
01-29-2015, 08:57 AM
Are you running the 64-bit version of Vizard 5?

lee.cofer
01-29-2015, 01:02 PM
Yes, its the 64 bit version.

farshizzo
01-29-2015, 01:22 PM
Do you have the 64-bit version of any necessary video codecs installed on your system?