本文实际需要实现功能:通过Gstreamer调用TX2板载摄像头并使用rtsp推流到上位机使用VLC验证。
本文内容:记录过程中已验证问题与现实中需要主要的事项。
媒介:gst-rtsp-server。需要该库作为服务器进行rtsp推流。
- 试错
在调试刚开始主要是依据Nidia官方手册NVIDIA Jetson Linux Driver Package Software Features进行调试。
在手册Video Streaming with GStreamer-1.0部分中,提供了两种通过 gst-launch-1.0创建pipeline的方式。
•Streaming and video rendering:
•Transmitting (from target) : CSI camera capture + video encode + RTP streaming using network sink:
gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), \
format=NV12, width=1920, height=1080' ! \
nvv4l2h264enc insert-sps-pps=true ! h264parse ! \
rtph264pay pt=96 ! udpsink host=127.0.0.1 port=8001 sync=false -e
•Receiving (on target) : Network Source + video decode + video render:
gst-launch-1.0 udpsrc address=127.0.0.1 port=8001 \
caps='application/x-rtp, encoding-name=(string)H264, payload=(int)96' ! \
rtph264depay ! queue ! h264parse ! nvv4l2decoder ! nv3dsink -e