gstreamer shmsrc and shmsink with h264 data

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

gstreamer shmsrc and shmsink with h264 data

anjo
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
 but this dosn't work and the shmsrc pipeline always closes.
have anyone tried shm plugins with h264 encoded data, please help. Any examples would be fine

Reply | Threaded
Open this post in threaded view
|

Re: gstreamer shmsrc and shmsink with h264 data

Gst-Geek
Hello Anjo,

Below pipelines is working for me.

gst-launch-1.0 videotestsrc ! video/x-raw,width=640,height=480 !  x264enc key-int-max=30 ! shmsink socket-path=/tmp/foo sync=true   wait-for-connection=false

gst-launch-1.0 shmsrc socket-path=/tmp/foo ! capssetter caps=video/x-h264 ! h264parse ! avdec_h264  !  videoconvert ! videoscale ! autovideosink

Following are the errors in your pipeline.
encoder pipeline: x264enc doesn't supports YUY2.

Decode pipeline: avdec_h264 doesn't know the incoming stream type, force it to h264 by adding caps setter. add h264parse to get framed data to decoder.

~ Vinod