Migrating to gstreamer-1.0: cannot stream mpegts over udp

Robert Szelepcsenyi robert at tankred.sk
Sun Jan 20 15:07:48 PST 2013


Hi,



I need to migrate a simple transcoer from gstreamer-0.10 to gstreamer-1.0. It accepts an mpeg2ts stream over UDP (a satelite program streamed by getstream for example), transcodes video and audio into h264 and aac respectively and then rebroadcasts it again as mpeg2ts over udp.

The problem is that in gstreamer-1.0 I am unable to stream mpeg2ts over udp correctly, i.e. one PES packet per one UDP packet. udpsink generates huge packets and also some other junk that shows as ip protocol 17 in tcpdump.

Gstreamer-0.10 contained flutsmux, which generated correct packets. However, i cannot find this plugin in gstreamer-1.0. Another option in gstreamer-0.10 was to send the output from mpegtsmux through mpegtsparse, which is also gone in gstreamer-1.0. I have found tsparse, which is probably a replacement, but it does not help to split mpegts into small packets.

The pipeline is as follows:

gst-launch-1.0 -vvv \
udpsrc uri=udp://127.0.0.1:8006 ! \
tsdemux ! mpeg2dec ! queue2 ! videoconvert ! x264enc byte-stream=1 ! h264parse ! \
mpegtsmux ! udpsink host=192.168.1.110 port=1234

And the nonsense it produces looks like this:

00:01:52.649244 IP 192.168.2.51 > 192.168.1.110: ip-proto-17
00:01:52.689161 IP 192.168.2.51.36693 > 192.168.1.110.1234: UDP, length 5640
00:01:52.689170 IP 192.168.2.51 > 192.168.1.110: ip-proto-17
00:01:52.689172 IP 192.168.2.51 > 192.168.1.110: ip-proto-17
00:01:52.689174 IP 192.168.2.51 > 192.168.1.110: ip-proto-17
00:01:52.729153 IP 192.168.2.51.36693 > 192.168.1.110.1234: UDP, length 9776
00:01:52.729163 IP 192.168.2.51 > 192.168.1.110: ip-proto-17

If I use filesink to put the output into a file, I can play the contents without any problem. 

Another problem is that i cannot process audio in any way. A pipeline like this:

gst-launch-1.0 -vvv \
udpsrc uri=udp://127.0.0.1:8006 ! \
tsdemux ! mad ! queue2 ! audioconvert ! faac ! \
mpegtsmux ! udpsink host=192.168.1.110 port=1234

causes a totallz cryptic error "Internal data flow error".


Robert Szelepcsényi


More information about the gstreamer-devel mailing list