Streaming audio and video over UDP

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Streaming audio and video over UDP

kheuch11
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
P S
Reply | Threaded
Open this post in threaded view
|

Aw: Streaming audio and video over UDP

P S
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
Reply | Threaded
Open this post in threaded view
|

Re: Aw: Streaming audio and video over UDP

kheuch11
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
P S
Reply | Threaded
Open this post in threaded view
|

Aw: Re: Streaming audio and video over UDP

P S
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