GStreamer nvvidconv plugin not working

I’m trying to use nvvidconv to convert from video/x-raw to video/x-raw(memory:NVMM). After multiple fruitless attempts I ran the example from the Multimedia guide. This example also failed to run on both an updated and a fresh installed jetson TX1. Leading me to believe there is an issue with nvvidconv. Below I will include the GStreamer debug info:

ubuntu@tegra-ubuntu:~/gstTemp$ GST_DEBUG=2 gst-launch-1.0 videotestsrc ! 'video/x-raw, format=(string)UYVY, width=(int)1280, height=(int)720' ! nvvidconv ! 'video/x-raw(memory:NVMM)' ! omxh264enc ! h264parse ! qtmux ! filesink location=/srv/test.mp4 -e

0:00:00.046627112  7743   0x14de20 WARN                     omx /dvs/git/dirty/git-master_linux/external/gstreamer/gst-omx/omx/gstomx.c:2841:plugin_init: Failed to load configuration file: Valid key file could not be found in search dirs (searched in: /home/ubuntu/.config:/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg as per GST_OMX_CONFIG_DIR environment variable, the xdg user config directory (or XDG_CONFIG_HOME) and the system config directory (or XDG_CONFIG_DIRS)
Setting pipeline to PAUSED ...
Inside NvxLiteH264DecoderLowLatencyInitNvxLiteH264DecoderLowLatencyInit set DPB and MjstreamingInside NvxLiteH265DecoderLowLatencyInitNvxLiteH265DecoderLowLatencyInit set DPB and MjstreamingPipeline is PREROLLING ...
0:00:00.065437018  7743   0x1523b0 WARN           basetransform gstbasetransform.c:1373:gst_base_transform_setcaps:<nvvconv0> transform could not transform video/x-raw, format=(string)UYVY, width=(int)1280, height=(int)720, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive in anything we support
0:00:00.065834254  7743   0x1523b0 WARN           basetransform gstbasetransform.c:1373:gst_base_transform_setcaps:<nvvconv0> transform could not transform video/x-raw, format=(string)UYVY, width=(int)1280, height=(int)720, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive in anything we support
0:00:00.065902899  7743   0x1523b0 WARN                GST_PADS gstpad.c:3669:gst_pad_peer_query:<capsfilter0:src> could not send sticky events
0:00:00.066096647  7743   0x1523b0 WARN                 default gstvideopool.c:171:video_buffer_pool_set_config:<videobufferpool0> no caps in config
0:00:00.073631515  7743   0x1523b0 WARN           basetransform gstbasetransform.c:1373:gst_base_transform_setcaps:<nvvconv0> transform could not transform video/x-raw, format=(string)UYVY, width=(int)1280, height=(int)720, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive in anything we support
0:00:00.074008803  7743   0x1523b0 WARN           basetransform gstbasetransform.c:1373:gst_base_transform_setcaps:<nvvconv0> transform could not transform video/x-raw, format=(string)UYVY, width=(int)1280, height=(int)720, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive in anything we support
0:00:00.074098281  7743   0x1523b0 WARN                 basesrc gstbasesrc.c:2865:gst_base_src_loop:<videotestsrc0> error: Internal data flow error.
0:00:00.074135364  7743   0x1523b0 WARN                 basesrc gstbasesrc.c:2865:gst_base_src_loop:<videotestsrc0> error: streaming task paused, reason not-negotiated (-4)
ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2865): gst_base_src_loop (): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:
streaming task paused, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
0:00:00.074572286  7743   0x1523b0 WARN           basetransform gstbasetransform.c:1373:gst_base_transform_setcaps:<nvvconv0> transform could not transform video/x-raw, format=(string)UYVY, width=(int)1280, height=(int)720, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive in anything we support
0:00:00.074912387  7743   0x1523b0 WARN           basetransform gstbasetransform.c:1373:gst_base_transform_setcaps:<nvvconv0> transform could not transform video/x-raw, format=(string)UYVY, width=(int)1280, height=(int)720, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive in anything we support
Freeing pipeline ...

