Hi guys,
I want to decode video streaming using gstreamer and opencv with jetson nano.
I installed jetpack 4.2 and opencv 3.4.6 cuda and gstreamer support.
I faced with some problem.
when I use these commads, they work corectly:
gst-launch-1.0 filesrc location=test.mp4 ! qtdemux ! queue ! h264parse ! nvv4l2decoder ! nvvidconv ! ‘video/x-raw(memory:NVMM), format=(string)BGRx’ ! fakesink -e
gst-launch-1.0 filesrc location=test.mp4 ! qtdemux ! queue ! h264parse ! nvv4l2decoder ! nvvidconv ! ‘video/x-raw, format=(string)BGRx’ ! fakesink -e
gst-launch-1.0 filesrc location=test.mp4 ! qtdemux ! queue ! h264parse ! omxh264dec ! nvvidconv ! ‘video/x-raw(memory:NVMM), format=(string)BGRx’ ! fakesink -e
gst-launch-1.0 filesrc location=test.mp4 ! qtdemux ! queue ! h264parse ! omxh264dec ! nvvidconv ! ‘video/x-raw, format=(string)BGRx’ ! fakesink -e
and when I use gstream + opencv, such the below, It work correctly:
gst_str = ('rtspsrc location={rtsp} latency=300 ! ’
'rtph264depay ! h264parse ! omxh264dec ! ’
'nvvidconv ! ’
'video/x-raw, ’
'format=(string)BGRx ! videoconvert ! ’
'appsink ').format(url, latency)
cv2.VideoCapture(gst_str, cv2.CAP_GSTREAMER)
but I want to use video/x-raw(memory:NVMM) instead of video/x-raw , I get this error, How do i solve this problem?
g_mutex_clear() called on uninitialised or locked mutex │00C GPU@38C AO@44C thermal@39.5C POM_5V_IN 3176/2117 POM_5V_GPU 167
Aborted (core dumped)
Hi,
We have clarified that OpenCV only accepts CPU buffers(video/x-raw) in multiple posts:
Hi,
No, tegra_multimedia_api is not supported in python.
The CPU usage is explained. If you have to use appink in OpenCV, please realize it.
Hi guys,
I want to do pipeline multi-stream decoder on jetson nano using H264 hardware decoder.
when I run directly this function:
def stream_rtsp(uri, width, height, latency):
gst_str = ('rtspsrc location={} latency={} ! ’
'rtph264depay ! h264parse ! omxh264dec ! ’
'nvvidconv ! ’
'video/x-raw, width=(int){}, height=(int){}, ’
'format=(string)BGRx ! videoconvert ! ’
‘appsink’).format(uri, latency, width, height)
then I check to use NVDEC ro not with sudo tegrastats, I see NVDEC is ac…
Opencv videoCapture only read frames in CPU memory.
For your case you would try nvivafilter. (Here is an example for fisheye undistort, you would adapt for your case)
Please not duplicate same question into multiple posts.
Because gstreamer corecctly use GPU buffer in the command terminal, I think it’s possible to use pipe in opencv with subprocess library, right?
Hi,
No, it is not possible. Please check the source file:
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// Intel License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2008, 2011, Nils Hasler, all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
This file has been truncated. show original
It supports video/x-raw only. video/x-raw(memory:NVMM) is not handled in the 3rdparty code.
Thanks,
Is it possible to use gstreamer with video/x-raw(memory:NVMM) in python code without opencv?
Hi,
You can launch a gstreamer pipeline in python. Here is a simple code for reference:
Hi,
this simple code snippet crashes with a Segmentation fault (tested on JetPack 4.3):
https://paste.gnome.org/pw1vudabr
a quick fix would be highly appreciated.
Stacktrace:
#0 0x0000007fb6f233f4 in find_notify (object=0x7fa8ff850e, object=0x7fa8ff850e, data=0x0, notify=0x0, match_notify=0, quark=2577) at gstminiobject.c:369
#1 0x0000007fb6f233f4 in gst_mini_object_set_qdata (object=0x7fa8ff850e, quark=2577, data=0x0, destroy=0x0) at gstminiobject.c:672
#2 0x0000007fb7853948 in () at /…