jetson NX Gstreamer 1.0 拉流

该博客介绍了如何利用Gstreamer在OpenCV中实现RTSP流的硬件解码,包括了针对H264编码的三种不同解码方式:NVIDIA的NVVIDCONV、NVV4L2DEC以及AVDEC_H264。同时,还展示了如何打开本地H264视频文件进行硬件解码。这些方法适用于需要高效解码RTSP流或者本地视频的场景。

链接opencv
const char* gstconfig="rtspsrc location=\"rtsp://admin:xxx1234$@10.34.100.243/LiveMedia/ch1/Media1\" ! rtph265depay ! h265parse ! omxh265dec! nvvidconv !video/x-raw, format=(string)BGRx! videoconvert ! appsink  sync=false"

 VideoCapture cap(gstconfig, CAP_GSTREAMER);


硬件解码  拉流rtsp
sudo gst-launch-1.0 rtspsrc location=\"rtsp://admin:xxx1234@10.34.100.243/LiveMedia/ch1/Media1\" latency=0 ! queue ! rtph264depay ! h264parse ! omxh264dec ! nvvidconv ! video/x-raw! videoconvert ! nveglglessink sync=false
硬件解码  拉流rtsp
sudo gst-launch-1.0 rtspsrc location=\"rtsp://admin:xxx1234@10.34.100.243/LiveMedia/ch1/Media1\" latency=0 ! queue ! rtph264depay ! h264parse ! nvv4l2decoder ! nvvidconv ! video/x-raw! videoconvert ! nveglglessink sync=false
软件解码  拉流rtsp
sudo gst-launch-1.0 rtspsrc location=\"rtsp://admin:xxx1234@10.34.100.243/LiveMedia/ch1/Media1\" latency=0 ! queue ! rtph264depay ! h264parse ! avdec_h264 ! nveglglessink sync=false


硬件解码  打开本地视频
sudo  gst-launch-1.0 filesrc location=/home/nvidia/szx/GstreamCv/sample_1080p_h264.mp4 !  qtdemux name=demux ! h264parse ! nvv4l2decoder ! nvvidconv ! video/x-raw ! nveglglessink -e

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值