“Debian Desktop 系统使用”的版本间的差异

来自ARM Wiki
跳转至: 导航搜索
第35行: 第35行:
 
$ gst-discoverer-1.0 /usr/local/test.mp4
 
$ gst-discoverer-1.0 /usr/local/test.mp4
 
   # 查看视频信息
 
   # 查看视频信息
 +
</syntaxhighlight>
 +
*mpv播放器
 +
系统自带mpv播放器,集成mpp支持硬解码
 +
<syntaxhighlight lang="bash">
 +
$ mpv /home/linaro/4k.mp4
 +
  # 使用mpv播放器播放4k视频
 +
$ mpv /dev/video0
 +
  # 预览摄像头
 +
$ mpv rtsp://admin:adm12345@10.168.1.227/cam/realmonitor?channel=1&subtype=0
 +
  # 播放rtsp流
 +
</syntaxhighlight>
 +
<br />
 +
*FFmpeg
 +
FFmpeg支持硬件解码
 +
<syntaxhighlight lang="bash">
 +
$ ffmpeg -decoders | grep -i mpp
 +
...
 +
V..... h264_rkmpp          h264 (rkmpp) (codec h264)
 +
V..... hevc_rkmpp          hevc (rkmpp) (codec hevc)
 +
V..... vp8_rkmpp            vp8 (rkmpp) (codec vp8)
 +
V..... vp9_rkmpp            vp9 (rkmpp) (codec vp9)
 +
  # 查看ffmpeg支持的硬件解码器
 
</syntaxhighlight>
 
</syntaxhighlight>
 
===OpenGL-ES===
 
===OpenGL-ES===

2020年9月10日 (四) 19:30的版本

基础信息

  • 用户密码
user: linaro
passwd: linaro

使用示例

视频硬件编解码

  • 使用Qt的multimedia播放视频
$ sudo test_dec-qt.sh arm64

Screenshot from 2020-07-22 14-42-03.png

  • 使用gstreamer播放视频
$ sudo test_dec-gst.sh

Screenshot from 2020-07-22 14-45-33.png

  • 播放4K视频
$ gst-launch-1.0 playbin uri=file:///home/linaro/4k.mp4

Screenshot from 2020-07-22 14-51-55.png

  • 列出一些gstreamer命令
$ gst-launch-1.0 playbin uri=file:///usr/local/test.mp4
$ gst-launch-1.0 uridecodebin uri=file:///usr/local/test.mp4 ! xvimagesink
$ gst-launch-1.0 uridecodebin uri=file:///usr/local/test.mp4 ! rkximagesink
$ gst-launch-1.0 filesrc location=/usr/local/test.mp4 ! queue ! qtdemux  name=dmux dmux.video_0 ! queue ! h264parse ! mppvideodec ! rkximagesink dmux.audio_0 ! queue ! aacparse ! faad ! autoaudiosink
$ gst-inspect-1.0 rkximagesink
  # 查看插件信息
$ gst-discoverer-1.0 /usr/local/test.mp4
  # 查看视频信息
  • mpv播放器

系统自带mpv播放器,集成mpp支持硬解码

$ mpv /home/linaro/4k.mp4
  # 使用mpv播放器播放4k视频
$ mpv /dev/video0
  # 预览摄像头
$ mpv rtsp://admin:adm12345@10.168.1.227/cam/realmonitor?channel=1&subtype=0
  # 播放rtsp流


  • FFmpeg

FFmpeg支持硬件解码

$ ffmpeg -decoders | grep -i mpp
...
 V..... h264_rkmpp           h264 (rkmpp) (codec h264)
 V..... hevc_rkmpp           hevc (rkmpp) (codec hevc)
 V..... vp8_rkmpp            vp8 (rkmpp) (codec vp8)
 V..... vp9_rkmpp            vp9 (rkmpp) (codec vp9)
  # 查看ffmpeg支持的硬件解码器

OpenGL-ES

  • 执行测试脚本
$ sudo test_glmark2_normal.sh

Screenshot from 2020-07-22 09-07-38.png

Screenshot from 2020-07-22 09-12-58.png

WebGL

  • 打开chromium浏览器,在地址栏输入 chrome://gpu 查看硬件加速相关信息

Screenshot from 2020-07-22 10-31-26.png

Screenshot from 2020-07-22 10-50-29.png

OpenCL

  • 安装并运行clinfo,查看OpenCL相关信息
$ sudo apt-get install -f -y clinfo
$ clinfo
Number of platforms                               1
  Platform Name                                   ARM Platform
  Platform Vendor                                 ARM
  Platform Version                                OpenCL 1.2 v1.r14p0-01rel0-git(a79caef).8ddfd7584149d9238dced4e406610de7
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addy
  Platform Extensions function suffix             ARM

  Platform Name                                   ARM Platform
Number of devices                                 1
  Device Name                                     Mali-T860
  Device Vendor                                   ARM
  Device Vendor ID                                0x8602000
  Device Version                                  OpenCL 1.2 v1.r14p0-01rel0-git(a79caef).8ddfd7584149d9238dced4e406610de7
  Driver Version                                  1.2
  Device OpenCL C Version                         OpenCL C 1.2 v1.r14p0-01rel0-git(a79caef).8ddfd7584149d9238dced4e406610de7
  Device Type                                     GPU
  Device Profile                                  FULL_PROFILE
  Max compute units                               4
  Max clock frequency                             800MHz
  Device Partition                                (core)
    Max number of sub-devices                     0
    Supported partition types                     None
  Max work item dimensions                        3
  Max work item sizes                             256x256x256
  Max work group size                             256
...