Streaming videos from server.

Hello everyone… I new at Panda3D. So my question is this…is it possible to stream a video from a server to a texture in the current code library? Kind of like YouTube but directly to a texture in Panda3D? Hope someone answer this question. Thanks…

While Panda doesn’t have streaming capabilities natively, I think you can do video streaming with Gstreamer, its python bindings and the RTSP plugin. You just have to figure out a way to get the output of Gstreamer into an image of some sort and use that as a texture in Panda.

note that AR Toolkit was added to panda not all that long ago.
i also think there where a few threads about displaying webcam captures on textures. you might find a few more hints there.
in any case it definetly is possible…somehow.

Ok, thanks for the replies! Another thing, did Toontown Online or Pirates of the Caribbean Online used the networking API of Panda3D?

Both Toontown and Pirates use the DistributedObject network system in Panda, which is provided with the public Panda distribution, though very poorly documented.


About the video streaming thing, Gstreamer might actually be a bit too unwieldy to integrate into Panda as it has GTK as part of its dependencies. FFMpeg might be a better solution, it seems that it has limited RTP support, which might be enough for your project. Also, FFMpeg has a server and I think I read somewhere that FFMpeg power YouTube so FFMpeg might actually solve all your problems.

To interface FFMpeg with Panda there is either PyMedia, which is based on an old version of FFMpeg but has more features (I think) or you could look into PyFFMpeg which uses a newer version of FFMpeg but I’m not sure if that opens streams.

You know, panda already uses ffmpeg to read videos from disk. If it’s just a question of connecting to a server and reading the same as you would from disk, it’s probably pretty easy.

Thanks for the quick replies. I’m thinking of using the live555 libraries for rstp videos streaming. Just need to find a way to integrate it into Panda3D.

There are two classes, MovieVideo and MovieVideoCursor, in panda/src/movies. To create a new video source, you subclass these. There are sample classes in there to show what’s involved in doing so. There’s even a demo subclass, InkblotVideo and InkblotVideoCursor, which make a movie out of a simple cellular automaton.

I was looking through the DistributedObject classes and they look very very interesting, if I’m reading this right you can tie a NodePath directly into a network control. I appreciate that you don’t have too much time to write proper documentation for it but could you provide even a skeleton code for how to use the DistributedObject network system?

I believe the community can take it from there and add whatever we learn and more to the documentation. The networking module is quite a big gaping hole in the Panda documentation and if Panda can provide well documented network code that is already proven to work in an MMO and is simple-ish to work with (in the Panda scenegraph thing anyway) I believe it might be a big draw for even more people to use Panda.

Some community members have already experimented with this system and written some documentation and a sample program or two. Try searching the forums.


all i could find in the past was basic networking useage. like establishing connections and seding strings or integers. i couldnt remember any documentation about higher-level thing slike distributedNode

Hmm, I guess I was thinking about the old chat server sample program. This thread: is probably a good a place to start about that. But, yeah, still not much in the way of real documentation.

There has been some resistance to the proposal of fully documenting and packaging the full DistributedObject system. The feeling among some Panda developers is that this system is not really very useful outside the VR Studio’s needs, and that Panda3D should provide a very different and much better networking system instead.