I have the following pipeline running from inside my program using OpenCV VideoWriter element.
gst-launch-1.0 -v videotestsrc ! clockoverlay ! shmsink socket-path=/tmp/sink shm-size=2000000 name=/dev/shm wait-for-connection=false
When I consume the stream through the following pipeline everything works
gst-launch-1.0 -v shmsrc is-live=true socket-path=/tmp/sink shm-area-name=/dev/shm ! \
"video/x-raw, format=BGR, width=(int)160, height=(int)120, framerate=(fraction)30/1" ! \
queue ! videoconvert ! autovideosink
but when I attempt to encode the stream in h264 with the following pipeline
gst-launch-1.0 -vvv shmsrc is-live=true socket-path=/tmp/sink shm-area-name=/dev/shm ! \
"video/x-raw, format=BGR, width=(int)160, height=(int)120, framerate=(fraction)30/1" ! \
queue ! videoconvert ! x264enc bitrate=1000 ! video/x-h264,profile=baseline ! \
rtph264pay config-interval=1 pt=96 ! queue ! udpsink host=127.0.0.1 port=5000
I get
(gst-launch-1.0:8119): GStreamer-CRITICAL **: gst_segment_to_running_time: assertion 'segment->format == format' failed
and I can't see anything from VLC. What am I missing?
Note: To reproduce the problem one can use the following producer/consumer pipelines:
gst-launch-1.0 -v videotestsrc ! clockoverlay ! shmsink socket-path=/tmp/sink shm-size=2000000 name=/dev/shm wait-for-connection=false
sudo gst-launch-1.0 -vvv shmsrc is-live=true socket-path=/tmp/sink shm-area-name=/dev/shm ! \
"video/x-raw, format=BGR, width=(int)160, height=(int)120, framerate=(fraction)30/1" ! \
queue ! videoconvert ! x264enc bitrate=1000 ! video/x-h264,profile=baseline ! rtph264pay config-interval=1 pt=96 ! queue ! udpsink host=127.0.0.1 port=5000
System information
- Ubuntu 16.04
- GStreamer 1.8.3
- OpenCV 3.4.0