video issues

hi to all,

Two issues below if anyone can advice on something…

In the application we am trying to develop, we need two windows, the main application and a GUI window.
Also we have two monitors. I want to ask if is possible when the program start, to set the monitor that each window will start.( in fullscreen)

Moreover I am trying to load an avi video with the code below:

        cm = CardMaker('Movie')
        self.movieCardEntrance = render2d.attachNewNode(cm.generate())

When the video is playing through panda(in a window that has exactly the same dimensions with the video) I see some lines inside the video especially when the peoples in the video are moving and in general the resolution is not good although the video is ok in a normal player.

Is there something to configure in order to play the video in the original quality?
The codec of the video is YUY2. Is there a codec with better results?


The easiest way to open a Panda window on a particular monitor is to open an ‘undecorated’ window (rather than a true fullscreen window) at the appropriate size and origin to cover the desktop on that monitor.

However, if you do require a true fullscreen window, for instance because you need to change the monitor resolutions, I believe this is possible, but it takes a little bit more effort. I’d have to look into the interface.

As to the artifacts you’re reporting: does the video have the same artifacts if you play it via ffmpeg on the command line? Panda uses ffmpeg as its video library, and displays exactly the pixels that ffmpeg returns.

You might also try ensuring your video sync is enabled with ‘sync-video #t’, to avoid the “tearing” artifact that you might get without video sync.


thank you drwr for the prompt reply.

my problem at least for the moment is not the fullscreen. I want to load for example the one window(e.g main application) to monitor 1 and the GUI application to monitor 2 by default.
Is this possible?

About the video, I used the sync-video option and the problem remains.
How can I play the video via ffmpeg though command line? I loaded the video from the media player example and I have the same problem.

I believe it’s something like “ffmpeg -i file.avi” to play ffmpeg from the command line.

To open a window on the second desktop, use something like:

wp = WindowProperties()
wp.setSize(640, 480) # or whatever
wp.setOrigin(1280, 0) # the origin of your second desktop
base.openWindow(props = wp)


thank you David.
your suggestion for the second desktop works.

I can’t use the ffmpeg through command line.
do I have to install something more?

I have the same issue when I load the video through the media player sample.