- Home /
Dynamic texture / Video stream ?
Hello,
I need to be able to display a texture created in real time by an external proprietary application running on the same PC (in windows XP or 7).
I thought to several ways but I don't know which is better
1/ My application writes the image on the HDD and I load it from the HDD in unity. I think this is the worst solution as my image may change at high rate (more than 1 time per second) and writing the image on the disk will be very heavy.
2/ My application creates a MapFile in shared memory and writes in it the raw bytes of my image. Then, through a plugin in Unity, I get the image raw bytes from the mapfile, I transform this into a jpg image in memory and transfers it into unity, then I use Texture2D LoadImage to create the texture and then I apply my texture. This seems heavy too.
3/ My application creates an internal webserver in the PC and I use WWW.texture to get my image. I think this way will be heavy as well and will not get good performances.
4/ My application creates a video stream (feed) in memory and unity get access to this video stream and displays it as a texture. this solution sounds the best to me but I have no clue on how to realize it (from unity side)
what do you think ?
Thanks in advance for your help and your replies.
Antoine
Up but I simplify my question
Is it possible to display a dynamic texture co$$anonymous$$g from a video stream generated by an external application on the same PC. This video stream would be "broadcasted" directly in shared memory (map file or anything else) by the external application and displayed as is as a texture by unity (may be through a plugin if necessary).
thanks in advance for your help
Antoine
I have done this with Sockets which basically sets up a socket listener in Unity and your other app sets up a socket sender. There is help in this forum if you search on Sockets.
Answer by thelghome · Jul 02, 2019 at 04:43 PM
If someone is still looking for a solution, this plugin can help.
FM Exhibition Tool Pack | Forum
You can stream game view / webcam / audio between multiple platforms in local network. All written in C# and easy to modify.
Supported Platform: iOS/Android/Mac/PC
Your answer
Follow this Question
Related Questions
Displaying streaming video as a dynamic texture. 0 Answers
Dynamicaly load a video on a GameObject 1 Answer
Dynamic render with paint splatter effect 0 Answers
My Dynamic texture not showing up in the Build??? 0 Answers
RTMP Video Stream in Unity 2 Answers