mrayGStreamerUnity
mrayGStreamerUnity copied to clipboard
No output stream from unity
Firstly, I gotta say that your plugin is awesome. I have been using it a lot. I recently tried streaming out of unity from a unity camera, and it isn't working. I am using the exact commands as in the example hint, but with no result. I was hoping you could give me some troubleshooting tips, as I have no idea where to start.
My firewall is turned off, and the other examples work well.
Thanks!
Hi, Do you mean scene Test 4? The streaming functionality should be working, there is no extra dependency on other plugins.
Could you try to set the Pipeline value in the MainCamera CustomVideoStreamer component to the following: autovideosink sync=false
A display should popup with the contents of the scene.
One more thing might be causing the issue, its simply the unity editor goes inactive, and thus the streaming stops. Go to Player Settings and enable Run In Background flag under Resolution and Presentation tab.
"autovideosink sync=false" does indeed pop up a window showing the unity stream. As for running in the background, I had already given that a shot. 😄 So it must be an issue with either the rest of the stream command, or the receiving end?
OK so I did a test and ran this in cmd:
gst-launch-1.0 videotestsrc ! x264enc name=videoEnc bitrate=5000 tune=zerolatency pass=qual ! rtph264pay ! udpsink host=127.0.0.1 port=7000 sync=false
And this in another cmd window:
gst-launch-1.0 udpsrc port=7000 ! application/x-rtp ! rtpjitterbuffer ! rtph264depay ! decodebin ! videoflip method=5 ! autovideosink sync=false -v
But I get nothing. Is Gstreamer setup wrong? This works:
gst-launch-1.0 videotestsrc ! autovideosink sync=false
OK so I did a test and ran this in cmd:
gst-launch-1.0 videotestsrc ! x264enc name=videoEnc bitrate=5000 tune=zerolatency pass=qual ! rtph264pay ! udpsink host=127.0.0.1 port=7000 sync=false
And this in another cmd window:
gst-launch-1.0 udpsrc port=7000 ! application/x-rtp ! rtpjitterbuffer ! rtph264depay ! decodebin ! videoflip method=5 ! autovideosink sync=false -v
But I get nothing. Is Gstreamer setup wrong? This works:
gst-launch-1.0 videotestsrc ! autovideosink sync=false
I can use your command as the sender and the following command to play the videotestsrc:
gst-launch-1.0 -v udpsrc port=7000 caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(s tring)H264, payload=(int)96" ! rtpjitterbuffer latency=20 ! rtph264depay ! decodebin ! videoconvert ! fpsdisplaysink
However, I find that the streamer in the Unity cannot send out udp packet. I capture it with Wireshark and I can see the packet from cmd sender but cannot see any output from Unity scene Test4. No errors in the Unity at the same time...Have you solved this problem?