Closed NIKovachev closed 9 months ago
the output looks like this:
Previously, I had a similar error in Ubuntu, but the issue was fixed after switching to Debian 11. If you use Ubuntu, you can test Debian.
I'm running stock Debian 11. what could be the problem?
The problem can be related to RGA. Ensure the RGA driver and library (librga.so, in /usr/lib/aarch64-linux-gnu) are installed in your system. If it's installed the issue can be resolved by updating them. https://github.com/airockchip/librga
I created a new bug for RGA: https://github.com/airockchip/librga/issues/60
there is an option to change the format from RGB to NV12 or similar but the pipeline errors in that case again.
NOTE: before I hit ^C the pipe hangs
root@firefly:~# export GST_MPP_NO_RGA=1
root@firefly:~# gst-launch-1.0 --gst-debug=2 v4l2src device=/dev/video12 ! image/jpeg,width=3840,height=2160,framerate=30/1 ! mppjpegdec format=NV12 dma-feature=1 max-errors=-1 ! mpph265enc ! fpsdisplaysink video-sink="fakesink" text-overlay=false -ve
0:00:00.259724930 239311 0x5566f02180 WARN mpp gstmpp.c:126:gst_mpp_use_rga: RGA disabled by env (GST_MPP_NO_RGA)
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstFakeSink:fakesink0: sync = true
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = image/jpeg, width=(int)3840, height=(int)2160, framerate=(fraction)30/1, parsed=(boolean)true, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)2:4:5:1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = image/jpeg, width=(int)3840, height=(int)2160, framerate=(fraction)30/1, parsed=(boolean)true, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)2:4:5:1
/GstPipeline:pipeline0/GstMppJpegDec:mppjpegdec0.GstPad:src: caps = video/x-raw(memory:DMABuf), format=(string)NV12, width=(int)3840, height=(int)2160, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)2:4:5:1, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstMppH265Enc:mpph265enc0.GstPad:src: caps = video/x-h265, stream-format=(string)byte-stream, alignment=(string)au, width=(int)3840, height=(int)2160, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)2:4:5:1, chroma-site=(string)mpeg2, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/x-h265, stream-format=(string)byte-stream, alignment=(string)au, width=(int)3840, height=(int)2160, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)2:4:5:1, chroma-site=(string)mpeg2, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstFakeSink:fakesink0.GstPad:sink: caps = video/x-h265, stream-format=(string)byte-stream, alignment=(string)au, width=(int)3840, height=(int)2160, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)2:4:5:1, chroma-site=(string)mpeg2, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink: caps = video/x-h265, stream-format=(string)byte-stream, alignment=(string)au, width=(int)3840, height=(int)2160, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)2:4:5:1, chroma-site=(string)mpeg2, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono
/GstPipeline:pipeline0/GstMppH265Enc:mpph265enc0.GstPad:sink: caps = video/x-raw(memory:DMABuf), format=(string)NV12, width=(int)3840, height=(int)2160, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)2:4:5:1, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstMppJpegDec:mppjpegdec0.GstPad:sink: caps = image/jpeg, width=(int)3840, height=(int)2160, framerate=(fraction)30/1, parsed=(boolean)true, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)2:4:5:1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = image/jpeg, width=(int)3840, height=(int)2160, framerate=(fraction)30/1, parsed=(boolean)true, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)2:4:5:1
0:00:00.430072606 239311 0x5566eedb60 WARN v4l2bufferpool gstv4l2bufferpool.c:814:gst_v4l2_buffer_pool_start:<v4l2src0:pool0:src> Uncertain or not enough buffers, enabling copy threshold
0:00:00.793314357 239311 0x5566eee060 WARN mppdec gstmppdec.c:591:gst_mpp_dec_get_frame:<mppjpegdec0> MPP is not able to generate pts
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstFakeSink:fakesink0: sync = true
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 19, dropped: 0, current: 36.59, average: 36.59
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 35, dropped: 0, current: 30.07, average: 33.29
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 50, dropped: 0, current: 29.99, average: 32.23
.
.
.
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 949, dropped: 0, current: 29.90, average: 30.11
0:00:32.522770313 239311 0x5566eee060 ERROR mppallocator gstmppallocator.c:166:gst_mpp_allocator_import_mppbuf:<mppallocator0> failed to get dmafd
(gst-launch-1.0:239311): GStreamer-CRITICAL **: 09:47:21.490: gst_mini_object_set_qdata: assertion 'object != NULL' failed
0:00:32.524520613 239311 0x5566eee060 ERROR mppenc gstmppenc.c:896:gst_mpp_enc_convert:<mpph265enc0> failed to convert frame
0:00:32.524605488 239311 0x5566eee060 ERROR mppenc gstmppenc.c:1149:gst_mpp_enc_handle_frame:<mpph265enc0> not negotiated
0:00:32.524645155 239311 0x5566eee060 WARN mppenc gstmppenc.c:1153:gst_mpp_enc_handle_frame:<mpph265enc0> can't handle this frame
0:00:32.559221485 239311 0x5566eee060 ERROR mppallocator gstmppallocator.c:166:gst_mpp_allocator_import_mppbuf:<mppallocator0> failed to get dmafd
(gst-launch-1.0:239311): GStreamer-CRITICAL **: 09:47:21.526: gst_mini_object_set_qdata: assertion 'object != NULL' failed
0:00:32.561445453 239311 0x5566eee060 ERROR mppenc gstmppenc.c:896:gst_mpp_enc_convert:<mpph265enc0> failed to convert frame
0:00:32.561555704 239311 0x5566eee060 ERROR mppenc gstmppenc.c:1149:gst_mpp_enc_handle_frame:<mpph265enc0> not negotiated
0:00:32.561575829 239311 0x5566eee060 WARN mppenc gstmppenc.c:1153:gst_mpp_enc_handle_frame:<mpph265enc0> can't handle this frame
0:00:32.602139853 239311 0x5566eee060 ERROR mppallocator gstmppallocator.c:166:gst_mpp_allocator_import_mppbuf:<mppallocator0> failed to get dmafd
(gst-launch-1.0:239311): GStreamer-CRITICAL **: 09:47:21.569: gst_mini_object_set_qdata: assertion 'object != NULL' failed
0:00:32.605662912 239311 0x5566eee060 ERROR mppenc gstmppenc.c:896:gst_mpp_enc_convert:<mpph265enc0> failed to convert frame
0:00:32.605855704 239311 0x5566eee060 ERROR mppenc gstmppenc.c:1149:gst_mpp_enc_handle_frame:<mpph265enc0> not negotiated
0:00:32.605888371 239311 0x5566eee060 WARN mppenc gstmppenc.c:1153:gst_mpp_enc_handle_frame:<mpph265enc0> can't handle this frame
0:00:34.591925602 239311 0x5566eedb60 ERROR mppdec gstmppdec.c:1075:gst_mpp_dec_handle_frame:<mppjpegdec0> failed to send packet
0:00:34.591971394 239311 0x5566eedb60 WARN mppdec gstmppdec.c:1079:gst_mpp_dec_handle_frame:<mppjpegdec0> can't handle this frame
0:00:34.597338669 239311 0x5566eedb60 WARN basesrc gstbasesrc.c:3127:gst_base_src_loop:<v4l2src0> error: Internal data stream error.
0:00:34.597369003 239311 0x5566eedb60 WARN basesrc gstbasesrc.c:3127:gst_base_src_loop:<v4l2src0> error: streaming stopped, reason error (-5)
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason error (-5)
0:00:34.597679046 239311 0x5566eee060 WARN mppdec gstmppdec.c:963:gst_mpp_dec_loop:<mppjpegdec0> no matched frame
Execution ended after 0:00:34.318578316
Setting pipeline to NULL ...
Freeing pipeline ...
root@firefly:~# ^C
root@firefly:~#
hi @JeffyCN ,
how can we solve the last issue gst_mpp_enc_convert:<mpph265enc0> failed to convert frame
? Do I need to create a new bug for it?
mpp gstmpp.c:126:gst_mpp_use_rga: RGA disabled by env (GST_MPP_NO_RGA
the rga is disabled by this environment.
i don't know much about rga, if the driver reports error, maybe try to ask the rga maintainer(or committor).
there're many versions of librga and the rga driver, maybe they are not match with each other
the last error I pasted here is not related to RGA. Let me create a new bug, this one is for RGA team indeed.
该问题可能与 RGA 有关。确保系统中已安装 RGA 驱动程序和库(librga.so,位于 /usr/lib/aarch64-linux-gnu 中)。如果已安装,则可以通过更新来解决问题。 https://github.com/airockchip/librga
hello,To update the so library of RGA, you only need to replace the files in the /usr/lib/aarch64-linux-gnu directory?
normally yes, unless there're some update in headers which requires recompiling.
there are multiple versions of rga drivers and libraries, you can also try other versions of them.
or provide your chip and driver/library commit number to the maintainer to confirm.
通常是的,除非标头中有一些更新需要重新编译。
rga 驱动程序和库有多个版本,您也可以尝试其他版本。
或者向维护人员提供您的芯片和驱动程序/库提交号以确认。
At present, my so library can be used normally after local compilation, so I replaced the file in the /usr/lib/aarch64-linux-gnu directory and re-executed the program, but the log is still printed with the old version of the rga_api, how should I modify the version correctly?
maybe there is another librga somewhere(maybe /usr/lib/?)
you can try to search it in your rootfs and replace them all, or delete the others.
'LD_DEBUG=libs
也许某个地方还有另一个 librga(也许 /usr/lib/?)
你可以尝试在你的rootfs中搜索它并替换它们,或者删除其他的。
'LD_DEBUG=libs' 可能会告诉您有关加载哪个 librga 的更多信息。
Thank you for your reply, after I replaced it here, it worked fine
Hi, the pipeline runs for few seconds and it then fails with
RGA_BLIT fail: Invalid argument.