TX2 板载CSI相机 Ubuntu18.04系统下 Gstreamer 视频 UDP推流到vlc本地

声明:

由于版本更新,原本的 gstreamer NV 的 nvcamerasrc 插件现改为 nvarguscamerasrc

一、视频显示

指令: nvgstcapture-1.0

---------输入 mo:1 或mo:2 可以在 image 和 video之间切换

---------按 J并回车 截图,Q并回车退出。(mo:1)

---------按1并回车摄像,Q并回车退出。(mo:2)

以上产生的内容在当前路径下存储,pwd查看当前目录。

二、gstreamer 视频显示

指令:

gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)60/1 ' ! nvvidconv ! nveglglessink -e

三、gstreamer推流到本地:

udp拉流测试指令:

gst-launch-1.0 -v videotestsrc pattern=snow ! video/x-raw,width=1280,height=720 ! udpsink host=127.0.0.1 port=2222 sync=false async=false

推流指令:

gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)60/1 ' ! nvvidconv ! omxh264enc control-rate=2 bitrate=4000000 ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! rtph264pay mtu=1400 ! udpsink host=127.0.0.1 port=2222 sync=false async=false

gst拉流指令:

gst-launch-1.0 udpsink port=2222 ! application/x-rtp,encoding-name=H264,payload=96 ! rtph264depay ! h264parse ! queue ! avdec_264 ! xvimagesink sync=false async=false -e

vlc拉流指令:

vlc -vv --demux h264 --h264-fps 60 udp://@127.0.0.1:2222

四、其他:

1、参考链接:NVIDIA Jetson TX2 GStreamer Pipelines | Jetson GStreamer pipelines | RidgeRun

2、vlc需要安装兼容指令的vlc才能接收到视频:

sudo apt-get build-dep vlc && sudo apt-get install libtool build-essential
wget http://download.videolan.org/pub/videolan/vlc/2.2.6/vlc-2.2.6.tar.xz   
tar -xf vlc-2.2.6.tar.xz   
cd vlc-2.2.6
./configure --disable-qt 
make
sudo apt-get install gstreamer1.0-plugins-bad

gst-launch-1.0 nvarguscamerasrc ! nvvidconv flip-method=0 ! 'video/x-raw(memory:NVMM), width=(int)1280, height=(int)960, format=(string)NV12, framerate=(fraction)30/1' ! omxh264enc control-rate=2 bitrate=1100000 ! 'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! rtph264pay mtu=1400 ! udpsink host=127.0.0.1 port=2222 sync=false async=false


gst-launch-1.0 udpsrc port=2222 ! application/x-rtp,encoding-name=H264,payload=96 ! rtph264depay ! h264parse ! omxh264dec ! nveglglessink sync=false async=false -e

---------------------

gst-launch-1.0 nvarguscamerasrc ! nvvidconv flip-method=0 ! 'video/x-raw(memory:NVMM), width=(int)1280, height=(int)960, format=(string)NV12, framerate=(fraction)30/1' ! omxh265enc control-rate=2 bitrate=2100000 ! 'video/x-h265, stream-format=(string)byte-stream' ! h265parse ! rtph265pay mtu=9000 ! udpsink host=127.0.0.1 port=2222 sync=false async=false


gst-launch-1.0 udpsrc port=2222 ! application/x-rtp,encoding-name=H265,payload=96 ! rtph265depay ! h265parse ! queue ! omxh265dec ! nveglglessink sync=false async=false -e


 


 

  • 0
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值