gstreamer shmsrc and shmsink with h264 data

gstreamer, h.264, shared-memory

Solution

Iam not aware of the capabilities of your sink used in "autovideosink", but as per my knowledge you either need to use videoconvert if the format supported by the sink (like kmssink or ximagesink) are different than provided by the source (in your case YUY2) or use videoparse if the camera format is supported by the sink. You may check this using gst-inspect-1.0 for the formats supported.

Anyways I am able to run your pipeline with some modifications using videoconvert in my setup :

./gst-launch-1.0 videotestsrc ! x264enc ! shmsink socket-path=/tmp/foo sync=true wait-for-connection=false shm-size=10000000

./gst-launch-1.0 shmsrc socket-path=/tmp/foo ! h264parse ! avdec_h264 ! videoconvert ! ximagesink

You may modify it as per the resolutions you want.

Kindly let me know if you face any issue with above.

Problem

i am trying to share an h264 encoded data from gstreamer to another two processes(both are based on gstreamer).After some research only way i found is to use the shm plugin. this is what i am trying to do ``` gstreamer--->h264 encoder--->shmsink shmrc--->process1 shmrc--->process2 ``` i was able to get raw data from videotestsrc and webcam working. But for h264 encoded data it doesn't. this is my test pipeline ``` gst-launch-1.0 videotestsrc ! video/x-raw,width=640,height=480,format=YUY2 ! x264enc ! shmsink socket-path=/tmp/foo sync=true wait-for- connection=false shm-size=10000000 gst-launch-1.0 shmsrc socket-path=/tmp/foo ! avdec_h264 ! video/x- raw,width=640,height=480,framerate=25/1,format=YUY2 ! autovideosink ``` have anyone tried shm plugins with h264 encoded data, please help

Original source