如何计算 UDP 输入比特率和输出比特率

如何计算 UDP 输入比特率和输出比特率

如何计算 UDP 比特率和信息(UDP 输入比特率和 UDP 输出比特率)

像 ffprobe

Input #0, mpegts, from 'udp://269.1.1.104:1001':
  Duration: N/A, start: 25881.121689, bitrate: N/A
  Program 40
    Metadata:
      service_name    : PUBLIC MUSIC
      service_provider: Harmonic
    Stream #0:0[0xfa1]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg, top first), 720x576 [SAR 12:11 DAR 15:11], 25 fps, 50 tbr, 90k tbn, 50 tbc
    Stream #0:1[0xfa2](eng): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 192 kb/s

但 ffprobe 并不总是有效......

那么还有其他解决方案、任何工具或任何命令吗......

谢谢

答案1

安装 TSDuck 工具包并使用此命令--debug

tsp --debug -I ip 269.1.1.104:1001 -O drop

-I = 输入 UPD ip

* Debug: ip: initial buffer load: 7 packets, 1,316 bytes
* ip: unknown initial input bitrate
* Debug: ip: input thread started
* Debug: drop: output thread started
* Debug: control commands: debug level set to 1
* Debug: control commands: found 0 packet processor plugins
* Debug: ip: input: got bitrate 2,976,965 b/s
* Debug: ip: input: got bitrate 3,041,196 b/s
* Debug: ip: input: got bitrate 3,101,650 b/s

答案2

安装此工具

sudo apt-get install lsof

并使用此命令,其中 1001 是端口

lsof -i :1001

相关内容