Toybrick

楼主: jefferyzhang

RK3399Pro入门教程(8)6路1080P30帧解码显示范例

 

jefferyzhang

版主

积分
12937
141#
 楼主| 发表于 2020-7-21 17:43:40 | 只看该作者
JackXu9527 发表于 2020-7-21 16:30
Hello, is there an example of RSTP on Android?

try ffmpeg android edition
回复

使用道具 举报

JackXu9527

注册会员

积分
93
142#
发表于 2020-7-23 21:55:03 | 只看该作者
jefferyzhang 发表于 2020-7-21 17:43
try ffmpeg android edition

Thank you for your reply. Where can I find such an example? Can you give me a link?
回复

使用道具 举报

jefferyzhang

版主

积分
12937
143#
 楼主| 发表于 2020-7-24 08:29:22 | 只看该作者
JackXu9527 发表于 2020-7-23 21:55
Thank you for your reply. Where can I find such an example? Can you give me a link?

1. use ffpmeg offical edition build by yourself, and demux rtsp 264 data, than decoding using MediaCodec
2. try 3rd android build, such as https://github.com/bravobit/FFmpeg-Android
回复

使用道具 举报

ztfmars

注册会员

积分
108
144#
发表于 2020-8-7 16:55:58 | 只看该作者
rk3399pro ~debian10~安装相关软件包正常。
程序运行正常,可以正常显示画面。
但是却无法退出,这个是什么情况?或者说怎么样才能让他退出整个画面,求告知,多谢

代码如下:

import toybrick as toy
import time
import cv2

url = "rtsp://admin:admin123@192.168.9.11:554/Streaming/Channels/1/"
rtsp = toy.input.createRtspClient(url)
rtsp.connect()
last = time.time()
gl = toy.output.createGLDrmDisplay(toy.DisplayPort.HDMI_A)
idx0 = gl.add_view(50, 600, 768, 432)
frame_index = 0
while rtsp.is_opened():
    frame = rtsp.read_rgb(768, 432)
    now = time.time()
    gl.show(idx0, frame)
    print (frame_index, "----------------------------",now - last)
    frame = frame.array()
    #cv2.imwrite("images/4_" + str(frame_index) + ".jpg", frame)
    mkey = cv2.waitKey(1) & 0xFF
    if mkey == ord('q'):
        break
    frame_index += 1
    last = now
回复

使用道具 举报

jefferyzhang

版主

积分
12937
145#
 楼主| 发表于 2020-8-7 17:37:55 | 只看该作者
ztfmars 发表于 2020-8-7 16:55
rk3399pro ~debian10~安装相关软件包正常。
程序运行正常,可以正常显示画面。
但是却无法退出,这个是什 ...

sample而已。。。为啥要退出- -#
这库别人临时写的,没人维护的
回复

使用道具 举报

ztfmars

注册会员

积分
108
146#
发表于 2020-8-8 15:21:16 | 只看该作者
jefferyzhang 发表于 2020-8-7 17:37
sample而已。。。为啥要退出- -#
这库别人临时写的,没人维护的

客户有个需求,按下不同键,切换不同画面,这个如果要是和多个module一块跑的话,我在想是不是在运行display的时候,能有像cv2.destroyAllWindows这样,能随时退出画面的接口;或者像cv2.waitKey这样同时接受键盘按键,并且不阻塞线程的接口
回复

使用道具 举报

mittens

注册会员

积分
104
147#
发表于 2020-8-14 17:29:25 | 只看该作者
你好,import toybrick as tb
问下报这个错是少装了什么库?

  1. File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run
  2.     self._target(*self._args, **self._kwargs)
  3.   File "./src/taskmanager.py", line 69, in camera
  4.     import toybrick as tb
  5.   File "/usr/local/lib/python3.7/dist-packages/toybrick/__init__.py", line 26, in <module>
  6.     from toybrick.rtsp import  RtspClient
  7.   File "/usr/local/lib/python3.7/dist-packages/toybrick/rtsp.py", line 1, in <module>
  8.     from . import rkrtspclient
  9. ImportError: libEGL.so: cannot open shared object file: No such file or directory
复制代码
回复

使用道具 举报

jefferyzhang

版主

积分
12937
148#
 楼主| 发表于 2020-8-14 23:02:56 | 只看该作者
mittens 发表于 2020-8-14 17:29
你好,import toybrick as tb
问下报这个错是少装了什么库?

libEGL.so, opengles
回复

使用道具 举报

mittens

注册会员

积分
104
149#
发表于 2020-8-19 09:31:25 | 只看该作者

谢谢,可以问下这块儿安装有文档吗?或者用什么命令装?
回复

使用道具 举报

jefferyzhang

版主

积分
12937
150#
 楼主| 发表于 2020-8-19 11:48:46 | 只看该作者
mittens 发表于 2020-8-19 09:31
谢谢,可以问下这块儿安装有文档吗?或者用什么命令装?

看置顶帖,安装opengl mali
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

产品中心 购买渠道 开源社区 Wiki教程 资料下载 关于Toybrick


快速回复 返回顶部 返回列表