Template:RK3399 Linux FFmpeg/zh

From FriendlyARM WiKi
Revision as of 12:11, 20 December 2018 by Tzs (Talk | contribs) (updated by API)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Linux下使用ffmpeg进行硬件加速的视频解码

FriendlyCore和FriendlyDesktop系统均预装了 ffmpeg 的可执行文件、静态库和头文件,位于 /usr/ffmpeg-rkmp目录。
ffmpeg支持RockChip MPP视频硬件解码器,但并不支持硬编码,具体信息可参考:https://trac.ffmpeg.org/wiki/HWAccelIntro

测试4K视频的解码性能:

/usr/ffmpeg-rkmp/bin/ffmpeg -benchmark -loglevel 48 -vcodec h264_rkmpp -i 4K-Chimei-inn-60mbps.mp4 -map 0:v:0 -f null -

结果如下图所示,平均 45 FPS:
Rk3399-ffmpeg-fps.jpg
要播放视频,可以使用基于 ffmpeg 实现的播放器 mpv,上面测试所用的4K视频可在网盘的 test-video 目录找到,网盘地址:http://dl.friendlyarm.com/nanopct4。