Closed salvobellino95 closed 1 year ago
rock@rock-4c-plus:~/mpp$ sudo ./osal/test/mpp_platform_test
mpp[22812]: mpp_plat_test: chip name: radxa,rock-4c-plus rockchip,rk3399
mpp[22812]: mpp_plat_test:
mpp[22812]: mpp_plat_test: chip vcodec type 00040202
mpp[22812]: mpp_plat_test: found vpu2 codec
mpp[22812]: mpp_plat_test: found rkvdec decoder
mpp[22812]: mpp_plat_test: found vpu2 encoder
mpp[22812]: mpp_plat_test:
mpp[22812]: mpp_plat_test: start probing decoder device name:
mpp[22812]: mpp_plat_test: H.264 decoder: /dev/rkvdec
mpp[22812]: mpp_plat_test: H.265 decoder: /dev/rkvdec
mpp[22812]: mpp_plat_test: MJPEG decoder: /dev/vpu_service
mpp[22812]: mpp_plat_test: VP9 decoder: /dev/rkvdec
mpp[22812]: mpp_plat_test: avs decoder: /dev/vpu_service
mpp[22812]: mpp_plat_test:
mpp[22812]: mpp_plat_test: start probing encoder device name:
mpp[22812]: mpp_plat_test: H.264 encoder: /dev/vpu_service
mpp[22812]: mpp_plat_test: H.265 encoder: /dev/vpu_service
mpp[22812]: mpp_plat_test: MJPEG encoder: /dev/vpu_service
mpp[22812]: mpp_plat_test: mpp platform test done
the ffmpeg's rkmppdec is just a wrapper of mpp.
so maybe try the mpp's dec tests firstly to make sure that mpp is ok.
the mpp tests' input file should be raw h264 data or maybe try gstreamer rkmpp
gstreamer is hardware accelerated on the 4c+. However I would prefer to use mpv and am encountering the same issue with ffmpeg.
I have to use FFmpeg because the final goal is to install Frigate NVR which does not support gstreamer, I tried directly mpp decode test and it does not works reporting Segmentation fault, I am investigating the root cause
@cpmbailey Maybe we can also search for a way to redirect commands for ffmpeg to gstreamer, with a fake ffmpeg that simply does this redirect, seems a crazy idea but it could works, I will investigate, do you have a command to test the decode using gstreamer on a sample h264 file?
gst-launch-1.0 filesrc location=/home/rock/test.h264 ! h264parse ! avdec_h264 ! videoconvert ! ximagesink
Here I think that you are not using hwaccel, as I know you should use mppvideodec which is the decoder added by gstreamer-rockchip plugin, if you use avdec_h264 you are doing sw decode
Moreover I do not found gstreamer installed in the Raxda official build, do you installed it manually?
@cpmbailey I found that my test file was broken, but testing with gstreamer it can play the video
sudo wget https://github.com/adafruit/pi_hello_video/raw/master/hello_video/test.h264
gst-launch-1.0 filesrc location=./test.h264 ! h264parse ! mppvideodec ! kmssink
This play the video (does not work via SSH). Here I am using mppvideodec @JeffyCN how this can work if mpi_dec_test reports Segmentation fault and apparently does not work? There are many strange things here to understand
Sorry, copied the wrong one from my history but looks like you got it working.
mpi_dec_test is working for me now, operator error
I still get some timeout getting decoded frame messages but this seems to complete for me now. Are you sure that ffmpeg is using the correct librockchip_mpp.so.1?
@cpmbailey are you using the builtin rockchip mpp or you reinstalled it?
Are you sure that ffmpeg is using the correct librockchip_mpp.so.1?
How can I check this?
I rebuilt it from the develop branch (not sure if that is necessary) and then copied it over the one that ffmpeg is linking against from "ldd fmpeg".
Have managed to get mpv working and hardware accelerated now
are you using FFMPEG from this repo? do you remember the branch? I will try
Yes, think I used the master branch as of this morning
I still get some timeout getting decoded frame messages but this seems to complete for me now.
timeout logs are for debugging only, since we are doing non-block(or 1ms) polling for async decoding.
This play the video (does not work via SSH). Here I am using mppvideodec @JeffyCN how this can work if mpi_dec_test reports Segmentation fault and apparently does not work? There are many strange things here to understand
could be mpp test's bug or using wrong command options: mpi_dec_test -t 7 -i test.h264
Hi, thank you for your work! Im trying to build ffmpeg to support hw decode on a Rock Pi 4c + with legacy Debian vendor recommended OS. Just found this repo linked in many forum threads.
uname -r 4.4.194-11-rk3399-rockchip-g1bb08d49cc40
I cloned this repo, installed rockchip mpp from the official repo and builded this ffmpeg with enable-rkmpp but it does not work. Do I missed something?
But It does not work, many cur_dts is invalid errors and "Timeout getting decoded frame". Can you help me?