Muxing and webrtcechoprobe

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

Muxing and webrtcechoprobe

Andrés Meseguer Valenzuela

Hi, I am trying to send audio and video muxed in MPEG in order to send  
it via UDP. Besides, I would like to apply echo cancellation, hence  
here is an example of the desired pipeline:

gst-launch-1.0 -v ksvideosrc ! video/x-raw, height=480 ! videoconvert  
! queue  ^
! x264enc ! queue !  mpegtsmux name=mux ! queue ! udpsink host=ip  
port=5605 autoaudiosrc ^
! audioresample  ! queue ! audioconvert ^
! queue ! webrtcdsp ! queue ! opusenc ^
! queue ! mux. -e udpsrc port=5605 ^
! queue ! tsdemux name=demux demux.^
! queue !  h264parse ! queue ! avdec_h264 ! queue! videoconvert ^
! autovideosink demux. ! queue ! opusdec ! queue ! webrtcechoprobe !  
audioconvert ! autoaudiosink sync=false

But the problem is that when my pipeline is executed, it gets stuck:

/GstPipeline:pipeline0/GstQueue:queue2.GstPad:sink: caps =  
video/mpegts, systemstream=(boolean)true, packetsize=(int)188,  
streamheader=(buffer)<  
47400031a600ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000b00d0001c100000001e020a2c32941, 474020318800ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0002b02b0001c10000e041f0001be041f00a050848444d56ff1b443f06e042f00a05044f7075737f0280024f4f6a17 >                                                           0:00:00.0 /  
99:99:99.


Can you help me to solve this problem?
Thank you.
Regards,
Andrés.

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

Re: Muxing and webrtcechoprobe

Nicolas Dufresne-5
Le jeudi 29 octobre 2020 à 11:54 +0100, Andrés Meseguer Valenzuela a
écrit :

> Hi, I am trying to send audio and video muxed in MPEG in order to send  
> it via UDP. Besides, I would like to apply echo cancellation, hence  
> here is an example of the desired pipeline:
>
> gst-launch-1.0 -v ksvideosrc ! video/x-raw, height=480 ! videoconvert  
> ! queue  ^
> ! x264enc ! queue !  mpegtsmux name=mux ! queue ! udpsink host=ip  
> port=5605 autoaudiosrc ^
> ! audioresample  ! queue ! audioconvert ^
> ! queue ! webrtcdsp ! queue ! opusenc ^
> ! queue ! mux. -e udpsrc port=5605 ^
> ! queue ! tsdemux name=demux demux.^
> ! queue !  h264parse ! queue ! avdec_h264 ! queue! videoconvert ^
> ! autovideosink demux. ! queue ! opusdec ! queue ! webrtcechoprobe !  
> audioconvert ! autoaudiosink sync=false

Unrelated to your hang, but echo cancellation only works with strict
synchronization enabled. Disabling sync may break webrtcdsp. Also, all
audio sink in gstreamer have too high latency at default playback
settings for echo cancellation. Reconfigure you sink buffer-time to a
small value, ideally a multiple of the latency-time.

>
> But the problem is that when my pipeline is executed, it gets stuck:

The stall is likely due to too high latency introduced by x264enc in
default setting. As a quick start, perhaps add tune=zerolatency to
x264enc. You probably also want to control the key frame distance and
bitrate.

>
> /GstPipeline:pipeline0/GstQueue:queue2.GstPad:sink: caps =  
> video/mpegts, systemstream=(boolean)true, packetsize=(int)188,  
> streamheader=(buffer)<  
> 47400031a600ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000b00d0001c100000001e020a2c32941, 474020318800ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0002b02b0001c10000e041f0001be041f00a050848444d56ff1b443f06e042f00a05044f7075737f0280024f4f6a17 >                                                           0:00:00.0 /  
> 99:99:99.
>
>
> Can you help me to solve this problem?
> Thank you.
> Regards,
> Andrés.
>
> _______________________________________________
> 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