VEYE-MIPI-327 CSI-2 摄像头视频
GStreamer视频播放
gst-launch-1.0 v4l2src device=/dev/video0 ! "video/x-raw,format=(string)UYVY, \
width=(int)1920, height=(int)1080" ! nvvidconv ! \
"video/x-raw(memory:NVMM),format=(string)I420" ! nvoverlaysink sync=false
udp流
gst-launch-1.0 -v v4l2src ! "video/x-raw,format=(string)UYVY, width=(int)1920, height=(int)1080, \
framerate=30/1" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! \
nvv4l2h264enc insert-sps-pps=1 bitrate=20000000 ! queue ! rndbuffersize max=65000 ! \
udpsink host=192.168.5.10 port=23003
视频缩放
gst-launch-1.0 v4l2src ! \
'video/x-raw, format=(string)UYVY, width=(int)1920, \
height=(int)1080' ! nvvidconv ! \
'video/x-raw(memory:NVMM), width=(int)640, height=(int)480, \
format=(string)I420' ! nvoverlaysink sync=false
缩放udp流
gst-launch-1.0 v4l2src ! \
'video/x-raw, format=(string)UYVY, width=(int)1920, \
height=(int)1080' ! nvvidconv ! \
'video/x-raw(memory:NVMM), width=(int)640, height=(int)480, \
format=(string)I420' ! nvv4l2h264enc ! \
udpsink host=192.168.5.10 port=23003 sync=false -e
保存文件
gst-launch-1.0 v4l2src ! \
'video/x-raw, format=(string)UYVY, width=(int)1920, \
height=(int)1080' ! nvvidconv ! \
'video/x-raw(memory:NVMM), width=(int)640, height=(int)480, \
format=(string)I420' ! nvv4l2h264enc ! \
h264parse ! qtmux ! filesink location=test.mp4 -e
设置速率控制模式和比特率
gst-launch-1.0 -v v4l2src ! "video/x-raw,format=(string)UYVY, width=(int)1920, height=(int)1080, \
framerate=30/1" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! \
nvv4l2h264enc control-rate=1 bitrate=2000000 ! queue ! udpsink host=192.168.5.10 port=23003