I’m trying to encode video stream from hdmirx using rkmpp.
After I installed latest mpp and gstreamer-rockchip, mpph265enc
can be find in sudo gst-inspect-1.0
(root privilege is required).
But using the command below get an error output.
$ sudo gst-launch-1.0 v4l2src device=/dev/video0 ! queue ! video/x-raw,format=BGR,height=1080,width=1920 ! mpph264enc ! filesink location=test.mp4
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
rga_api version 1.7.3_[6]
RgaBlit(1439) RGA_BLIT fail: Device or resource busy
RgaBlit(1440) RGA_BLIT fail: Device or resource busy
fd-vir-phy-hnd-format[22, (nil), (nil), 0, 0]
rect[0, 0, 1920, 1080, 5760, 1080, 1792, 0]
f-blend-size-rotation-col-log-mmu[0, 0, 0, 0, 0, 0, 1]
fd-vir-phy-hnd-format[27, (nil), (nil), 0, 0]
rect[0, 0, 1920, 1080, 1920, 1088, 2560, 0]
f-blend-size-rotation-col-log-mmu[0, 0, 0, 0, 0, 0, 1]
This output the user patamaters when rga call blit fail
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 not-negotiated (-4)
Execution ended after 0:00:01.188796028
Setting pipeline to NULL ...
ERROR: from element /GstPipeline:pipeline0/GstQueue:queue0: Internal data stream error.
Additional debug info:
../plugins/elements/gstqueue.c(990): gst_queue_handle_sink_event (): /GstPipeline:pipeline0/GstQueue:queue0:
streaming stopped, reason not-negotiated (-4)
Freeing pipeline ...
And the dmesg
shows
[ 2132.852028] fdee0000.hdmirx-controller: stream stopping finished
[ 2139.872282] rga_job: rga_job_wait timeout
[ 2139.872299] rga3_reg: soft reset sys_ctrl = 18, ro_rest = 1
[ 2139.892309] rga3_reg: soft reset sys_ctrl = 18, ro_rest = 1
[ 2139.892314] rga3_reg: soft after reset sys_ctrl = 0, ro_rest = 0
[ 2139.892327] rga_job: rga request commit failed!
[ 2139.892333] rga: rga_request_commit failed
[ 2139.910241] fdee0000.hdmirx-controller: stream start stopping
[ 2139.910986] fdee0000.hdmirx-controller: stream stopping finished
Is it because the wrong command or the vpu drivers problems? Has anyone succeed in running hardware encoding video?