The pipeline without the nvvidconv runs perfectly albeit at 30-40% CPU usage.

It seems that, in contrast to the multimedia guide, nvvidconv does not know what to do if there is no output format specified. Specifying the required output format like below does work.

gst-launch-1.0 videotestsrc ! 'video/x-raw, format=(string)UYVY, width=(int)1280, height=(int)720' ! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)NV12' ! omxh264enc ! h264parse ! qtmux ! filesink location=/srv/test.mp4 -e

gst-launch-1.0 videotestsrc ! 'video/x-raw, format=(string)NV12, width=(int)1280, height=(int)720' ! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)NV12' ! omxh264enc ! h264parse ! qtmux ! filesink location=/srv/test.mp4 -e

Hi CPeppenster

Many thanks for reporting this issue.
We have already incorporated required changes to reflect the correction with gst-launch-1.0 command line.
The latest version within the next JetPack release will have this update.

Thanks

Hello,

I am relatively new to the gstreamer and am trying to learn it by going through the tutorials on the Gstreamer developer website https://gstreamer.freedesktop.org/documentation/tutorials/index.html.

While going through the exercise in tutorial 2 https://gstreamer.freedesktop.org/documentation/tutorials/basic/concepts.html I got a similar error as this.

g++ basic-tutorial-2.cpp -o basic-tutorial-2 `pkg-config --cflags --libs gstreamer-1.0`
nvidia@tegra-ubuntu:~/gst-tutorials/tut02$ GST_DEBUG=3 ./basic-tutorial-2 
0:00:00.044013417 15325       0x50ab00 WARN                     omx gstomx.c:2836:plugin_init: Failed to load configuration file: Valid key file could not be found in search dirs (searched in: /home/nvidia/.config:/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg as per GST_OMX_CONFIG_DIR environment variable, the xdg user config directory (or XDG_CONFIG_HOME) and the system config directory (or XDG_CONFIG_DIRS)
0:00:00.054552197 15325       0x50e590 FIXME                default gstutils.c:3766:gst_pad_create_stream_id_internal:<source:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:00.058339448 15325       0x50e590 ERROR           omxvideosink gstomxvideosink.c:1242:gst_omx_video_sink_setcaps:<sink-actual-sink-nvoverlay> Unsupported format RGBx
0:00:00.058534872 15325       0x50e590 ERROR           omxvideosink gstomxvideosink.c:1242:gst_omx_video_sink_setcaps:<sink-actual-sink-nvoverlay> Unsupported format RGBx
0:00:00.058571639 15325       0x50e590 WARN                GST_PADS gstpad.c:4092:gst_pad_peer_query:<sink:proxypad0> could not send sticky events
0:00:00.060906063 15325       0x50e590 ERROR           omxvideosink gstomxvideosink.c:1242:gst_omx_video_sink_setcaps:<sink-actual-sink-nvoverlay> Unsupported format RGBx
0:00:00.061879884 15325       0x50e590 ERROR           omxvideosink gstomxvideosink.c:1242:gst_omx_video_sink_setcaps:<sink-actual-sink-nvoverlay> Unsupported format RGBx
0:00:00.061938988 15325       0x50e590 WARN                 basesrc gstbasesrc.c:2948:gst_base_src_loop:<source> error: Internal data flow error.
0:00:00.061956716 15325       0x50e590 WARN                 basesrc gstbasesrc.c:2948:gst_base_src_loop:<source> error: streaming task paused, reason not-negotiated (-4)
0:00:00.062105099 15325       0x50e590 ERROR           omxvideosink gstomxvideosink.c:1242:gst_omx_video_sink_setcaps:<sink-actual-sink-nvoverlay> Unsupported format RGBx
Error received from element source: Internal data flow error.
0:00:00.062164235 15325       0x50e590 ERROR           omxvideosink gstomxvideosink.c:1242:gst_omx_video_sink_setcaps:<sink-actual-sink-nvoverlay> Unsupported format RGBx
Debugging informtion: gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:test-pipeline/GstVideoTestSrc:source:
streaming task paused, reason not-negotiated (-4)

my pipeline (in the code) basically looks like this:

gst-launch-1.0 videotestsrc ! vertigotv !  videoconvert ! autovideosink

However, as per this post, I tried something like this:

gst-launch-1.0 videotestsrc ! vertigotv !  nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)NV12' ! autovideosink

