提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档
文章目录
- 前言
- 一、cpu解码
- 二、gstreamer+mpp
- 1.默认已安装
- 2.没安装必要软件
- 总结
前言
以前一直在MPP上开发硬解码推理,最近想弄一个盒子支持调用mpp硬解码播放视频的。我使用的盒子是firefly的rk3399,这个板子的cpu说强也不强,说弱也不算太弱。
一、cpu解码
为了对比先使用cpu解码,最典型的就是随便用一个播放器即可,比如vlc。
这个占用太大了吧,不要说4K了,就算1080p也差点顶不住。
二、gstreamer+mpp
firefly的系统还是可以的,基本上不需要安装什么软件,默认完整版系统都自带了。
1.默认已安装
这个默认你已经安装了所有必要的软件。
gst-play-1.0 --flags=3 --videosink="fpsdisplaysink video-sink=xvimagesink signal-fps-measurements=true text-overlay=false sync=true" <视频文件>
单看gst明显小太多了,说明调用了硬件解码器(mpp)。
2.没安装必要软件
firefly默认是安装了软件的,其它的系统安装就复杂些。参考我的安装就行了。
ii gir1.2-gstreamer-1.0:arm64 1.14.5-0ubuntu1~18.04.1firefly1 arm64 GObject introspection data for the GStreamer library
ii gstreamer1.0-alsa:arm64 1.14.5-0ubuntu1~18.04.1firefly2 arm64 GStreamer plugin for ALSA
ii gstreamer1.0-doc 1.14.5-0ubuntu1~18.04.1firefly1 all GStreamer core documentation and manuals
ii gstreamer1.0-gl:arm64 1.14.5-0ubuntu1~18.04.1firefly2 arm64 GStreamer plugins for GL
ii gstreamer1.0-gtk3:arm64 1.14.5-0ubuntu1~18.04.1firefly2 arm64 GStreamer plugin for GTK+3
ii gstreamer1.0-libav:arm64 1.14.5-0ubuntu1~18.04.1firefly1 arm64 libav plugin for GStreamer
ii gstreamer1.0-pipewire:arm64 0.2.7-1firefly1 arm64 GStreamer 1.0 plugin for the PipeWire multimedia server
ii gstreamer1.0-plugins-bad:arm64 1.14.5-0ubuntu1~18.04.1firefly2 arm64 GStreamer plugins from the "bad" set
ii gstreamer1.0-plugins-base:arm64 1.14.5-0ubuntu1~18.04.1firefly2 arm64 GStreamer plugins from the "base" set
ii gstreamer1.0-plugins-base-apps 1.14.5-0ubuntu1~18.04.1firefly2 arm64 GStreamer helper programs from the "base" set
ii gstreamer1.0-plugins-base-doc 1.14.5-0ubuntu1~18.04.1firefly2 all GStreamer documentation for plugins from the "base" set
ii gstreamer1.0-plugins-good:arm64 1.14.5-0ubuntu1~18.04.1firefly2 arm64 GStreamer plugins from the "good" set
ii gstreamer1.0-plugins-ugly:arm64 1.14.5-0ubuntu1~18.04.1 arm64 GStreamer plugins from the "ugly" set
ii gstreamer1.0-pulseaudio:arm64 1.14.5-0ubuntu1~18.04.1firefly2 arm64 GStreamer plugin for PulseAudio
ii gstreamer1.0-rockchip1 1.14.2firefly3 arm64 The Gstreamer plugins for Rockchip RK3xxx platform.
ii gstreamer1.0-tools 1.14.5-0ubuntu1~18.04.1firefly1 arm64 Tools for use with GStreamer
ii gstreamer1.0-vaapi:arm64 1.14.5-0ubuntu1~ubuntu18.04.1 arm64 VA-API plugins for GStreamer
ii gstreamer1.0-x:arm64 1.14.5-0ubuntu1~18.04.1firefly2 arm64 GStreamer plugins for X11 and Pango
ii libgstreamer-gl1.0-0:arm64 1.14.5-0ubuntu1~18.04.1firefly2 arm64 GStreamer GL libraries
ii libgstreamer-opencv1.0-0:arm64 1.14.5-0ubuntu1~18.04.1firefly2 arm64 GStreamer OpenCV libraries
ii libgstreamer-plugins-bad1.0-0:arm64 1.14.5-0ubuntu1~18.04.1firefly2 arm64 GStreamer libraries from the "bad" set
ii libgstreamer-plugins-base1.0-0:arm64 1.14.5-0ubuntu1~18.04.1firefly2 arm64 GStreamer libraries from the "base" set
ii libgstreamer-plugins-good1.0-0:arm64 1.14.5-0ubuntu1~18.04.1firefly2 arm64 GStreamer development files for libraries from the "good" set
ii libgstreamer1.0-0:arm64 1.14.5-0ubuntu1~18.04.1firefly1 arm64 Core GStreamer libraries and elements
ii libgstreamer1.0-dev:arm64 1.14.5-0ubuntu1~18.04.1firefly1 arm64 GStreamer core development files
总结
1、目前实现了视频播放,接下来研究chrome硬解码和播放器硬解码