H264视频解码无法工作
git clonehttps://github.com/rockchip-linux/mpp.gitcdbuild/linux/aarch64cmake ../../../make 准备好Tennis1080p.h264文件,执行 :sudo ./mpi_dec_test-i Tennis1080p.h264-o 1080P_n.yuv -w1920 -h 1080 -t 7 -d 0 -x 0【输出问题】:没打印信息,没有输出文件:然后dmesg输出如下:rk_vcodec:mpp_task_attach_fd:1679: can't import dma-buf 1[ 1904.064617]rk_vcodec: mpp_translate_reg_address:1735: reg: 0x00000001 fd 1 failed[ 1904.064624]rk_vcodec: mpp_task_dump_mem_region:1909: --- dump mem region ---[ 1904.064634]mpp_rkvdec2 fdc38100.rkvdec-core: no memory region mapped[ 1904.064642]rk_vcodec: mpp_process_task_default:566: alloc_task failed.[ 1904.064684]rk_vcodec: mpp_wait_result_default:826: session 000000004d9d2db2 pending listis empty![ 1904.064699]rk_vcodec: mpp_msgs_wait:1531: session 7 wait result ret -5[ 1904.564840]mpp_dma_import_fd:197: dma_buf_get fd 1 failed[ 1904.564873]rk_vcodec: mpp_task_attach_fd:1679: can't import dma-buf 1[ 1904.564882]rk_vcodec: mpp_translate_reg_address:1735: reg: 0x00000001 fd 1 failed[ 1904.564889]rk_vcodec: mpp_task_dump_mem_region:1909: --- dump mem region ---[ 1904.564901]mpp_rkvdec2 fdc38100.rkvdec-core: no memory region mapped[ 1904.564910]rk_vcodec: mpp_process_task_default:566: alloc_task failed.[ 1904.564953]rk_vcodec: mpp_wait_result_default:826: session 000000004d9d2db2 pending list 第二个问题:使用系统默认解码脚本cd/usr/local/bin./h264dec.shmpp: mpp_info: mpp version: 8a85dc5d author: HermanChen 2022-03-14 : Fix stuck onreset async mode encodermpp: mpp_rt: NOT found ion allocatormpp: mpp_rt: found drm allocatormpp: mpp_info: mpp version: 8a85dc5d author: HermanChen 2022-03-14 : Fix stuck onreset async mode encodermpp: mpp_info: mpp version: 8a85dc5d author: HermanChen 2022-03-14 : Fix stuck onreset async mode encodermpp: mpp_info: mpp version: 8a85dc5d author: HermanChen 2022-03-14 : Fix stuck onreset async mode encoderSetting pipeline to PAUSED ...ERROR: Pipeline doesn't want to pause.ERROR: from element/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: Could not initialise XvoutputAdditional debug info:xvimagesink.c(1996): gst_xv_image_sink_open ():/GstPipeline:pipeline0/GstXvImageSink:xvimagesink0:Could not open display (null)Setting pipeline to NULL ...Freeing pipeline ...firefly@firefly:/usr/local/bin$请问如果验证32路1080P解码能力,如果进行解码,系统是否有问题?现在Ubuntu 用的是 wayland 默认解码 脚本应该 要把 xvimagesink 改成 glimagesink 才可以。mpp 和kernel 有对应关系,最好下载 SDK用 sdk 的 external/mpp 开发,另外 mpi_dec_test 固件本身应该自带的,现在 log 都调用 syslog 保存在 /var/log/syslog 中了 编译方法有没有问题,我用sdk中的mpp在板子上编译后,还是无法解码:
firefly mpp: mpp_opt: setup:real node 18:22 info 11:11
Jun1 03:28:46 firefly mpp: mpi_dec_utils: input file Tennis1080p.h264 size 10786528
Jun1 03:28:46 firefly mpp: mpi_dec_utils: cmd parse result:
Jun1 03:28:46 firefly mpp: mpi_dec_utils: inputfile name: Tennis1080p.h264
Jun1 03:28:46 firefly mpp: mpi_dec_utils: output file name: 1080P_n.yuv
Jun1 03:28:46 firefly mpp: mpi_dec_utils: width : 1920
Jun1 03:28:46 firefly mpp: mpi_dec_utils: height : 1080
Jun1 03:28:46 firefly mpp: mpi_dec_utils: type : 7
Jun1 03:28:46 firefly mpp: mpi_dec_utils: max frames : 0
Jun1 03:28:46 firefly mpp: mpi_dec_test: mpi_dec_test start
Jun1 03:28:46 firefly mpp: mpp_info: mpp version: unknown mpp version for missing VCS info
Jun1 03:28:46 firefly mpp: mpi_dec_test: 0x556a325a40 mpi_dec_test decoder test start w 1920 h 1080 type 7
Jun1 03:28:47 firefly mpp: mpi_dec_test: 0x556a325a40 decode_get_frame get info changed found
Jun1 03:28:47 firefly mpp: mpi_dec_test: 0x556a325a40 decoder require buffer w:h stride buf_size 4177920
Jun1 03:28:47 firefly mpp: mpi_dec_test: 0x556a325a40 decode get frame 0 err 1 discard 0
Jun1 03:28:47 firefly kernel: [ 2314.594793] mpp_dma_import_fd:197: dma_buf_get fd 1 failed
Jun1 03:28:47 firefly kernel: [ 2314.594819] rk_vcodec: mpp_task_attach_fd:1679: can't import dma-buf 1
Jun1 03:28:47 firefly kernel: [ 2314.594827] rk_vcodec: mpp_translate_reg_address:1735: reg: 0x00000001 fd 1 failed
Jun1 03:28:47 firefly kernel: [ 2314.594834] rk_vcodec: mpp_task_dump_mem_region:1909: --- dump mem region ---
Jun1 03:28:47 firefly kernel: [ 2314.594844] mpp_rkvdec2 fdc38100.rkvdec-core: no memory region mapped
Jun1 03:28:47 firefly kernel: [ 2314.594851] rk_vcodec: mpp_process_task_default:566: alloc_task failed.
Jun1 03:28:47 firefly kernel: [ 2314.594950] rk_vcodec: mpp_wait_result_default:826: session 000000009bae5dd2 pending list is empty!
Jun1 03:28:47 firefly kernel: [ 2314.594957] rk_vcodec: mpp_msgs_wait:1531: session 17 wait result ret -5
Jun1 03:28:47 firefly mpp: mpi_dec_test: 0x556a325a40 decode get frame 1 err 1 discard 0
Jun1 03:28:47 firefly mpp: mpi_dec_test: 0x556a325a40 decode get frame 2 err 1 discard 0
Jun1 03:28:47 firefly mpp: mpi_dec_test: 0x556a325a40 decode get frame 3 err 1 discard 0
Jun1 03:28:47 firefly mpp: mpi_dec_test: 0x556a325a40 decode get frame 4 err 1 discard 0
Jun1 03:28:47 firefly mpp: mpi_dec_test: 0x556a325a40 decode get frame 5 err 1 discard 0
Jun1 03:28:47 firefly mpp: mpi_dec_test: 0x556a325a40 decode get frame 6 err 1 discard 0
Jun1 03:28:47 firefly mpp: mpi_dec_test: 0x556a325a40 decode get frame 7 err 1 discard 0
Jun1 03:28:47 firefly mpp: mpi_dec_test: 0x556a325a40 decode get frame 8 err 1 discard 0
Jun1 03:28:47 firefly mpp: mpi_dec_test: 0x556a325a40 decode get frame 9 err 1 discard 0
Jun1 03:28:47 firefly mpp: mpi_dec_test: 0x556a325a40 decode get frame 10 err 1 discard 0
Jun1 03:28:47 firefly mpp: mpi_dec_test: 0x556a325a40 decode get frame 11 err 1 discard 0
Jun1 03:28:47 firefly mpp: mpi_dec_test: 0x556a325a40 decode get frame 12 err 1 discard 0
Jun1 03:28:47 firefly mpp: mpi_dec_test: 0x556a325a40 decode get frame 13 err 1 discard 0
Jun1 03:28:47 firefly mpp: mpi_dec_test: 0x556a325a40 decode get frame 14 err 1 discard 0
Jun1 03:28:47 firefly mpp: mpi_dec_test: 0x556a325a40 decode get frame 15 err 1 discard 0
板蓝根 发表于 2022-5-31 11:01
现在Ubuntu 用的是 wayland 默认解码 脚本应该 要把 xvimagesink 改成 glimagesink 才可以。mpp 和kern ...
Jun1 03:28:47 firefly kernel: [ 2314.594793] mpp_dma_import_fd:197: dma_buf_get fd 1 failed
Jun1 03:28:47 firefly kernel: [ 2314.594819] rk_vcodec: mpp_task_attach_fd:1679: can't import dma-buf 1
Jun1 03:28:47 firefly kernel: [ 2314.594827] rk_vcodec: mpp_translate_reg_address:1735: reg: 0x00000001 fd 1 failed
Jun1 03:28:47 firefly kernel: [ 2314.594834] rk_vcodec: mpp_task_dump_mem_region:1909: --- dump mem region ---
Jun1 03:28:47 firefly kernel: [ 2314.594844] mpp_rkvdec2 fdc38100.rkvdec-core: no memory region mapped
主要是报出如下错误:
Jun1 03:28:47 firefly kernel: [ 2314.594851] rk_vcodec: mpp_process_task_default:566: alloc_task failed.
Jun1 03:28:47 firefly kernel: [ 2314.594950] rk_vcodec: mpp_wait_result_default:826: session 000000009bae5dd2 pending list is empty!
Jun1 03:28:47 firefly kernel: [ 2314.594957] rk_vcodec: mpp_msgs_wait:1531: session 17 wait result ret -5
不编译,直接用 系统自带的可以吗? 去掉 -d 0 -x 0
sudo ./mpi_dec_test-i Tennis1080p.h264-o 1080P_n.yuv -w1920 -h 1080 -t 7
或者用
sudo ./mpi_dec_mt_test-i Tennis1080p.h264-o 1080P_n.yuv -w1920 -h 1080 -t 7
我这边用
sudo ./mpi_dec_mt_test-i Tennis1080p.h264-w1920 -h 1080 -t 7 -s 32
只解码不写 yuv文件 ,可以解码 32 路;
页:
[1]