【已解决】【SDK】请看一下视频很卡,ring_buffer里面时间戳不是我给的.

IPC/NVR/可视门铃等具备多媒体能力的设备,扫地机/AGV等机器人设备


User avatar
fallen-queen
Posts: 140

麻烦将主码流的数据保存成文件,放在附件里面,我再分析一下。


Tags:
guoweicheng
Posts: 8

Re: 请看一下视频很卡,ring_buffer里面时间戳不是我给的.

请问 这个问题最后解决了吗?我好像遇到一样的问题 音频断断续续

User avatar
起个中文名
Posts: 152

Re: 请看一下视频很卡,ring_buffer里面时间戳不是我给的.

请提供一个trace级别的日志吧。

guoweicheng
Posts: 8

Re: 请看一下视频很卡,ring_buffer里面时间戳不是我给的.

起个中文名 2023年 Dec 13日 09:26

请提供一个trace级别的日志吧。

麻烦帮忙看看!音频写入到本地听了没有问题 。 代码里面调用了tuya_ipc_ring_buffer_append_data(a_handle, audio_frame.p_buf, audio_frame.size, audio_frame.type, audio_frame.pts)这个方法传给涂鸦 ;

Attachments
COM4_2023-12-13_16-06-00.log
(1.01 MiB) Downloaded 181 times
User avatar
起个中文名
Posts: 152

Re: 请看一下视频很卡,ring_buffer里面时间戳不是我给的.

日志里面,每秒仅append了几帧音频数据,每帧大小512,格式PCM 。我不太清楚你们的编码参数,假设是8K,16bit,那么每秒的数据量正常应该是16KB。但按照你们输入的音频量来算,是远远达不到16KB的。

