GStreamer input from a named pipe?

Nicolas Dufresne nicolas at
Tue May 17 17:13:57 UTC 2022

Le mardi 17 mai 2022 à 08:04 -0700, Patrick Cusack via gstreamer-devel a écrit :
> Is there an officlal way to read from a unix named socket?
> I was reading the documentation for socketsrc and that component is for internal gstreamer sockets according to the documentation.
> I can output from ffmpeg (so as to apply a filtergraph to correct video levels which gstreamer can not do):
> My ffmpeg script is as follows:
> ffmpeg -y -format_code 23ps -f decklink -f decklink -i 'UltraStudio Recorder 3G' -r 24000/1001 -s 1920x1080 -map 0:v:0 -f yuv4mpegpipe -pix_fmt yuv420p -listen 1 unix://var/temp/pc_ffmpeg_socket
> But how would I read the output of ffmpeg? The fdsrc component wants a file descriptor likely from a pipe? 
> gst-launch-1.0 -e -v fdsrc fd=0 ! autovideosink

fdsrc is the right element, since filesrc does not work with sockets or pipe.
But I think a socket-path property would be needed for this use case. Remember
that gstreamer gst-launch-1.0 is not meant to fully support all the features
that are programatically possible with GStreamer, you can always write a program
that opens the socket and set the FD property here.

That being said, I think adding a socket-path property is a nice addition, feel
free to propose a patch.

p.s. you will need to add rawvideoparse with appropriate parameters to frame
your raw video frames to make this pipeline work

> Thanks,
> Patrick 

More information about the gstreamer-devel mailing list