which works fine. However, if I don’t provide the format as stated here, I get the same error.

nvidia@tegra-ubuntu:~/gst-tutorials/tut02$ GST_DEBUG=3 gst-launch-1.0 videotestsrc ! vertigotv !  nvvidconv ! 'video/x-raw(memory:NVMM)' ! autovideosink
Setting pipeline to PAUSED ...
0:00:00.030458299 16034       0x522320 WARN                     omx gstomx.c:2836:plugin_init: Failed to load configuration file: Valid key file could not be found in search dirs (searched in: /home/nvidia/.config:/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg as per GST_OMX_CONFIG_DIR environment variable, the xdg user config directory (or XDG_CONFIG_HOME) and the system config directory (or XDG_CONFIG_DIRS)
Pipeline is PREROLLING ...
0:00:00.048044998 16034       0x524400 FIXME                default gstutils.c:3766:gst_pad_create_stream_id_internal:<videotestsrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:00.049065861 16034       0x524400 ERROR           omxvideosink gstomxvideosink.c:1242:gst_omx_video_sink_setcaps:<autovideosink0-actual-sink-nvoverlay> Unsupported format BGRx
0:00:00.049137253 16034       0x524400 ERROR           omxvideosink gstomxvideosink.c:1242:gst_omx_video_sink_setcaps:<autovideosink0-actual-sink-nvoverlay> Unsupported format BGRx
0:00:00.049160133 16034       0x524400 WARN                GST_PADS gstpad.c:4092:gst_pad_peer_query:<sink:proxypad0> could not send sticky events
0:00:00.050984482 16034       0x524400 ERROR           omxvideosink gstomxvideosink.c:1242:gst_omx_video_sink_setcaps:<autovideosink0-actual-sink-nvoverlay> Unsupported format BGRx
0:00:00.052844608 16034       0x524400 ERROR           omxvideosink gstomxvideosink.c:1242:gst_omx_video_sink_setcaps:<autovideosink0-actual-sink-nvoverlay> Unsupported format BGRx
0:00:00.052917536 16034       0x524400 WARN                 basesrc gstbasesrc.c:2948:gst_base_src_loop:<videotestsrc0> error: Internal data flow error.
0:00:00.052936832 16034       0x524400 WARN                 basesrc gstbasesrc.c:2948:gst_base_src_loop:<videotestsrc0> error: streaming task paused, reason not-negotiated (-4)
0:00:00.053059232 16034       0x524400 ERROR           omxvideosink gstomxvideosink.c:1242:gst_omx_video_sink_setcaps:<autovideosink0-actual-sink-nvoverlay> Unsupported format BGRx
ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:
streaming task paused, reason not-negotiated (-4)
0:00:00.053103776 16034       0x524400 ERROR           omxvideosink gstomxvideosink.c:1242:gst_omx_video_sink_setcaps:<autovideosink0-actual-sink-nvoverlay> Unsupported format BGRx
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

My question: ‘Is there something wrong in my understanding or is it still a bug?’ I am running these commands on Jetson TX2 and I have the latest JetPack.

Any pointers will be appreciated.

Thanks,
Bhargav

Hi Bhargav,

Welcome to Jetson & Embedded Systems developer forum.
Your issue is on TX2, please file your issue into TX2 board - https://devtalk.nvidia.com/default/board/188/jetson-tx2/

Thanks