udp audio streaming issue

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

udp audio streaming issue

pradeep.linux
Hi All,

I am trying to record video + audio from udpsink but audio plays for only 1 second,after that there is no audio . Also I am getting jitters in video.
Can you Please help?

Below are my pipelines for sending and receiving udp stream, Please correct me.

sender: (embedded board - db820c)
gst-launch-1.0 -e v4l2src device=/dev/video10 ! videoconvert ! video/x-raw,format=NV12,width=1280,height=720 ! v4l2h264enc extra-controls="controls,h264_profile=4,video_bitrate=10000000;" ! h264parse config-interval=10 ! queue ! mpegts. alsasrc name=hello1 ! webrtcdsp echo-cancel=true noise-suppression=true ! webrtcechoprobe ! 'audio/x-raw,format=S16LE, rate=48000' ! queue max-size-time=20000000000 max-size-bytes=204857600 max-size-buffers=3000 ! audioconvert ! avenc_aac ! aacparse ! mpegts.  mpegtsmux name=mpegts  ! rtpmp2tpay ! udpsink host=192.168.51.6 port=5000

Receiver: (my laptop)
gst-launch-1.0 -e -v qtmux name=mix ! filesink location=out.mp4 udpsrc port=5000  !  tsparse ! tsdemux name=demux demux. ! queue ! h264parse ! avdec_h264 ! videoconvert ! mix. demux. ! queue ! aacparse ! avdec_aac ! audioconvert ! voaacenc ! mix.

Thanks,
Pradeep

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: udp audio streaming issue

Tim Müller
On Tue, 2019-02-05 at 11:59 +0530, Pradeep Reddy wrote:

Hi,

> I am trying to record video + audio from udpsink but audio plays for
> only 1 second,after that there is no audio . Also I am getting
> jitters in video.
> Can you Please help?
>
> Below are my pipelines for sending and receiving udp stream, Please
> correct me.

> sender: (embedded board - db820c)
> gst-launch-1.0 ... mpegtsmux name=mpegts
> ! rtpmp2tpay ! udpsink host=192.168.51.6 port=5000
>
> Receiver: (my laptop)
> gst-launch-1.0 udpsrc port=5000  !  tsparse ! tsdemux ...

Your are RTP-payloading the MPEG-TS stream from mpegtsmux. That's fine,
but not strictly required. You can also send the MPEG-TS stream
directly without RTP payloading (in which case use mpegtsmux
alignment=7).

If you RTP payload the stream, the receiver side should look something
like:

  udpsrc ! rtpjitterbuffer ! rtpmp2tdepay ! tsdemux ...

and if you don't RTP payload the stream, something like:

  udpsrc ! queue ! tsdemux ! ...  should work.

Cheers
 Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: udp audio streaming issue

pradeep.linux
Thanks Tim.

When i try to do live streaming(audio + video ) from sender to receiver,
there is video & audio lag of ~500 ms to 1second at receiver. Can you Please
suggest on how to correct this?. Also please suggest how to get rid of
slight jitter in video at receiver.

Below are my pipelines.

*sender:(db820c)*
gst-launch-1.0 -e v4l2src device=/dev/video10 ! videoconvert !
video/x-raw,format=NV12,width=1280,height=720 ! v4l2h264enc
extra-controls="controls,h264_profile=4,video_bitrate=10000000;" ! h264parse
config-interval=10 ! queue ! mpegts. alsasrc name=hello1 ! webrtcdsp
echo-cancel=true noise-suppression=true ! webrtcechoprobe !
'audio/x-raw,format=S16LE, rate=48000' ! queue max-size-time=20000000000
max-size-bytes=204857600 max-size-buffers=3000 ! volume volume=10.0 ! level
! audioconvert ! avenc_aac ! aacparse ! mpegts.  mpegtsmux name=mpegts
alignment=7 ! udpsink host=192.168.51.6 port=5000

*Receiver:(my laptop)*
gst-launch-1.0 -e -v udpsrc port=5000 ! tsdemux name=demux demux. ! queue
max-size-bytes=0 max-size-buffers=0 max-size-time=0 leaky=downstream !
h264parse ! avdec_h264 ! videoconvert ! autovideosink  demux. ! queue
max-size-bytes=0 max-size-buffers=0 max-size-time=0 leaky=downstream  !
aacparse ! avdec_aac ! audioconvert ! autoaudiosink

Thanks,
Pradeep



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: udp audio streaming issue

Nicolas Dufresne-5
Le mercredi 06 février 2019 à 10:00 -0600, pradeep.linux a écrit :

> Thanks Tim.
>
> When i try to do live streaming(audio + video ) from sender to receiver,
> there is video & audio lag of ~500 ms to 1second at receiver. Can you Please
> suggest on how to correct this?. Also please suggest how to get rid of
> slight jitter in video at receiver.
>
> Below are my pipelines.
>
> *sender:(db820c)*
> gst-launch-1.0 -e v4l2src device=/dev/video10 ! videoconvert !
> video/x-raw,format=NV12,width=1280,height=720 ! v4l2h264enc
> extra-controls="controls,h264_profile=4,video_bitrate=10000000;" ! h264parse
Nitpick: You should use caps negotiation to setup profile and level.

> config-interval=10 ! queue ! mpegts. alsasrc name=hello1 ! webrtcdsp
> echo-cancel=true noise-suppression=true ! webrtcechoprobe !

Hmm, you'll have to tell me what you are trying to suppress here. And
echo probe should be placed into another branch of your pipeline, next
to where you have loud speaker playback (alsasink/pulsesink). Though,
using noise-supression should work, you don't need an echo probe for
that.

> 'audio/x-raw,format=S16LE, rate=48000' ! queue max-size-time=20000000000
> max-size-bytes=204857600 max-size-buffers=3000 ! volume volume=10.0 ! level
> ! audioconvert ! avenc_aac ! aacparse ! mpegts.  mpegtsmux name=mpegts

Latency wise the choice of MPEG TS isn't a great choice. To be
compliant, the receiver will need to introduce 700ms latency. I would
rather use an RTP pipeline (just rtp payload on sender and
rtpjitterbuffer on receiver as a first iteration).

> alignment=7 ! udpsink host=192.168.51.6 port=5000
>
> *Receiver:(my laptop)*
> gst-launch-1.0 -e -v udpsrc port=5000 ! tsdemux name=demux demux. ! queue
> max-size-bytes=0 max-size-buffers=0 max-size-time=0 leaky=downstream !
> h264parse ! avdec_h264 ! videoconvert ! autovideosink  demux. ! queue
> max-size-bytes=0 max-size-buffers=0 max-size-time=0 leaky=downstream  !
> aacparse ! avdec_aac ! audioconvert ! autoaudiosink
>
> Thanks,
> Pradeep
>
>
>
> --
> 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

signature.asc (201 bytes) Download Attachment