ffmpeg 从 rtp 流中丢弃数据包而不发出警告消息
我使用自定义 python 脚本创建 RTP 数据包并将其发送到 ffmpeg,然后将其转换为从 stdout 读取的 s16le 音频帧。为此我使用ffmpeg -i rtp://0.0.0.0:9000 -f s16le -ar 8000 -acodec pcm_s16le -ac 1 -loglevel 调试 -
在接收方。
收到的音频听起来不错,但报告的数据包数量有所不同。
我发现 UDP 可能会出现数据包丢失(尽管在同一台机器上进行流式传输时,每 2-5 次运行一个 50 秒的文件似乎很高),但是
- 没有警告或错误消息
- 当我故意跳过(丢弃)其中的数据包时, python 脚本,
- 当我还没有计算出数据包计时时,
- 我收到一条消息,当我切换两个数据包的序列号时,我收到消息(以便在之前发送
seq=1001
seq=1000
),我收到一条消息 - 顺序正确
- tcpdump 显示所有数据包,并且机器具有 48 个核心且相对空闲,且
我的问题是:为什么在没有错误的情况下会出现数据包丢失/警告/消息并且网络转储中没有可见问题?
I am using a custom python script to create and send RTP packets to ffmpeg, which then converts it into s16le audio frames that are read from stdout. For this I useffmpeg -i rtp://0.0.0.0:9000 -f s16le -ar 8000 -acodec pcm_s16le -ac 1 -loglevel debug -
on the receiving side.
The audio received sounds fine, but the number of packets reported varies.
I get that there might be packet loss with UDP (though every 2nd-5th run for a 50 second file while streaming on the same machine seems high), but
- there are no warning or error messages
- when I intentionally skip (drop) a packet in the python script, I get a message
- when I had not yet worked out the packet timing, I got messages
- when I switch the sequence number for two packets (so that
seq=1001
is sent beforeseq=1000
), I get a message - tcpdump shows all packets and in the correct order
- the machine has 48 cores and was relatively idle
My question is: Why do I have packet loss while there are no errors/warnings/messages and no issues visible in the network dump?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论