1、解析成图片:
gst-launch-1.0 rtspsrc location=rtsp://xxxx protocols=tcp ! rtph264depay ! h264parse ! queue ! avdec_h264 ! videoconvert ! videorate ! videoscale ! videoconvert ! capsfilter caps=video/x-raw,format=I420,width=640,height=480,framerate=30/1 ! queue ! decodebin ! jpegenc ! multifilesink location=image%04d.jpg
2、显示成视频
gst-launch-1.0 rtspsrc location=rtsp://xxxx protocols=tcp ! rtph264depay ! h264parse ! queue ! avdec_h264 ! videoconvert ! videorate ! videoscale ! videoconvert ! capsfilter caps=video/x-raw,format=I420,width=640,height=480,framerate=30/1 ! queue ! decodebin ! autovideosink
如果需要增加调试信息输出,可以加上–gst-debug-level=4
gst-launch-1.0 --gst-debug-level=4 rtspsrc location=xxxxx ......