I'm using gstreamer to stream over a custom AppSink that mimics the UdpSink. We are doing it this way so we can incorporate listening on other ports for some metadata. Plus, the stock UdpSink is broken. Anyway, I've successfully had video streamed, but the UDP packets seem to be not packaged correctly. I'm wondering if I have missed some step.
Here's my sending pipeline:
filesrc (mpeg TS file) ! displayQueue ! streamTee ! tsdemux ! decoder ! videosink
streamTee ! sendQueue ! udpSink (our custom one)
the receiving end:
UdpSrc (custom) ! queue ! mpegtsdemux ! queue ! (mpegdecode || h264decode) ! ... ! videosink
Streaming works. But it seems very fragile. Sometimes it just stops. There are lots of artifacts.
So, I tried VLC. I set it up to stream over UDP unicast. It works great. I noticed that VLC sends out the video way different than my pipeline. I used Wireshark to analyze the packets:
PMT packets and all other sorts of TS-related stuff)
It seems like the pipeline I'm using is just sending raw video over UDP without any error correction. What am I missing? The videos used are h264 or mpeg encoded
I am using gstreamer-java to program the custom UdpSink and UdpSrc elements, but cannot use gstreamer in the console to test since the stock UdpSink plugin is broken. I tried a simple pipeline in a Linux VM, and got a similar bunch of packets as VLC:
gst-launch-0.10 -v videotestsrc ! mpeg2enc ! mpegtsmux ! udpsink host=192.168.2.100 port=1234