gst-plugins-bad nvdec element doesn't work
Борис
bumatov at gmail.com
Mon Jun 15 18:10:27 UTC 2020
system: win10 x64, compiler msvc 2015 x64, gstreamer version 1.16.2
Hi. I rebuilt gst-plugins-bad to enable support of nvidia accelerated
decoding (nvdec). It works when i run it from gst-launch-1.0:
gst-launch-1.0 filesrc location=D:/test_nvdec/jumanji.mp4 ! qtdemux !
h264parse ! nvdec ! glimagesink sync=false
but when i run same pipeline in my project:
qputenv("GST_DEBUG", "2");
QString pipeLine = QString("filesrc
location=D:/test_nvdec/jumanji.mp4 ! qtdemux ! h264parse ! nvdec !
videoconvert ! appsink sync = false");
cv::VideoCapture cap(pipeLine.toStdString(), cv::CAP_GSTREAMER);
if (cap.isOpened())
{
Mat frame;
cap >> frame;
imwrite("D:/test.png", frame);
}
it gives me errors:
0:00:00.165703000 26304 000001FFC4CF5E70 WARN basesrc
gstbasesrc.c:3600:gst_base_src_start_complete:<filesrc0> pad not
activated yet
0:00:00.166446000 26304 000001FFC4CD29C0 WARN qtdemux
qtdemux_types.c:240:qtdemux_type_get: unknown QuickTime node type gsst
0:00:00.166577000 26304 000001FFC4CD29C0 WARN qtdemux
qtdemux_types.c:240:qtdemux_type_get: unknown QuickTime node type gstd
0:00:00.166747000 26304 000001FFC4CD29C0 WARN qtdemux
qtdemux.c:3238:qtdemux_parse_trex:<qtdemux0> failed to find fragment
defaults for stream 1
0:00:00.166981000 26304 000001FFC4CD29C0 WARN qtdemux
qtdemux.c:3238:qtdemux_parse_trex:<qtdemux0> failed to find fragment
defaults for stream 2
0:00:00.168948000 26304 000001FFC4CD29C0 WARN default
grammar.y:510:gst_parse_no_more_pads:<qtdemux0> warning: Delayed
linking failed.
0:00:00.169078000 26304 000001FFC4CD29C0 WARN default
grammar.y:510:gst_parse_no_more_pads:<qtdemux0> warning: failed
delayed linking some pad of GstQTDemux named qtdemux0 to some pad of
GstH264Parse named h264parse0
0:00:00.169337000 26304 000001FFC4CD29C0 WARN qtdemux
qtdemux.c:6605:gst_qtdemux_loop:<qtdemux0> error: Internal data stream
error.
0:00:00.169460000 26304 000001FFC4CD29C0 WARN qtdemux
qtdemux.c:6605:gst_qtdemux_loop:<qtdemux0> error: streaming stopped,
reason not-linked (-1)
(gametrack_modules.exe:26304): GStreamer-CRITICAL **: 21:05:08.530:
gst_element_get_bus: assertion 'GST_IS_ELEMENT (element)' failed
(gametrack_modules.exe:26304): GStreamer-CRITICAL **: 21:05:08.530:
gst_bus_have_pending: assertion 'GST_IS_BUS (bus)' failed
(gametrack_modules.exe:26304): GStreamer-CRITICAL **: 21:05:08.530:
gst_object_unref: assertion 'object != NULL' failed
(gametrack_modules.exe:26304): GStreamer-CRITICAL **: 21:05:08.531:
gst_element_send_event: assertion 'GST_IS_ELEMENT (element)' failed
but if i replace nvdec with avdec_h264 everything works as expected:
QString pipeLine = QString("filesrc location=D:/test_nvdec/jumanji.mp4
! qtdemux ! h264parse ! avdec_h264 ! videoconvert ! appsink sync =
false");
so, what is wrong here?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200615/879c56eb/attachment.htm>
More information about the gstreamer-devel
mailing list