Hello,
I am trying to implement a multicast UDP Server module by using Gstreamer. On server side the data is payloaded as RTP MPEG2 TS packets, and on client side I want to use a SPD file in order to play the multicast stream sent by the server. I also use hardware acceleration capabilities on server side. For the moment I have the command below that are running well on the streaming server, but it only deals with video, NO AUDIO: "gst-launch-1.0 -v ximagesrc use-damage=0 ! multiqueue ! video/x-raw,format=BGRx,framerate=25/1 ! vaapipostproc format=i420 ! multiqueue ! vaapih264enc rate-control=cbr tune=none bitrate=6000 keyframe-period=25 ! video/x-h264,profile=baseline ! rtph264pay ! udpsink auto-multicast=true host=$STREAM_IP port=$STREAM_PORT" I want to add commands that treat audio and after mux audio and video with elements like "mpegtsmux" and send the result in my network on a multicast address. I have done this following command but it doesn't work, the streaming server starts running and stops with this errors: "Unrepairable overflow" "gst-launch-1.0 -v ximagesrc use-damage=0 ! multiqueue ! video/x-raw,format=BGRx,framerate=25/1 ! vaapipostproc format=i420 ! multiqueue ! vaapih264enc rate-control=cbr tune=none bitrate=3000 keyframe-period=25 ! video/x-h264,profile=baseline ! queue ! mux. autoaudiosrc ! audioconvert ! faac ! audio/mpeg, stream-format=raw ! aacparse ! queue ! mux. mpegtsmux name=mux ! rtpmp2tpay ! udpsink host=$STREAM_IP port=$STREAM_PORT auto-multicast=true" And finally i need a SPD file in order to play the stream sent by the streaming server (audio + video). Today I have this one but it only deals with video, NO AUDIO: m=video 5000 RTP/AVP 96 c=IN IP4 $STREAM_IP a=rtpmap:96 H264/90000 Thanks and Regards, Kheuch11 -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi!
You don't mux them with mpegts. Add mpegtsmux gebefore you send them with udp
Gesendet: Freitag, 06. Juli 2018 um 10:14 Uhr
Von: kheuch11 <[hidden email]> An: [hidden email] Betreff: Streaming audio and video over UDP Hello, I am trying to implement a multicast UDP Server module by using Gstreamer. On server side the data is payloaded as RTP MPEG2 TS packets, and on client side I want to use a SPD file in order to play the multicast stream sent by the server. I also use hardware acceleration capabilities on server side. For the moment I have the command below that are running well on the streaming server, but it only deals with video, NO AUDIO: "gst-launch-1.0 -v ximagesrc use-damage=0 ! multiqueue ! video/x-raw,format=BGRx,framerate=25/1 ! vaapipostproc format=i420 ! multiqueue ! vaapih264enc rate-control=cbr tune=none bitrate=6000 keyframe-period=25 ! video/x-h264,profile=baseline ! rtph264pay ! udpsink auto-multicast=true host=$STREAM_IP port=$STREAM_PORT" I want to add commands that treat audio and after mux audio and video with elements like "mpegtsmux" and send the result in my network on a multicast address. I have done this following command but it doesn't work, the streaming server starts running and stops with this errors: "Unrepairable overflow" "gst-launch-1.0 -v ximagesrc use-damage=0 ! multiqueue ! video/x-raw,format=BGRx,framerate=25/1 ! vaapipostproc format=i420 ! multiqueue ! vaapih264enc rate-control=cbr tune=none bitrate=3000 keyframe-period=25 ! video/x-h264,profile=baseline ! queue ! mux. autoaudiosrc ! audioconvert ! faac ! audio/mpeg, stream-format=raw ! aacparse ! queue ! mux. mpegtsmux name=mux ! rtpmp2tpay ! udpsink host=$STREAM_IP port=$STREAM_PORT auto-multicast=true" And finally i need a SPD file in order to play the stream sent by the streaming server (audio + video). Today I have this one but it only deals with video, NO AUDIO: m=video 5000 RTP/AVP 96 c=IN IP4 $STREAM_IP a=rtpmap:96 H264/90000 Thanks and Regards, Kheuch11 -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi,
I mux audio and video with "mpegtsmux" before payloading them with "rtpmp2tpay": "....*mux. mpegtsmux name=mux ! rtpmp2tpay !*...." Regards, -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi!
The video part seem ok, but i think the problem is in the audio part. Someone tells me mpegts support only mp2 and you send them raw.
I use the following command (on Windows, so ^ is like \ in linux):
Video part..... mux. \
directsoundsrc ! decodebin ! avenc_mp2 ! queue ! mux. ^
mpegtsmux alignment=7 name=mux ! ^ rtpmp2tpay ! ^ queue ! ^ udpsink host=224.1.1.1 port=5004 sync=true It works perfect, i can play also on some hardware player how support rtp protocol
Peter
Gesendet: Freitag, 06. Juli 2018 um 14:22 Uhr
Von: kheuch11 <[hidden email]> An: [hidden email] Betreff: Re: Aw: Streaming audio and video over UDP Hi,
I mux audio and video with "mpegtsmux" before payloading them with "rtpmp2tpay": "....*mux. mpegtsmux name=mux ! rtpmp2tpay !*...." Regards, -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hello,
Thanks for answering. With your help, I have finally done the command below which works (I receive video and audio) but when I playback the multicast stream the quality is not very good. Do you have any ideas in order to improve the quality? something to add on my gstreamer command or my SDP file? Gstreamer command on server side: "gst-launch-1.0 -v ximagesrc use-damage=0 ! multiqueue ! video/x-raw,format=BGRx,framerate=25/1 ! vaapipostproc format=i420 ! multiqueue ! vaapih264enc rate-control=cbr tune=none bitrate=3000 keyframe-period=25 ! video/x-h264,profile=baseline ! queue ! mux. pulsesrc device="alsa_output.xxx.monitor" ! queue ! audioconvert ! avenc_mp2 ! queue ! mux. mpegtsmux alignment=7 name=mux ! rtpmp2tpay ! queue ! udpsink auto-multicast=true host=$STREAM_IP port=$STREAM_PORT sync=true" SDP file for playback: v=0 a=tool:GStreamer c=IN IP4 $STREAM_IP m=video 5000 RTP/AVP 33 a=rtpmap:33 MP2T/90000 a=control:mpegts-transport Thanks in advance Regards, kheuch11 -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by P S
Hello,
Thanks for answering. With your help, I have finally done the command below which works (I receive video and audio) but when I playback the multicast stream the quality is not very good. Do you have any ideas in order to improve the quality? something to add on my gstreamer command or my SDP file? Gstreamer command on server side: "gst-launch-1.0 -v ximagesrc use-damage=0 ! multiqueue ! video/x-raw,format=BGRx,framerate=25/1 ! vaapipostproc format=i420 ! multiqueue ! vaapih264enc rate-control=cbr tune=none bitrate=3000 keyframe-period=25 ! video/x-h264,profile=baseline ! queue ! mux. pulsesrc device="alsa_output.xxx.monitor" ! queue ! audioconvert ! avenc_mp2 ! queue ! mux. mpegtsmux alignment=7 name=mux ! rtpmp2tpay ! queue ! udpsink auto-multicast=true host=$STREAM_IP port=$STREAM_PORT sync=true" SDP file for playback: v=0 a=tool:GStreamer c=IN IP4 $STREAM_IP m=video 5000 RTP/AVP 33 a=rtpmap:33 MP2T/90000 a=control:mpegts-transport Thanks in advance Regards, kheuch11 -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |