Toybrick

楼主: hisping

RK3399Pro入门教程(7)RTSP库的使用

 

hhhjjjwww

中级会员

积分
231
发表于 2021-9-30 15:06:34 | 显示全部楼层
本帖最后由 hhhjjjwww 于 2021-9-30 15:20 编辑

while (run_flag) {
                DecFrame *frame = mpp_dec->ops->dequeue_timeout(mpp_dec, 300);
                std::cout<<"!!!!!!!!!!!!!!!"<<endl;
                if (frame != NULL) {
                        std::cout << "decode frame" << frame->width << "x" << frame->height << std::endl;
               
                        if (!first_frame) {
                                std::cout << "first_frame" << std::endl;
                                t_inference = std::thread(inference_thread, rga, frame->width, frame->height);
                                first_frame = 1;
                        }
frame 这里一直为空,是什么原因?用ffplay能够在板子上打开视频流

运行时打印的log:
mpp[9900]: mpp_info: mpp version: unknown mpp version for missing VCS info
mpp[9900]: mpp_rt: NOT found ion allocator
mpp[9900]: mpp_rt: found drm allocator
[2021/09/30 07:19:41] D/: listening rtp port 27731
[2021/09/30 07:19:41] D/: curlto rtsp://litinghong:Ax30hcDgx9@172 ... eaming/Channels/801 , cli 27721:27731, tcp: 0
[2021/09/30 07:19:41] D/: listening rtcp port 27732
[2021/09/30 07:19:41] D/: listening rtp port 27721
[2021/09/30 07:19:41] D/: listening rtcp port 27722
[2021/09/30 07:19:41] D/: # FOUND[0] media: video
[2021/09/30 07:19:41] D/: # FOUND[0] rtpmap: id:96 format:H264 bitrate:90000
[2021/09/30 07:19:41] D/: # FOUND[0] control: trackID=video
[2021/09/30 07:19:41] D/: # TOTAL FOUND  1
[2021/09/30 07:19:41] D/: TRACK [0] : trackID=video
[2021/09/30 07:19:41] D/: setup 27721 , 27722, uri: rtsp://litinghong:Ax30hcDgx9@172 ... s/801/trackID=video
[2021/09/30 07:19:41] D/: Video SSRC Changed! 0 -> 2090724292
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 65535 > 47330
[2021/09/30 07:19:41] D/: RTP4UP_UNIT_SE [0x55839a2e58] loss/recv:-606.87/ 0.03 SEI|SPS|PPS|NI|I: 0.00|0.00|0.00|0.03|0.00
frame recived 312
frame recived 28
frame recived 8
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47402 > 47404
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47404 > 47414
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47414 > 47419
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47419 > 47425
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47425 > 47432
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47432 > 47439
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47439 > 47446
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47446 > 47449
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47449 > 47456
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47456 > 47463
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47463 > 47470
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47470 > 47477
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47477 > 47482
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47482 > 47488
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47488 > 47494
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47494 > 47497
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47497 > 47504
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47504 > 47513
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47514 > 47516
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47516 > 47522
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47522 > 47529
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47529 > 47535
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47535 > 47538
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47538 > 47541
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47541 > 47545
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47547 > 47550
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47550 > 47554
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47554 > 47557
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47557 > 47559
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47559 > 47562
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47562 > 47566
[2021/09/30 07:19:41] W/: (onTransmitIn in unit_rtp_h264_unpack.cpp:53): rtp lost one packet ... mDebugCntRtpLost: 47566 > 47570
frame recived 216
frame recived 248
frame recived 296
mpp[9900]: mpp_log: decode_get_frame failed, return -8.
frame recived 296
frame recived 280
frame recived 264
frame recived 312
frame recived 296
frame recived 312
frame recived 344
frame recived 328
mpp[9900]: mpp_log: decode_get_frame failed, return -8.
frame recived 376
frame recived 344
frame recived 328
frame recived 312
frame recived 344
frame recived 328
frame recived 328
frame recived 376
mpp[9900]: mpp_log: decode_get_frame failed, return -8.
frame recived 328
frame recived 312
frame recived 280
frame recived 264
frame recived 280
frame recived 264
mpp[9900]: mpp_log: decode_get_frame failed, return -8.
frame recived 312
frame recived 264
frame recived 248
frame recived 248
frame recived 264
frame recived 312
frame recived 264
frame recived 296
mpp[9900]: mpp_log: decode_get_frame failed, return -8.
frame recived 328
frame recived 280
frame recived 312
frame recived 360
frame recived 312
frame recived 280
frame recived 296
frame recived 296
mpp[9900]: mpp_log: decode_get_frame failed, return -8.
frame recived 280
frame recived 328
frame recived 312
frame recived 312
frame recived 296
frame recived 312
frame recived 360
mpp[9900]: mpp_log: decode_get_frame failed, return -8.
frame recived 888
frame recived 456
frame recived 360
frame recived 376
frame recived 360
frame recived 328
frame recived 328
frame recived 296
mpp[9900]: mpp_log: decode_get_frame failed, return -8.
frame recived 360
frame recived 296
frame recived 360
frame recived 248

回复

使用道具 举报

Bbjmonsoon

新手上路

积分
18
发表于 2021-12-21 22:02:20 | 显示全部楼层
学习.............
回复

使用道具 举报

caizhoucun

新手上路

积分
31
发表于 2022-1-14 13:01:05 | 显示全部楼层
lian 发表于 2020-10-15 14:50
在RK1808M0上运行sudo ./rtsp_ssd时报错:
用vlc可以打开流地址,如何解决问题

你好,你这个怎么解决的,我也遇到这个问题
回复

使用道具 举报

mbs6176966

注册会员

积分
63
发表于 2022-1-14 15:38:50 | 显示全部楼层

一般不是网络的问题导致的,demo的RTSPClient兼容性很差,也不知道内部如何组包取帧的,打算自己写rstp组包的部分
回复

使用道具 举报

mbs6176966

注册会员

积分
63
发表于 2022-1-14 15:39:54 | 显示全部楼层
loveltyoic 发表于 2021-5-10 18:16
你好,遇到了同样的错误。
我后来换了一个流,可以正常解码。我怀疑是有些流解不了码 ...

是帧取不到导致的,看图还没走到解码部分
回复

使用道具 举报

hhhjjjwww

中级会员

积分
231
发表于 2022-1-18 15:37:39 | 显示全部楼层
有没有多路同时解码的案例?
回复

使用道具 举报

Google

注册会员

积分
86
发表于 2022-4-12 20:06:44 | 显示全部楼层
1808板子可用用这个库么?
回复

使用道具 举报

richard

新手上路

积分
18
发表于 2022-5-13 16:59:12 | 显示全部楼层
这个是解码流程,有没有用MppEncoderCreate这套接口编码的示例代码呢
回复

使用道具 举报

dragonfly007

新手上路

积分
18
发表于 2022-6-10 16:11:05 | 显示全部楼层
TB-RK3399pro debain10系统如何进行环境安装和系统软件包的安装呢?
回复

使用道具 举报

richard

新手上路

积分
18
发表于 2022-6-22 11:25:30 | 显示全部楼层
这论坛现在都没人管了吗
回复

使用道具 举报

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

本版积分规则

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


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