So in theory, I should be able to run 12 RTSP streams in Unity. I've also tested 12 HTTPS Live Stream (HLS) in a browser and it also runs just fine. I've run 12 VLC instances playing 12 separate RTSP streams on computer #2 and it runs just fine. Ultimately, I need to stream 6-25 streams into Unity depending on the situation. When I'm at work, I normally use the Matrox Maevex 6150 video encoders for streaming - Since I'm stuck at home I'm using VLC running on my other PC for testing.
I added a variable in the inspector so I can mute the audio. Do you need additional/different flags? isConnected, isAudioPlaying, isVideoPlaying If the video is not playing on the screen (meaning it connected to the stream, but is only showing a single image on the screen as if it were frozen), the isPlaying flag is still set to true. How do I know when a stream disconnects so I can try to reconnect?
_mediaPlayer.Media is never equal to null. There doesn't seem to be a way to tell if the stream never connects. I have not run #1 (closed) and #2 together at the same time. At 120 it starts to look like stop motion video. This seems to help with performance issues.
#Unity 5.3.6f1 update
I've run it with a code modification where I only call "_mediaPlayer.GetTexture(out bool update)" once every 30, 60 and 120 passes in the Update loop. I've run it with a code modification where I only update the texture once every 30 "if (updated)" in the Update loop. Occasionally, I've gotten seven screens to play at the same time.Įven though a video stops playing, the audio is still playing! Zero to three screens may stop playing after 1-3 seconds. Occasionally only two screens don't connect.Īll eight screens have never played video at the same time. The last screen may connect, and for some reason it's always the same screen - it may or may not play. In Unity, I have eight VLC screens, each connecting to a different RTSP stream.Īll eight screens connect to their stream some of the time.
#Unity 5.3.6f1 pro
All are on loop.Ĭomputer #2 is a Corsair One Pro (i7-7700K CPU 4.20GHZ, 32GB RAM, GTX 1080) running Unity. Display locally, no active transcoding, H264 + MP3(MP4). For testing, I'm using two computers.Ĭomputer #1 (closed) is using eight instances of VLC 3.0.8 to stream eight different videos over RTSP. My use case requires multiple RTSP streams playing on multiple VLC screens in Unity. I only have a few issues I hope you can help me with. Thank you for making VLC available for Unity! I just bought the asset yesterday and it's working great thus far.