RTC事件日志

RTC event log

RTC事件日志

Overview

概述

RTC event logs can be enabled to capture in-depth inpformation about sent and received packets and the internal state of some WebRTC components. The logs are useful to understand network behavior and to debug issues around connectivity, bandwidth estimation and audio jitter buffers.

可以启用RTC事件日志来捕获有关发送和接收的数据包以及某些WebRTC组件的内部状态的深入信息。这些日志有助于了解网络行为,并调试连接、带宽估计和音频抖动缓冲区方面的问题。

The contents include:

内容包括:

  • Sent and received RTP headers
  • 发送和接收RTP标头
  • Full RTCP feedback
  • 完整的RTCP反馈
  • ICE candidates, pings and responses
  • ICE候选、ping和响应
  • Bandwidth estimator events, including loss-based estimate, delay-based estimate, probe results and ALR state
  • 带宽估计器事件,包括基于损耗的估计、基于延迟的估计、探测结果和ALR状态
  • Audio network adaptation settings
  • 音频网络自适应设置
  • Audio playout events
  • 音频播放事件

Binary wire format

二进制线格式

No guarantees are made on the wire format, and the format may change without prior notice. To maintain compatibility with past and future formats, analysis tools should be built on top of the provided rtc_event_log_parser.h

​线格式不作任何保证,并且格式可能会更改,恕不另行通知。为了保持与过去和未来格式的兼容性,应该在提供的rtc_event_log_parser.h之上构建分析工具

In particular, an analysis tool should not read the log as a protobuf.

特别是,分析工具不应该将日志作为protobuf读取。

Visualization

可视化

Since the logs contain a substantial amount of data, it is usually convenient to get an overview by visualizing them as a set of plots. Use the command:

由于日志包含大量数据,因此通常可以通过将它们可视化为一组绘图来方便地获得概述。使用命令:

out/Default/event_log_visualizer /path/to/log_file | python

This visualization requires matplotlib to be installed. The tool is capable of producing a substantial number of plots, of which only a handful are generated by default. You can select which plots are generated though the --plot= command line argument. For example, the command

此可视化需要安装matplotlib。该工具能够生成大量的绘图,默认情况下只生成少数绘图。您可以通过--plot=命令行参数选择生成哪些绘图。例如,命令

out/Default/event_log_visualizer \
  --plot=incoming_packet_sizes,incoming_stream_bitrate \
  /path/to/log_file | python

plots the sizes of incoming packets and the bitrate per incoming stream.

绘制传入分组的大小和每个传入流的比特率。

You can get a full list of options for the --plot argument through

可以通过获得--plot参数的完整选项列表

out/Default/event_log_visualizer --list_plots /path/to/log_file

You can also synchronize the x-axis between all plots (so zooming or panning in one plot affects all of them), by adding the command line argument --shared_xaxis.

还可以通过添加命令行参数--shared_xaxis来同步所有绘图之间的x轴(因此在一个绘图中缩放或平移会影响所有绘图)。

Viewing the raw log contents as text

以文本形式查看原始日志内容

If you know which format version the log file uses, you can view the raw contents as text. For version 1, you can use the command

如果知道日志文件使用的格式版本,则可以将原始内容作为文本进行查看。对于版本1,可以使用以下命令

out/Default/protoc --decode webrtc.rtclog.EventStream \
  ./logging/rtc_event_log/rtc_event_log.proto < /path/to/log_file

Similarly, you can use

同样,可以使用

out/Default/protoc --decode webrtc.rtclog2.EventStream \
  ./logging/rtc_event_log/rtc_event_log2.proto < /path/to/log_file

for logs that use version 2. However, note that not all of the contents will be human readable. Some fields are based on the raw RTP format or may be encoded as deltas relative to previous fields. Such fields will be printed as a list of bytes.

对于使用版本2的日志。然而,请注意,并不是所有的内容都是人类可读的。一些字段基于原始RTP格式,或者可以被编码为相对于先前字段的delta。这些字段将打印为字节列表。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值