Toybrick

标题: python sdk拉流问题 [打印本页]

作者: MWM    时间: 2022-8-16 17:41
标题: python sdk拉流问题
本帖最后由 MWM 于 2022-8-16 17:51 编辑

大佬能否帮忙看下啥问题:
我用ffmpeg推流rtsp,板子上拉流不成功。直接拉取ipc的rtsp是可以的。sdk版本0.5.10


推流指令
  1. ffmpeg  -an -re -stream_loop -1  -i "test.mp4"  -vcodec h264 -codec copy -f rtsp -rtsp_transport udp rtsp://192.168.11.18/stream0
复制代码
板子上拉流
  1. stream = toy.RtspCapture(url, usr, pwd)    ret, frame = stream.read(1920, 1080)
复制代码
板子上报错:
  1. [08/16 09:32:01.889] E/: (get in :286): decode_get_frame failed ret -8
复制代码


用vlc是可以播放的。用opecv也可以取到帧


  1. 测试视频链接  https://pan.baidu.com/s/1VEH-tYh7W_qfpV-Wa2UYuA?pwd=la18  提取码:la18
复制代码





作者: jefferyzhang    时间: 2022-8-16 21:45
发jouralctl的log

作者: MWM    时间: 2022-8-16 23:26
本帖最后由 MWM 于 2022-8-16 23:47 编辑
jefferyzhang 发表于 2022-8-16 21:45
发jouralctl的log

