Does pulsesrc work

Nicolas Dufresne nicolas at ndufresne.ca
Tue Oct 12 14:18:48 UTC 2021


Le mardi 12 octobre 2021 à 20:07 +0800, James via gstreamer-devel a écrit :
> Hi
> I have an ongoing issue with pulsesrc.
> 
> I build test-video.c from gst-rtsp-server/examples.
> It has a line like this and works just fine:
> 
>   gst_rtsp_media_factory_set_launch (factory, "( "
>       "videotestsrc ! video/x-raw,width=352,height=288,framerate=15/1 ! "
>       "x264enc ! rtph264pay name=pay0 pt=96 "
>       "audiotestsrc ! audio/x-raw,rate=8000 ! "
>       "alawenc ! rtppcmapay name=pay1 pt=97 " ")");
> 
> I then modify the src so:
> 
>   gst_rtsp_media_factory_set_launch (factory, "( "
>       "videotestsrc ! video/x-raw,width=352,height=288,framerate=15/1 ! "
>       "x264enc ! rtph264pay name=pay0 pt=96 "
>       "pulsesrc device=0 ! audio/x-raw,rate=8000  ! "
>       "alawenc ! rtppcmapay name=pay1 pt=97 " ")");
> 
> changing audiotestsrc to be pulsesrc device=0
> This stutters every sec or two. The DEBUG trace shows nothing significant. Unless there is magic for pulsesrc I have to conclude that pulsesrc does not work. 

pulsesrc is live src, it can only accumulate a fixed amount of audio data before
loosing some (stutter). x264enc default setting is very high latency. It's not
as bad, because you use videotestsrc as non-live source (see is-live property).
setting that to be live will just make the issue even more visible.

Add queue after pulsesrc if you really want to maintain several seconds of
latency, or use tune=zerolatency on x264enc to reduce the video path latency.

> Anybody ?
> James




More information about the gstreamer-devel mailing list