日志里面搜索音频append的打印:
[12-13 16:06:00 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:106 timestamp:1702454760524
[12-13 16:06:00 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:107 timestamp:1702454760524
[12-13 16:06:00 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:108 timestamp:1702454760533
[12-13 16:06:01 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:109 timestamp:1702454760885

1702454760秒送了4帧

] [12-13 16:06:01 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:110 timestamp:1702454761230
] [12-13 16:06:01 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:111 timestamp:1702454761575
] [12-13 16:06:01 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:112 timestamp:1702454761576
] [12-13 16:06:01 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:113 timestamp:1702454761590
] [12-13 16:06:01 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:114 timestamp:1702454761923
] [12-13 16:06:02 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:115 timestamp:1702454761938

1702454761秒送了6帧

] [12-13 16:06:02 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:116 timestamp:1702454762268
] [12-13 16:06:02 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:117 timestamp:1702454762269
] [12-13 16:06:02 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:118 timestamp:1702454762269
] [12-13 16:06:02 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:119 timestamp:1702454762270
] [12-13 16:06:02 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:120 timestamp:1702454762314
] [12-13 16:06:02 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:121 timestamp:1702454762655
] [12-13 16:06:03 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:122 timestamp:1702454762668
] [12-13 16:06:03 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:123 timestamp:1702454763014
] [12-13 16:06:03 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:124 timestamp:1702454763353
] [12-13 16:06:03 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:125 timestamp:1702454763354
] [12-13 16:06:03 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:126 timestamp:1702454763354
] [12-13 16:06:03 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:127 timestamp:1702454763736
] [12-13 16:06:03 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:128 timestamp:1702454763737
] [12-13 16:06:04 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:129 timestamp:1702454763738
] [12-13 16:06:04 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:130 timestamp:1702454764099
] [12-13 16:06:04 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:131 timestamp:1702454764100
] [12-13 16:06:04 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:132 timestamp:1702454764100
] [12-13 16:06:04 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:133 timestamp:1702454764110
] [12-13 16:06:04 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:134 timestamp:1702454764155
] [12-13 16:06:04 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:135 timestamp:1702454764509
] [12-13 16:06:04 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:136 timestamp:1702454764510
] [12-13 16:06:04 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:137 timestamp:1702454764847
] [12-13 16:06:04 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:138 timestamp:1702454764861
] [12-13 16:06:04 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:139 timestamp:1702454764861
] [12-13 16:06:05 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:140 timestamp:1702454765191
] [12-13 16:06:05 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:141 timestamp:1702454765192
] [12-13 16:06:05 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:142 timestamp:1702454765193
] [12-13 16:06:05 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:143 timestamp:1702454765557
] [12-13 16:06:05 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:144 timestamp:1702454765557
] [12-13 16:06:05 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:145 timestamp:1702454765558
] [12-13 16:06:05 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:146 timestamp:1702454765558

guoweicheng
Posts: 8

Re: 请看一下视频很卡,ring_buffer里面时间戳不是我给的.

没配上网之前 我看了下日志
timestamp:288054 第288秒append done, ch0st0tr0 node index:194 timestamp:288054 一共发送了20帧。这能否说明编码没有问题?

Attachments
日志.txt
(10.92 KiB) Downloaded 153 times
User avatar
起个中文名
Posts: 152

Re: 请看一下视频很卡,ring_buffer里面时间戳不是我给的.

这是高清的视频流。而且这个接口是外部调用的,跟配网或者不配网没有关系。如果配网后帧率下降了,可以看下系统是不是资源满了,调度慢了。

guoweicheng
Posts: 8

Re: 请看一下视频很卡,ring_buffer里面时间戳不是我给的.

起个中文名 2023年 Dec 14日 12:00

这是高清的视频流。而且这个接口是外部调用的,跟配网或者不配网没有关系。如果配网后帧率下降了,可以看下系统是不是资源满了,调度慢了。

这个frame里面的pts 设置应该没什么用吧。 配网 测了下音频的传输,结果发现 这个音频append done 有多有少 有时候一秒18帧有时候一秒14帧 。 cpu负载跟之前做的产品差不多,现在该从哪方面排查问题呢?
音频编码参数为
Note: The internal P2P preview, cloud storage, and local storage of the SDK are all use E_IPC_STREAM_AUDIO_MAIN data. /
ipc_sdk_run_var.media_info.media_info.channel_enable[E_IPC_STREAM_AUDIO_MAIN] = TRUE; /
Whether to enable local sound collection /
ipc_sdk_run_var.media_info.media_info.audio_codec[E_IPC_STREAM_AUDIO_MAIN] = TUYA_CODEC_AUDIO_PCM;/
Encoding format /
ipc_sdk_run_var.media_info.media_info.audio_sample [E_IPC_STREAM_AUDIO_MAIN]= TUYA_AUDIO_SAMPLE_8K;/
Sampling Rate /
ipc_sdk_run_var.media_info.media_info.audio_databits [E_IPC_STREAM_AUDIO_MAIN]= TUYA_AUDIO_DATABITS_16;/
Bit width /
ipc_sdk_run_var.media_info.media_info.audio_channel[E_IPC_STREAM_AUDIO_MAIN]= TUYA_AUDIO_CHANNEL_MONO;/
channel /
ipc_sdk_run_var.media_info.media_info.audio_fps[E_IPC_STREAM_AUDIO_MAIN] = 25;/
Fragments per second */
部分日志如下,详情见附件。
行 878: [2023-12-14 11:54:04] [12-14 11:54:04 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:1 timestamp:1702526044126
行 899: [2023-12-14 11:54:04] [12-14 11:54:04 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:2 timestamp:1702526044170
行 904: [2023-12-14 11:54:04] [12-14 11:54:04 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:3 timestamp:1702526044509
行 909: [2023-12-14 11:54:04] [12-14 11:54:04 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:4 timestamp:1702526044509
行 914: [2023-12-14 11:54:04] [12-14 11:54:04 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:5 timestamp:1702526044510
行 919: [2023-12-14 11:54:04] [12-14 11:54:04 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:6 timestamp:1702526044511
行 924: [2023-12-14 11:54:04] [12-14 11:54:04 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:7 timestamp:1702526044511
行 929: [2023-12-14 11:54:04] [12-14 11:54:04 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:8 timestamp:1702526044512
行 990: [2023-12-14 11:54:05] [12-14 11:54:05 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:9 timestamp:1702526044859
行 995: [2023-12-14 11:54:05] [12-14 11:54:05 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:10 timestamp:1702526045258
行 1000: [2023-12-14 11:54:05] [12-14 11:54:05 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:11 timestamp:1702526045260
行 1005: [2023-12-14 11:54:05] [12-14 11:54:05 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:12 timestamp:1702526045261
行 1010: [2023-12-14 11:54:05] [12-14 11:54:05 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:13 timestamp:1702526045261
行 1015: [2023-12-14 11:54:05] [12-14 11:54:05 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:14 timestamp:1702526045593
行 1020: [2023-12-14 11:54:05] [12-14 11:54:05 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:15 timestamp:1702526045594
行 1025: [2023-12-14 11:54:05] [12-14 11:54:05 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:16 timestamp:1702526045595
行 1030: [2023-12-14 11:54:05] [12-14 11:54:05 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:17 timestamp:1702526045596
行 1035: [2023-12-14 11:54:05] [12-14 11:54:05 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:18 timestamp:1702526045596
行 1040: [2023-12-14 11:54:05] [12-14 11:54:05 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:19 timestamp:1702526045597
行 1045: [2023-12-14 11:54:05] [12-14 11:54:05 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:20 timestamp:1702526045598
行 1050: [2023-12-14 11:54:05] [12-14 11:54:05 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:21 timestamp:1702526045598
行 1055: [2023-12-14 11:54:05] [12-14 11:54:05 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:22 timestamp:1702526045599
行 1076: [2023-12-14 11:54:05] [12-14 11:54:05 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:23 timestamp:1702526045942
行 1099: [2023-12-14 11:54:06] [12-14 11:54:05 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:24 timestamp:1702526045948
行 1104: [2023-12-14 11:54:06] [12-14 11:54:05 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:25 timestamp:1702526045949
行 1109: [2023-12-14 11:54:06] [12-14 11:54:05 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:26 timestamp:1702526045950
行 1127: [2023-12-14 11:54:06] [12-14 11:54:06 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:27 timestamp:1702526045951
行 1132: [2023-12-14 11:54:06] [12-14 11:54:06 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:28 timestamp:1702526046301
行 1137: [2023-12-14 11:54:06] [12-14 11:54:06 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:29 timestamp:1702526046302
行 1151: [2023-12-14 11:54:06] [12-14 11:54:06 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:30 timestamp:1702526046302
行 1156: [2023-12-14 11:54:06] [12-14 11:54:06 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:31 timestamp:1702526046307
行 1161: [2023-12-14 11:54:06] [12-14 11:54:06 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:32 timestamp:1702526046308
行 1166: [2023-12-14 11:54:06] [12-14 11:54:06 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:33 timestamp:1702526046309
行 1171: [2023-12-14 11:54:06] [12-14 11:54:06 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:34 timestamp:1702526046309
行 1197: [2023-12-14 11:54:06] [12-14 11:54:06 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:35 timestamp:1702526046667
行 1202: [2023-12-14 11:54:06] [12-14 11:54:06 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:36 timestamp:1702526046672
行 1207: [2023-12-14 11:54:06] [12-14 11:54:06 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:37 timestamp:1702526046676
行 1212: [2023-12-14 11:54:06] [12-14 11:54:06 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:38 timestamp:1702526046676
行 1217: [2023-12-14 11:54:06] [12-14 11:54:06 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:39 timestamp:1702526046678
行 1222: [2023-12-14 11:54:06] [12-14 11:54:06 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:40 timestamp:1702526046678
行 1229: [2023-12-14 11:54:07] [12-14 11:54:06 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:41 timestamp:1702526046679
行 1252: [2023-12-14 11:54:07] [12-14 11:54:07 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:42 timestamp:1702526047055
行 1257: [2023-12-14 11:54:07] [12-14 11:54:07 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:43 timestamp:1702526047059
行 1262: [2023-12-14 11:54:07] [12-14 11:54:07 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:44 timestamp:1702526047060
行 1267: [2023-12-14 11:54:07] [12-14 11:54:07 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:45 timestamp:1702526047060
行 1272: [2023-12-14 11:54:07] [12-14 11:54:07 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:46 timestamp:1702526047061
行 1277: [2023-12-14 11:54:07] [12-14 11:54:07 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:47 timestamp:1702526047062
行 1286: [2023-12-14 11:54:07] [12-14 11:54:07 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:48 timestamp:1702526047062
行 1291: [2023-12-14 11:54:07] [12-14 11:54:07 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:49 timestamp:1702526047403
行 1338: [2023-12-14 11:54:07] [12-14 11:54:07 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:50 timestamp:1702526047404
行 1401: [2023-12-14 11:54:08] [12-14 11:54:07 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:51 timestamp:1702526047419
行 1408: [2023-12-14 11:54:08] [12-14 11:54:08 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:52 timestamp:1702526047786
行 1413: [2023-12-14 11:54:08] [12-14 11:54:08 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:53 timestamp:1702526048127
行 1439: [2023-12-14 11:54:08] [12-14 11:54:08 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:54 timestamp:1702526048136
行 1444: [2023-12-14 11:54:08] [12-14 11:54:08 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:55 timestamp:1702526048137
行 1449: [2023-12-14 11:54:08] [12-14 11:54:08 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:56 timestamp:1702526048151
行 1454: [2023-12-14 11:54:08] [12-14 11:54:08 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:57 timestamp:1702526048153
行 1489: [2023-12-14 11:54:08] [12-14 11:54:08 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:58 timestamp:1702526048528
行 1494: [2023-12-14 11:54:08] [12-14 11:54:08 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:59 timestamp:1702526048531
行 1499: [2023-12-14 11:54:08] [12-14 11:54:08 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:60 timestamp:1702526048532
行 1504: [2023-12-14 11:54:08] [12-14 11:54:08 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:61 timestamp:1702526048534
行 1509: [2023-12-14 11:54:08] [12-14 11:54:08 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:62 timestamp:1702526048535
行 1523: [2023-12-14 11:54:08] [12-14 11:54:08 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:63 timestamp:1702526048871
行 1528: [2023-12-14 11:54:08] [12-14 11:54:08 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:64 timestamp:1702526048875
行 1533: [2023-12-14 11:54:09] [12-14 11:54:08 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:65 timestamp:1702526048875
行 1538: [2023-12-14 11:54:09] [12-14 11:54:08 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:66 timestamp:1702526048876
行 1543: [2023-12-14 11:54:09] [12-14 11:54:08 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:67 timestamp:1702526048881
行 1548: [2023-12-14 11:54:09] [12-14 11:54:08 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:68 timestamp:1702526048882
行 1553: [2023-12-14 11:54:09] [12-14 11:54:08 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:69 timestamp:1702526048882
行 1558: [2023-12-14 11:54:09] [12-14 11:54:08 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:70 timestamp:1702526048916
行 1563: [2023-12-14 11:54:09] [12-14 11:54:08 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:71 timestamp:1702526048917
行 1568: [2023-12-14 11:54:09] [12-14 11:54:09 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:72 timestamp:1702526049250
行 1573: [2023-12-14 11:54:09] [12-14 11:54:09 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:73 timestamp:1702526049251
行 1578: [2023-12-14 11:54:09] [12-14 11:54:09 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:74 timestamp:1702526049252
行 1617: [2023-12-14 11:54:09] [12-14 11:54:09 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:75 timestamp:1702526049267
行 1622: [2023-12-14 11:54:09] [12-14 11:54:09 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:76 timestamp:1702526049601
行 1627: [2023-12-14 11:54:09] [12-14 11:54:09 TUYA T][tuya_ring_buffer.c:913] append done, ch0st0tr9 node index:77 timestamp:1702526049602

Attachments
COM4_2023-12-14_11-53-58.log
(5.45 MiB) Downloaded 175 times
guoweicheng
Posts: 8

Re: 请看一下视频很卡,ring_buffer里面时间戳不是我给的.

起个中文名 2023年 Dec 14日 12:00

这是高清的视频流。而且这个接口是外部调用的,跟配网或者不配网没有关系。如果配网后帧率下降了,可以看下系统是不是资源满了,调度慢了。

还有就是日志打印等级提高,视频和音频的画面都比之前卡了很多。

User avatar
起个中文名
Posts: 152

Re: 请看一下视频很卡,ring_buffer里面时间戳不是我给的.

正常来说,append的操作应该在你们编码的线程,例如:

void codec_task(){
while(run) {
read_from_hardware
append_to_tuya
sleep_if_you_need
}
}

所以如果你们每秒append的数量不均匀,就关注这个线程是不是调度不及时。

如果你们现在开trace级别日志会明显变卡,那你可以看看把日志调整到error级别,是不是就不卡了。

Post Reply