基本思想:需要使用独立模块代码去实现自己的逻辑功能,所以在基于官方源码基础上,和参考附录几个官方链接,搞出一版rk3588编码测试和解码测试demo
测试视频/生成h264/生成yuv
链接: https://pan.baidu.com/s/1HbpeqMJb8HcgFpzaKhUxHw?pwd=zmtj 提取码: zmtj
一、先看工程rk_yuv_mpp_h264编码demo
测试结果rk3588测试结果
firefly@firefly:~/rk_yuv_mpp_h264/build$ sudo ./rk_yuv_mpp_h264
视频播放
firefly@firefly:~/rk_yuv_mpp_h264/build$ ffplay sample.h264
代码:https://github.com/sxj731533730/rk_yuv_mpp_h264
二、先看工程rk_h264_mpp_yuv编码demo
测试结果
firefly@firefly:~/rk_h264_mpp_yuv/build$ sudo ./rk_h264_mpp_yuv
decode_get_frame get info changed found.
decoder require buffer w:h [1280:720] stride [1280:720]found last packet.
decode h264 to yuv
decode h264 to yuv
decode h264 to yuv
decode h264 to yuv
decode h264 to yuv
decode h264 to yuv
decode h264 to yuv
decode h264 to yuv
decode h264 to yuv
decode h264 to yuv
decode h264 to yuv
found last frame.
codec decode exec success id:
firefly@firefly:~/rk_h264_mpp_yuv/build$
对生成得yuv进行播放
firefly@firefly:~/rk_h264_mpp_yuv$ ffplay -f rawvideo -video_size 1280*720 -pixel_format nv12 sample.yuv
测试结果
代码:https://github.com/sxj731533730/rk_h264_mpp_yuv
参考:
https://github.com/rockchip-linux/mpp
https://github.com/EhsanVahab/rockchip-mpp-encoder