谢谢大佬。部分日志如下,更多日志在附件里面:
Aug 16 15:38:16 toybrick python3[93034]: D/: Loading GLES library ...
Aug 16 15:38:16 toybrick mpp[93034]: D/: PyDisplay port=HDMI_A_1, 11
Aug 16 15:38:16 toybrick python3[93034]: D/: EGL: using gbm backend, display port=11, no=1 ...
Aug 16 15:38:16 toybrick python3[93034]: D/: Drm find display port = 11, w=1920 h=1080
Aug 16 15:38:16 toybrick python3[93034]: I/: gbm init surface : 1920x1080
Aug 16 15:38:16 toybrick python3[93034]: D/: * EGL_VERSION = 1.4 Valhall-"g6p0-01eac0"
Aug 16 15:38:16 toybrick python3[93034]: D/: * EGL_EXTENSIONS = EGL_WL_bind_wayland_display EGL_NV_context_priority_realtime EGL_KHR_partial_update EGL_KHR_config_attribs EGL_KHR_image EGL_KHR_image_base EGL_KHR_fence_sync EGL_KHR_wait_sync EGL_KHR_gl_colorspace EGL_KHR_get_all_proc_addresses EGL_IMG_context_priority EGL_KHR_no_config_context EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_EXT_yuv_surface EGL_EXT_pixel_format_float EGL_ARM_pixmap_multisample_discard EGL_KHR_gl_texture_2D_image EGL_KHR_gl_renderbuffer_image EGL_KHR_create_context EGL_KHR_surfaceless_context EGL_KHR_gl_texture_cubemap_image EGL_EXT_image_gl_colorspace EGL_EXT_create_context_robustness
Aug 16 15:38:16 toybrick python3[93034]: D/: * EGL have 26 configs
Aug 16 15:38:16 toybrick python3[93034]: D/: OpenGL Configs:
Aug 16 15:38:16 toybrick python3[93034]: D/:   EGL_SAMPLES = 16
Aug 16 15:38:16 toybrick python3[93034]: D/:   EGL_SAMPLE_BUFFERS = 1
Aug 16 15:38:16 toybrick python3[93034]: D/:   EGL_RED_SIZE = 8
Aug 16 15:38:16 toybrick python3[93034]: D/:   EGL_GREEN_SIZE = 8
Aug 16 15:38:16 toybrick python3[93034]: D/:   EGL_BLUE_SIZE = 8
Aug 16 15:38:16 toybrick python3[93034]: D/:   EGL_ALPHA_SIZE = 8
Aug 16 15:38:16 toybrick python3[93034]: D/:   EGL_DEPTH_SIZE = 24
Aug 16 15:38:16 toybrick python3[93034]: D/:   EGL_BUFFER_SIZE = 32
Aug 16 15:38:16 toybrick python3[93034]: D/:   EGL_NATIVE_VISUAL_ID = 875713089
Aug 16 15:38:16 toybrick python3[93034]: D/: GLEngine initializing ...
Aug 16 15:38:16 toybrick python3[93034]: D/: GLEngine:: renderer thread begin ...
Aug 16 15:38:16 toybrick python3[93034]: D/: GLEngine: init states ...
Aug 16 15:38:16 toybrick python3[93034]: D/: RtspClient: state changed ! NOSET -> READY
Aug 16 15:38:16 toybrick python3[93034]: D/: Rtsp state thread begin ...
Aug 16 15:38:16 toybrick python3[93034]: D/: RtspClientUnit::startRtsp ...
Aug 16 15:38:16 toybrick python3[93034]: D/: RtspClient: stopping all video recv threads (rtsp://192.168.11.18:554/stream0)...
Aug 16 15:38:16 toybrick python3[93034]: D/: RtspClient: stopping all video recv threads (rtsp://192.168.11.18:554/stream0)... done
Aug 16 15:38:16 toybrick python3[93034]: D/: RtspClient: stopping all audio recv threads (rtsp://192.168.11.18:554/stream0)...
Aug 16 15:38:16 toybrick python3[93034]: D/: RtspClient: stopping all audio recv threads (rtsp://192.168.11.18:554/stream0)... done
Aug 16 15:38:16 toybrick python3[93034]: D/: GLEngine: new framebuffer with multisample=0
Aug 16 15:38:16 toybrick python3[93034]: D/: curlto rtsp://192.168.11.18:554/stream0 , cli 59756:59766, tcp: 0
Aug 16 15:38:16 toybrick python3[93034]: D/: RtspClient: state changed ! READY -> CONNECTING
Aug 16 15:38:16 toybrick python3[93034]: W/: (parseConnection in :151): Sdp: found connection before media > c=IN IP4 192.168.11.18
Aug 16 15:38:16 toybrick python3[93034]: D/: ========= DUMP TRACKS =========
Aug 16 15:38:16 toybrick python3[93034]: D/:  + Track: control: streamid=0
Aug 16 15:38:16 toybrick python3[93034]: D/:    - media = 1
Aug 16 15:38:16 toybrick python3[93034]: D/:    - port = 0
Aug 16 15:38:16 toybrick python3[93034]: D/:    - transport = RTP/AVP
Aug 16 15:38:16 toybrick python3[93034]: D/:    - connection ip = , multicast = 0
Aug 16 15:38:16 toybrick python3[93034]: D/:    - connection ttl = 0
Aug 16 15:38:16 toybrick python3[93034]: D/:    - format list:
Aug 16 15:38:16 toybrick python3[93034]: D/:       * format: 96
Aug 16 15:38:16 toybrick python3[93034]: D/:         format encoder = H264
Aug 16 15:38:16 toybrick python3[93034]: D/:         format clockrate = 90000
Aug 16 15:38:16 toybrick python3[93034]: D/:         format parameters:
Aug 16 15:38:16 toybrick python3[93034]: D/:           [packetization-mode] = 1
Aug 16 15:38:16 toybrick python3[93034]: D/:           [profile-level-id] = 4D4028
Aug 16 15:38:16 toybrick python3[93034]: D/:           [sprop-parameter-sets=Z01AKJWgHgCJ+XAWoCAgKAAAH0AAB1MHAAADAHoSAAADAtxsF3lwUA==,aO48gA] = =
Aug 16 15:38:16 toybrick python3[93034]: D/: ========= DUMP FORMATS =========
Aug 16 15:38:16 toybrick python3[93034]: D/:  + format id: 96
Aug 16 15:38:16 toybrick python3[93034]: D/:    - encoder = H264
Aug 16 15:38:16 toybrick python3[93034]: D/:    - clockrate = 90000
Aug 16 15:38:16 toybrick python3[93034]: D/:    - channels = 1
Aug 16 15:38:16 toybrick python3[93034]: D/:    - format parameters:
Aug 16 15:38:16 toybrick python3[93034]: D/:      [packetization-mode] = 1
Aug 16 15:38:16 toybrick python3[93034]: D/:      [profile-level-id] = 4D4028
Aug 16 15:38:16 toybrick python3[93034]: D/:      [sprop-parameter-sets=Z01AKJWgHgCJ+XAWoCAgKAAAH0AAB1MHAAADAHoSAAADAtxsF3lwUA==,aO48gA] = =
Aug 16 15:38:16 toybrick python3[93034]: D/: RtspClientUnit::startVideoRecvThread: tcp=0, isMulticast=0
Aug 16 15:38:16 toybrick python3[93034]: D/: RtspClient: stopping all video recv threads (rtsp://192.168.11.18:554/stream0)...
Aug 16 15:38:16 toybrick python3[93034]: D/: RtspClient: stopping all video recv threads (rtsp://192.168.11.18:554/stream0)... done
Aug 16 15:38:16 toybrick python3[93034]: D/: RtspClientUnit::startAudioRecvThread: tcp=0, isMulticast=0
Aug 16 15:38:16 toybrick python3[93034]: D/: RtspClient: stopping all audio recv threads (rtsp://192.168.11.18:554/stream0)...
Aug 16 15:38:16 toybrick python3[93034]: D/: RtspClient: stopping all audio recv threads (rtsp://192.168.11.18:554/stream0)... done
Aug 16 15:38:16 toybrick python3[93034]: D/: listening rtp port 59756
Aug 16 15:38:16 toybrick python3[93034]: D/: listening rtp port 59766
Aug 16 15:38:16 toybrick python3[93034]: D/: setup 59756 , 59757, uri: rtsp://192.168.11.18:554/stream0/streamid=0
Aug 16 15:38:16 toybrick python3[93034]: D/: listening rtcp port 59767
Aug 16 15:38:16 toybrick python3[93034]: D/: listening rtcp port 59757
Aug 16 15:38:16 toybrick python3[93034]: D/: EGL: add new drm FB 225
Aug 16 15:38:16 toybrick kernel: dwhdmi-rockchip fde80000.hdmi: use tmds mode
Aug 16 15:38:16 toybrick python3[93034]: D/: # Found[1] port: 59756 - 59757
Aug 16 15:38:16 toybrick python3[93034]: W/: (startCurl in :650): RtspClient: audio track no found !
Aug 16 15:38:16 toybrick python3[93034]: D/: RtspClient: state changed ! CONNECTING -> CONNECTED
Aug 16 15:38:16 toybrick python3[93034]: D/: Video SSRC Changed! 0 -> 2566655401
Aug 16 15:38:16 toybrick python3[93034]: D/: RTP264UP_UNIT [0x7f840027f0] loss/recv: 0.00/ 0.10 SEI|SPS|PPS|NI|I: 0.00|0.00|0.00|0.00|0.00
Aug 16 15:38:16 toybrick python3[93034]: W/: (transmitTo in :39): [0x30114658] transmitIn buffer PT_RTP_VIDEO is filter out by RTPUP_AAC_UNIT
Aug 16 15:38:16 toybrick python3[93034]: W/: (transmitTo in :39): [0x30114658] transmitIn buffer PT_RTP_VIDEO is filter out by RTPUP_AAC_UNIT
Aug 16 15:38:16 toybrick python3[93034]: W/: (transmitTo in :39): [0x30114658] transmitIn buffer PT_RTP_VIDEO is filter out by RTPUP_AAC_UNIT
Aug 16 15:38:16 toybrick python3[93034]: W/: (transmitTo in :39): [0x30114658] transmitIn buffer PT_RTP_VIDEO is filter out by RTPUP_AAC_UNIT
Aug 16 15:38:16 toybrick python3[93034]: W/: (transmitTo in :39): [0x30114658] transmitIn buffer PT_RTP_VIDEO is filter out by RTPUP_AAC_UNIT
Aug 16 15:38:16 toybrick python3[93034]: W/: (transmitTo in :39): [0x30114658] transmitIn buffer PT_RTP_VIDEO is filter out by RTPUP_AAC_UNIT
Aug 16 15:38:16 toybrick python3[93034]: W/: (transmitTo in :39): [0x30114658] transmitIn buffer PT_RTP_VIDEO is filter out by RTPUP_AAC_UNIT
Aug 16 15:38:16 toybrick python3[93034]: W/: (transmitTo in :39): [0x30114658] transmitIn buffer PT_RTP_VIDEO is filter out by RTPUP_AAC_UNIT
Aug 16 15:38:16 toybrick python3[93034]: W/: (transmitTo in :39): [0x30114658] transmitIn buffer PT_RTP_VIDEO is filter out by RTPUP_AAC_UNIT
Aug 16 15:38:16 toybrick python3[93034]: W/: (transmitTo in :39): [0x30114658] transmitIn buffer PT_RTP_VIDEO is filter out by RTPUP_AAC_UNIT
Aug 16 15:38:16 toybrick python3[93034]: mpp_info: mpp version: unknown mpp version for missing VCS info
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: D/: Compiling gl program ...
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: D/: GLProgram::createProgram ...
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: D/: GL: create program: 3
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: D/: EGL: add new drm FB 216
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: W/: (onTransmitIn in :61): rtp lost one packet ... mDebugCntRtpLost: 1372 > 1375
Aug 16 15:38:16 toybrick python3[93034]: W/: (onTransmitIn in :61): rtp lost one packet ... mDebugCntRtpLost: 1375 > 1387
Aug 16 15:38:16 toybrick python3[93034]: W/: (onTransmitIn in :61): rtp lost one packet ... mDebugCntRtpLost: 1387 > 1396
Aug 16 15:38:16 toybrick python3[93034]: W/: (onTransmitIn in :61): rtp lost one packet ... mDebugCntRtpLost: 1396 > 1408
Aug 16 15:38:16 toybrick python3[93034]: W/: (onTransmitIn in :61): rtp lost one packet ... mDebugCntRtpLost: 1408 > 1419
Aug 16 15:38:16 toybrick python3[93034]: W/: (onTransmitIn in :61): rtp lost one packet ... mDebugCntRtpLost: 1419 > 1429
Aug 16 15:38:16 toybrick python3[93034]: W/: (onTransmitIn in :61): rtp lost one packet ... mDebugCntRtpLost: 1429 > 1439
Aug 16 15:38:16 toybrick python3[93034]: W/: (onTransmitIn in :61): rtp lost one packet ... mDebugCntRtpLost: 1439 > 1450
Aug 16 15:38:16 toybrick python3[93034]: W/: (onTransmitIn in :61): rtp lost one packet ... mDebugCntRtpLost: 1450 > 1459
Aug 16 15:38:16 toybrick python3[93034]: W/: (onTransmitIn in :61): rtp lost one packet ... mDebugCntRtpLost: 1459 > 1471
Aug 16 15:38:16 toybrick python3[93034]: W/: (onTransmitIn in :61): rtp lost one packet ... mDebugCntRtpLost: 1471 > 1481
Aug 16 15:38:16 toybrick python3[93034]: W/: (onTransmitIn in :61): rtp lost one packet ... mDebugCntRtpLost: 1481 > 1489
Aug 16 15:38:16 toybrick python3[93034]: W/: (onTransmitIn in :61): rtp lost one packet ... mDebugCntRtpLost: 1489 > 1497
Aug 16 15:38:16 toybrick python3[93034]: W/: (onTransmitIn in :61): rtp lost one packet ... mDebugCntRtpLost: 1497 > 1508
Aug 16 15:38:16 toybrick python3[93034]: W/: (onTransmitIn in :61): rtp lost one packet ... mDebugCntRtpLost: 1508 > 1519
Aug 16 15:38:16 toybrick python3[93034]: W/: (onTransmitIn in :61): rtp lost one packet ... mDebugCntRtpLost: 1519 > 1529
Aug 16 15:38:16 toybrick python3[93034]: W/: (onTransmitIn in :61): rtp lost one packet ... mDebugCntRtpLost: 1529 > 1531
Aug 16 15:38:16 toybrick python3[93034]: W/: (onTransmitIn in :61): rtp lost one packet ... mDebugCntRtpLost: 1532 > 1534
Aug 16 15:38:16 toybrick python3[93034]: W/: (onTransmitIn in :61): rtp lost one packet ... mDebugCntRtpLost: 1535 > 1540
Aug 16 15:38:16 toybrick python3[93034]: W/: (onTransmitIn in :61): rtp lost one packet ... mDebugCntRtpLost: 1541 > 1546
Aug 16 15:38:16 toybrick python3[93034]: W/: (onTransmitIn in :61): rtp lost one packet ... mDebugCntRtpLost: 1546 > 1549
Aug 16 15:38:16 toybrick python3[93034]: W/: (onTransmitIn in :61): rtp lost one packet ... mDebugCntRtpLost: 1555 > 1558
Aug 16 15:38:16 toybrick python3[93034]: W/: (onTransmitIn in :61): rtp lost one packet ... mDebugCntRtpLost: 1561 > 1564
Aug 16 15:38:16 toybrick python3[93034]: W/: (onTransmitIn in :61): rtp lost one packet ... mDebugCntRtpLost: 1564 > 1566
Aug 16 15:38:16 toybrick python3[93034]: W/: (onTransmitIn in :61): rtp lost one packet ... mDebugCntRtpLost: 1579 > 1581
Aug 16 15:38:16 toybrick python3[93034]: W/: (onTransmitIn in :61): rtp lost one packet ... mDebugCntRtpLost: 1588 > 1593
Aug 16 15:38:16 toybrick python3[93034]: W/: (onTransmitIn in :61): rtp lost one packet ... mDebugCntRtpLost: 1593 > 1596
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: h264d_sei: seq_parameter_set_id 0 may be invalid
Aug 16 15:38:16 toybrick python3[93034]: W/: (onTransmitIn in :61): rtp lost one packet ... mDebugCntRtpLost: 1629 > 1632
Aug 16 15:38:16 toybrick python3[93034]: W/: (onTransmitIn in :61): rtp lost one packet ... mDebugCntRtpLost: 1632 > 1634
Aug 16 15:38:16 toybrick python3[93034]: W/: (onTransmitIn in :61): rtp lost one packet ... mDebugCntRtpLost: 1634 > 1645


作者: jefferyzhang    时间: 2022-8-17 08:56
丢包了,检查下自己网络状态,不行的话就用tcp
作者: MWM    时间: 2022-8-18 09:39
jefferyzhang 发表于 2022-8-17 08:56
丢包了,检查下自己网络状态,不行的话就用tcp

嗯嗯,查出来了。是流的问题。谢谢了。不过感觉最多能解码6路1080p的。多了就会卡顿。
作者: jefferyzhang    时间: 2022-8-18 10:45
MWM 发表于 2022-8-18 09:39
嗯嗯,查出来了。是流的问题。谢谢了。不过感觉最多能解码6路1080p的。多了就会卡顿。 ...

python的GIL锁了解下。python限制,没办法在单进程里多路。
你可以试试多进程
作者: MWM    时间: 2022-8-20 17:20
jefferyzhang 发表于 2022-8-18 10:45
python的GIL锁了解下。python限制,没办法在单进程里多路。
你可以试试多进程 ...

嗯嗯,好的。我这边试了用多进程去跑,公用全局的Display,但是显示不了。


日志有看到如下报错
Aug 20 09:18:40 toybrick python3[46211]: mpp_buffer: mpp_buffer_ref_dec found non-positive ref_count 0 caller try_proc_dec_task
Aug 20 09:18:40 toybrick python3[46211]: mpp_frame: pointer (nil) failed on mpp_frame_deinit check mpp_frame
Aug 20 09:18:40 toybrick python3[46211]: mpp_frame: mpp_frame_deinit invalid NULL pointer input
Aug 20 09:18:40 toybrick python3[46211]: mpp_buffer: mpp_buffer_ref_dec found non-positive ref_count 0 caller try_proc_dec_task
Aug 20 09:18:40 toybrick python3[46211]: mpp_frame: pointer (nil) failed on mpp_frame_deinit check mpp_frame
Aug 20 09:18:40 toybrick python3[46211]: mpp_frame: mpp_frame_deinit invalid NULL pointer input
Aug 20 09:18:40 toybrick python3[46211]: mpp_buffer: mpp_buffer_ref_dec found non-positive ref_count 0 caller try_proc_dec_task
Aug 20 09:18:40 toybrick python3[46211]: mpp_frame: pointer (nil) failed on mpp_frame_deinit check mpp_frame
Aug 20 09:18:40 toybrick python3[46211]: mpp_frame: mpp_frame_deinit invalid NULL pointer input
Aug 20 09:18:40 toybrick python3[46211]: mpp_buffer: mpp_buffer_ref_dec found non-positive ref_count 0 caller try_proc_dec_task
Aug 20 09:18:40 toybrick python3[46211]: mpp_frame: pointer (nil) failed on mpp_frame_deinit check mpp_frame
Aug 20 09:18:40 toybrick python3[46211]: mpp_frame: mpp_frame_deinit invalid NULL pointer input


作者: jefferyzhang    时间: 2022-8-22 08:35
MWM 发表于 2022-8-20 17:20
嗯嗯,好的。我这边试了用多进程去跑,公用全局的Display,但是显示不了。

显示肯定不能多进程公用
作者: MWM    时间: 2022-8-22 10:30
jefferyzhang 发表于 2022-8-22 08:35
显示肯定不能多进程公用

嗯嗯,感谢大佬。
大佬能给个思路吗?现在是多进程里面取到frame。如果不进多进程里面调用公用的显示,需要怎样显示多进程里面的帧。

作者: jefferyzhang    时间: 2022-8-22 10:43
MWM 发表于 2022-8-22 10:30
嗯嗯,感谢大佬。
大佬能给个思路吗?现在是多进程里面取到frame。如果不进多进程里面调用公用的显示,需 ...

目前没有办法,python底层不支持dma内存传递,只支持buffer拷贝传递,这样的话瓶颈就全部在内存拷贝上了,依然性能上不去。目前唯一能做的就是解除GIL锁,据说python3.12会解GIL锁,但是目前还没有任何办法解决这个。
作者: MWM    时间: 2022-8-22 11:03
jefferyzhang 发表于 2022-8-22 10:43
目前没有办法,python底层不支持dma内存传递,只支持buffer拷贝传递,这样的话瓶颈就全部在内存拷贝上了 ...

好的,谢谢大佬




欢迎光临 Toybrick (https://t.rock-chips.com/) Powered by Discuz! X3.3