After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 784093 - GstBuffer does not contain dmabuf memory
GstBuffer does not contain dmabuf memory
Status: RESOLVED INCOMPLETE
Product: GStreamer
Classification: Platform
Component: gst-omx
1.6.3
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-06-22 13:39 UTC by Mariem
Modified: 2018-05-07 15:58 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Mariem 2017-06-22 13:39:00 UTC
Hello,

I am trying to create Gstreamer pipeline and stream video using the following command-line. I am using c920 Logitech HD Pro webcam plugged in a board that has a customized linux version. The Gstreamer version installed on the board is 1.6.3.

$gst-launch-1.0 -v --gst-debug=2 v4l2src device=/dev/video8  num-buffers=300 io-mode=dmabuf no-resurect-buf=true  ! videoconvert ! video/x-raw,format=NV12 ! omxh264enc control-rate=2 target-bitrate=10485760 interval_intraframes=14 periodicty-idr=2 use-dmabuf=true ! video/x-h264,profile=\(string\)high,level=\(string\)4.2 ! h264parse ! video/x-h264,stream-format=avc,alignment=au ! qtmux ! queue ! filesink location=../../output.mp4 -e

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:00.985080341  3293     0x20926ed0 ERROR                v4l2src gstv4l2src.c:547:gst_v4l2src_set_crop:<v4l2src0> Fail to set crop
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)2304\,\ height\=\(int\)1536\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(s"
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:src: caps = "video/x-raw\,\ width\=\(int\)2304\,\ height\=\(int\)1536\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressi"
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = "video/x-raw\,\ width\=\(int\)2304\,\ height\=\(int\)1536\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,"
/GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0.GstPad:sink: caps = "video/x-raw\,\ width\=\(int\)2304\,\ height\=\(int\)1536\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\="
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = "video/x-raw\,\ width\=\(int\)2304\,\ height\=\(int\)1536\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\"
/GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0.GstPad:src: caps = "video/x-h264\,\ stream-format\=\(string\)byte-stream\,\ alignment\=\(string\)au\,\ profile\=\(string\)high\,\ level\"
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = "video/x-h264\,\ stream-format\=\(string\)byte-stream\,\ alignment\=\(string\)au\,\ profile\=\(string\)high\,\ level\=\(string\)4.2\,\ widt"
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = "video/x-h264\,\ stream-format\=\(string\)byte-stream\,\ alignment\=\(string\)au\,\ profile\=\(string\)high\,\ level\=\(string\)4.2\,\ width"
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = "video/x-h264\,\ stream-format\=\(string\)byte-stream\,\ alignment\=\(string\)au\,\ profile\=\(string\)high\,\ level\=\(string\)4.2\,\ width"
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = "video/x-h264\,\ stream-format\=\(string\)byte-stream\,\ alignment\=\(string\)au\,\ profile\=\(string\)high\,\ level\=\(string\)4.2\,\ wid"
0:00:03.380202321  3293     0x20926ed0 ERROR                default video-frame.c:161:gst_video_frame_map_id: invalid buffer size 0 < 5308416
0:00:03.380327842  3293     0x20926ed0 WARN             videofilter gstvideofilter.c:292:gst_video_filter_transform:<videoconvert0> warning: invalid video buffer received
0:00:03.380595443  3293     0x20926ed0 ERROR            omxvideoenc gstomxvideoenc.c:1721:gst_omx_video_enc_handle_frame:<omxh264enc-omxh264enc0> GstBuffer does not contain dmabuf memory            Can not ue
0:00:03.380651603  3293     0x20926ed0 WARN                 basesrc gstbasesrc.c:2943:gst_base_src_loop:<v4l2src0> error: Internal data flow error.
0:00:03.380670923  3293     0x20926ed0 WARN                 basesrc gstbasesrc.c:2943:gst_base_src_loop:<v4l2src0> error: streaming task paused, reason error (-5)
WARNING: from element /GstPipeline:pipeline0/GstVideoConvert:videoconvert0: Internal GStreamer error: code not implemented.  Please file a bug at http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer.
Additional debug info:
../../../../gst-plugins-base-1.6.3/gst-libs/gst/video/gstvideofilter.c(292): gst_video_filter_transform (): /GstPipeline:pipeline0/GstVideoConvert:videoconvert0:
invalid video buffer received
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
Additional debug info:
../../../../gstreamer-1.6.3/libs/gst/base/gstbasesrc.c(2943): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason error (-5)
EOS on shutdown enabled -- waiting for EOS after Error
Waiting for EOS...
/GstPipeline:pipeline0/GstQTMux:qtmux0.GstPad:src: caps = "video/quicktime\,\ variant\=\(string\)apple"
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = "video/quicktime\,\ variant\=\(string\)apple"
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = "video/quicktime\,\ variant\=\(string\)apple"
/GstPipeline:pipeline0/GstQTMux:qtmux0.GstPad:src: caps = "video/quicktime\,\ variant\=\(string\)apple\,\ streamheader\=\(buffer\)\<\ 000002446d6f6f760000006c6d76686400000000d4ed6f4dd4ed6f4d00000708000000000"
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = "video/quicktime\,\ variant\=\(string\)apple\,\ streamheader\=\(buffer\)\<\ 000002446d6f6f760000006c6d76686400000000d4ed6f4dd4ed6f4d0000070800000000"
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Interrupt while waiting for EOS - stopping pipeline...
Execution ended after 0:00:30.962597289
Setting pipeline to PAUSED ...
Setting pipeline to READY ...

(gst-launch-1.0:3293): GStreamer-CRITICAL **: gst_buffer_get_sizes_range: assertion 'GST_IS_BUFFER (buffer)' failed

(gst-launch-1.0:3293): GStreamer-CRITICAL **: gst_mini_object_unref: assertion 'mini_object->refcount > 0' failed
0:00:31.931280764  3293     0x20834870 WARN              bufferpool gstbufferpool.c:537:gst_buffer_pool_set_active:<omxbufferpool0> stop failed
0:00:31.934890859  3293     0x20834870 WARN              bufferpool gstbufferpool.c:537:gst_buffer_pool_set_active:<omxbufferpool0> stop failed
Comment 1 Nicolas Dufresne (ndufresne) 2017-06-22 13:47:17 UTC
(In reply to Mariem from comment #0)
> Hello,
> 
> I am trying to create Gstreamer pipeline and stream video using the
> following command-line. I am using c920 Logitech HD Pro webcam plugged in a
> board that has a customized linux version. The Gstreamer version installed
> on the board is 1.6.3.
> 
> $gst-launch-1.0 -v --gst-debug=2 v4l2src device=/dev/video8  num-buffers=300
> io-mode=dmabuf no-resurect-buf=true  ! videoconvert !

What the hell is that no-resurect-buf property. Are you sure you should not be filing bugs to the people patching your GStreamer instead ? This looks like a downstream fork of GStreamer.

> video/x-raw,format=NV12 ! omxh264enc control-rate=2 target-bitrate=10485760
> interval_intraframes=14 periodicty-idr=2 use-dmabuf=true !
> video/x-h264,profile=\(string\)high,level=\(string\)4.2 ! h264parse !
> video/x-h264,stream-format=avc,alignment=au ! qtmux ! queue ! filesink
> location=../../output.mp4 -e

Upstream gst-omx have no support for DMABuf (and that would be a stretch since OMX spec has no support for DMABuf either). Is there any issue here that is not specific to your vendor fork ?
Comment 2 Julien Isorce 2017-06-22 19:56:42 UTC
I am not aware of anything here but I suppose there should be no videoconvert between v4l2src-dmabuf and omxh264enc, otherwise it looses advantage of using dmabuf. Also "ERROR default video-frame.c:161:gst_video_frame_map_id: invalid buffer size 0 < 5308416" probably means that the dmabuf is not mappable, but videoconvert still tries to map it to convert from yuy2 to nv12.
Comment 3 Sebastian Dröge (slomo) 2018-05-07 15:58:24 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug report if you can provide the information that was asked for in a previous comment.
Thanks!