Coder Social home page Coder Social logo

RTP Packet Lost about mediamtx HOT 11 CLOSED

wolverin-a avatar wolverin-a commented on June 11, 2024
RTP Packet Lost

from mediamtx.

Comments (11)

wolverin-a avatar wolverin-a commented on June 11, 2024
# ./rtsp-simple-server --version
v1.6.0

# netstat -anp | grep rtsp-simple | grep ESTABLISHED | wc -l
30

$ sudo journalctl -u rtsp-simple-server -f | grep "write queue is full"
апр 11 15:16:52 dev rtsp-simple-server[17143]: 2024/04/11 15:16:52 WAR [RTSP] [session 1d5f158d] write queue is full
апр 11 15:16:52 dev rtsp-simple-server[17143]: 2024/04/11 15:16:52 WAR [RTSP] [session bb8c9710] write queue is full
апр 11 15:16:53 dev rtsp-simple-server[17143]: 2024/04/11 15:16:53 WAR [RTSP] [session 1d5f158d] write queue is full
апр 11 15:16:53 dev rtsp-simple-server[17143]: 2024/04/11 15:16:53 WAR [RTSP] [session bb8c9710] write queue is full
апр 11 15:16:54 dev rtsp-simple-server[17143]: 2024/04/11 15:16:54 WAR [RTSP] [session 1d5f158d] write queue is full
апр 11 15:16:54 dev rtsp-simple-server[17143]: 2024/04/11 15:16:54 WAR [RTSP] [session bb8c9710] write queue is full
апр 11 15:16:55 dev rtsp-simple-server[17143]: 2024/04/11 15:16:55 WAR [RTSP] [session bb8c9710] write queue is full
апр 11 15:16:55 dev rtsp-simple-server[17143]: 2024/04/11 15:16:55 WAR [RTSP] [session 1d5f158d] write queue is full
апр 11 15:16:56 dev rtsp-simple-server[17143]: 2024/04/11 15:16:56 WAR [RTSP] [session bb8c9710] write queue is full
апр 11 15:16:57 dev rtsp-simple-server[17143]: 2024/04/11 15:16:57 WAR [RTSP] [session 1d5f158d] write queue is full
апр 11 15:16:57 dev rtsp-simple-server[17143]: 2024/04/11 15:16:57 WAR [RTSP] [session bb8c9710] write queue is full
апр 11 15:16:58 dev rtsp-simple-server[17143]: 2024/04/11 15:16:58 WAR [RTSP] [session 1d5f158d] write queue is full
апр 11 15:16:58 dev rtsp-simple-server[17143]: 2024/04/11 15:16:58 WAR [RTSP] [session bb8c9710] write queue is full
апр 11 15:16:59 dev rtsp-simple-server[17143]: 2024/04/11 15:16:59 WAR [RTSP] [session 1d5f158d] write queue is full
апр 11 15:16:59 dev rtsp-simple-server[17143]: 2024/04/11 15:16:59 WAR [RTSP] [session bb8c9710] write queue is full
апр 11 15:17:00 dev rtsp-simple-server[17143]: 2024/04/11 15:17:00 WAR [RTSP] [session 1d5f158d] write queue is full
апр 11 15:17:00 dev rtsp-simple-server[17143]: 2024/04/11 15:17:00 WAR [RTSP] [session bb8c9710] write queue is full
апр 11 15:17:01 dev rtsp-simple-server[17143]: 2024/04/11 15:17:01 WAR [RTSP] [session 1d5f158d] write queue is full
апр 11 15:17:01 dev rtsp-simple-server[17143]: 2024/04/11 15:17:01 WAR [RTSP] [session bb8c9710] write queue is full
апр 11 15:17:02 dev rtsp-simple-server[17143]: 2024/04/11 15:17:02 WAR [RTSP] [session 1d5f158d] write queue is full
апр 11 15:17:03 dev rtsp-simple-server[17143]: 2024/04/11 15:17:03 WAR [RTSP] [session bb8c9710] write queue is full
апр 11 15:17:03 dev rtsp-simple-server[17143]: 2024/04/11 15:17:03 WAR [RTSP] [session 1d5f158d] write queue is full
апр 11 15:17:04 dev rtsp-simple-server[17143]: 2024/04/11 15:17:04 WAR [RTSP] [session bb8c9710] write queue is full
апр 11 15:17:04 dev rtsp-simple-server[17143]: 2024/04/11 15:17:04 WAR [RTSP] [session 1d5f158d] write queue is full
апр 11 15:17:05 dev rtsp-simple-server[17143]: 2024/04/11 15:17:05 WAR [RTSP] [session bb8c9710] write queue is full
апр 11 15:17:05 dev rtsp-simple-server[17143]: 2024/04/11 15:17:05 WAR [RTSP] [session 1d5f158d] write queue is full
апр 11 15:17:06 dev rtsp-simple-server[17143]: 2024/04/11 15:17:06 WAR [RTSP] [session bb8c9710] write queue is full

from mediamtx.

wolverin-a avatar wolverin-a commented on June 11, 2024

aler9

You wrote earlier
If CPU and RAM are low, it means that any bottleneck is in the network and not in the application indeed.

But this is not the case, I watch videos from different cameras and different providers in the same place, where it shows well, where it shows poorly, if you watch the video directly from the camera without mediamtx, there is almost no loss in VLC

if I look at the traffic in iptraf-ng, for example, the incoming traffic will be about 200 mbit/s, while the outgoing traffic is only 100

No matter how many streams there are and where to look from, I can't get outgoing traffic from mediamtx over 120 Mbps
I even publish on mediamtx and from the same place I look in vlc and see losses

from mediamtx.

wolverin-a avatar wolverin-a commented on June 11, 2024

I got a similar problem using ffmpeg libraries when I was publishing to myself and couldn't achieve high speed.

from mediamtx.

wolverin-a avatar wolverin-a commented on June 11, 2024

updated to version 1.8.0, but the problem remains

from mediamtx.

pankajsaini1987 avatar pankajsaini1987 commented on June 11, 2024

i am also facing the similar issue in some cameras. any solution?

from mediamtx.

aler9 avatar aler9 commented on June 11, 2024

Hello, the informations you provided lead to the same answer that was given many times, that is that your hardware, that includes CPU, RAM, motherboard I/O and network throughput between the server and the camera, is unable to receive or send in real time your specific amount of data.

If you want to solve the issue, you have to identify where the bottleneck lies, by monitoring all possible indicators until you find the one that is saturated. Linux has a huge amount of indicators, including /proc/net/tcp, and also a lot of network parameters that can be tuned externally from the server. If you find that there's some kind of limitation inside the server, and you can provide details about it, then feel free to open another issue.

from mediamtx.

wolverin-a avatar wolverin-a commented on June 11, 2024

@aler9
Can you tell me how to help you find a problem in your mediamtx? Because the problem is precisely in it, incoming traffic is more than 200 mbit/s, while the mediamtx gives 2 times less and loses packets somewhere.

I repeat once again - there is no problem between the camera and for example vlc, it is between the mediamtx and vlc

A lot of parameters have already been configured by me, for example, scp from the server gives me 300 mbit/s and only mediamtx cannot give the normal speed.

from mediamtx.

wolverin-a avatar wolverin-a commented on June 11, 2024

If you want to solve the issue, you have to identify where the bottleneck lies, by monitoring all possible indicators until you find the one that is saturated. Linux has a huge amount of indicators, including [/proc/net/tcp]

cat /proc/net/tcp
  sl  local_address rem_address   st tx_queue rx_queue tr tm->when retrnsmt   uid  timeout inode
   0: 0100007F:0019 00000000:0000 0A 00000000:00000000 00:00000000 00000000     0        0 21981 1 0000000047af9b79 100 0 0 10 20
   1: 00000000:280A 00000000:0000 0A 00000000:00000000 00:00000000 00000000     0        0 8983109 1 000000004d754855 100 0 0 10 0
   2: 0100007F:0CEA 00000000:0000 0A 00000000:00000000 00:00000000 00000000   106        0 21520 1 00000000a6464b5c 100 0 0 10 0
   3: 00000000:280B 00000000:0000 0A 00000000:00000000 00:00000000 00000000     0        0 8983110 1 000000004ef99328 100 0 0 10 0
   4: 0100007F:13AE 00000000:0000 0A 00000000:00000000 00:00000000 00000000   111        0 18831504 1 00000000e3413727 100 0 0 10 0
   5: 00000000:286E 00000000:0000 0A 00000000:00000000 00:00000000 00000000     0        0 8983107 1 000000002e59b09a 100 0 0 10 0
   6: 00000000:280F 00000000:0000 0A 00000000:00000000 00:00000000 00000000     0        0 8983108 1 000000008ac28112 100 0 0 10 0
   7: 00000000:006F 00000000:0000 0A 00000000:00000000 00:00000000 00000000     0        0 13556 1 00000000008c0bcb 100 0 0 10 0
   8: 00000000:1F90 00000000:0000 0A 00000000:00000000 00:00000000 00000000     0        0 8983111 1 0000000037e48d60 100 0 0 10 0
   9: 00000000:0050 00000000:0000 0A 00000000:00000000 00:00000000 00000000     0        0 8983106 1 000000001885dada 100 0 0 10 0
  10: 0100007F:2651 00000000:0000 0A 00000000:00000000 00:00000000 00000000     0        0 25155112 1 0000000094091943 100 0 0 10 0
  11: 00000000:7DF4 00000000:0000 0A 00000000:00000000 00:00000000 00000000   111        0 18831512 1 000000009057f590 100 0 0 10 0
  12: 00000000:0016 00000000:0000 0A 00000000:00000000 00:00000000 00000000     0        0 831490 1 000000009a3b7650 100 0 0 10 0
  13: 00000000:1F98 00000000:0000 0A 00000000:00000000 00:00000000 00000000   111        0 18831503 1 000000000fb5c601 100 0 0 10 0
  14: 4C3AF957:006F 3567DF4D:C346 01 00000000:00000000 00:00000000 00000000   109        0 4793397 1 00000000d6ffd21e 22 0 0 10 -1
  15: 0100870A:A8C6 44FC870A:022A 01 00000000:00000000 02:000001C8 00000000     0        0 38189019 2 00000000e47f05ac 24 4 30 10 -1
  16: 0100870A:ECB6 54F7870A:022A 01 00000000:00000000 02:0000017B 00000000     0        0 38193633 2 000000004f967853 23 4 30 10 -1
  17: 4C3AF957:006F 459EC0D4:E9A5 01 00000000:00000000 00:00000000 00000000   109        0 14523620 1 00000000c1cd4e3e 22 0 0 10 -1
  18: 4C3AF957:280B F6E7525F:A646 06 00000000:00000000 03:000003CA 00000000     0        0 0 3 000000008292f42c
  19: 0100870A:D224 8DFA870A:022A 01 00000000:00000000 02:0000040D 00000000     0        0 38195400 2 0000000017b5f984 23 4 30 10 -1
  20: 4C3AF957:006F E7589BC0:DF44 01 00000000:00000000 00:00000000 00000000   109        0 321315 1 0000000083a418e9 44 4 30 10 -1
  21: 4C3AF957:006F 499EC0D4:B22D 01 00000000:00000000 00:00000000 00000000   109        0 15103547 1 0000000085d06531 22 0 0 10 -1
  22: 0100870A:938E 03FA870A:022A 01 00000000:00000000 02:00000195 00000000     0        0 38182358 2 0000000064c2d43a 24 4 30 10 -1
  23: 4C3AF957:006F 479EC0D4:9BBF 01 00000000:00000000 00:00000000 00000000   109        0 14405377 1 00000000e4aa314c 22 0 0 10 -1
  24: 0100870A:DDD4 F9FD870A:022A 01 00000000:00000000 02:000003FB 00000000     0        0 38192688 2 000000001c177c19 24 4 30 10 -1
  25: 4C3AF957:006F 3567DF4D:C348 01 00000000:00000000 00:00000000 00000000   109        0 4793396 1 000000007a94419b 22 0 0 10 -1
  26: 4C3AF957:006F 086D212D:B2BC 01 00000000:00000000 00:00000000 00000000   109        0 33826637 1 000000002516cb4c 58 4 30 10 -1
  27: 4C3AF957:280B F6E7525F:A648 06 00000000:00000000 03:000005E7 00000000     0        0 0 3 00000000cfb14343
  28: 0100870A:C052 4EFD870A:022A 01 00000000:00000000 02:0000010B 00000000     0        0 38188861 2 00000000b8fd9e11 24 4 30 10 -1
  29: 0100870A:9598 35FC870A:022A 01 00000000:00000000 02:00000248 00000000     0        0 38186198 2 00000000dfc0db9e 25 4 30 10 -1
  30: 4C3AF957:006F 3567DF4D:E017 01 00000000:00000000 00:00000000 00000000   109        0 380611 1 00000000ad523181 22 0 0 10 -1
  31: 0100870A:A1FE 35F6870A:022A 01 00000000:00000000 02:000002AF 00000000     0        0 38187414 2 000000007852b46a 23 4 30 10 -1
  32: 4C3AF957:006F 7A44D0B0:C184 01 00000000:00000000 00:00000000 00000000   109        0 15257655 1 00000000d06a55ac 42 0 0 10 -1
  33: 0100870A:E8EC 88F9870A:022A 01 00000000:00000000 02:00000060 00000000     0        0 38190165 2 00000000944a6540 24 4 30 10 -1
  34: 4C3AF957:006F 4A9EC0D4:986D 01 00000000:00000000 00:00000000 00000000   109        0 14548241 1 00000000f11c0739 22 0 0 10 -1
  35: 4C3AF957:006F E7589BC0:DF47 01 00000000:00000000 00:00000000 00000000   109        0 321319 1 000000000ad14568 42 4 30 10 -1
  36: 4C3AF957:280A F6E7525F:A1C8 06 00000000:00000000 03:000003A7 00000000     0        0 0 3 00000000a8088d7f
  37: 4C3AF957:006F 3567DF4D:D513 01 00000000:00000000 00:00000000 00000000   109        0 364516 1 00000000cacb76ad 22 0 0 10 -1
  38: 0100870A:85F6 28FA870A:022A 01 00000000:00000000 02:0000025E 00000000     0        0 38187535 2 0000000065502fef 26 4 30 10 -1
  39: 4C3AF957:006F 489EC0D4:B826 01 00000000:00000000 00:00000000 00000000   109        0 16668715 1 00000000f120a542 23 0 0 10 -1
  40: 4C3AF957:0016 06D7F957:C76C 01 000012E0:00000000 01:0000001A 00000000     0        0 10989914 4 000000008bae560d 48 4 29 9 7
  41: 4C3AF957:006F 086D212D:B2B6 01 00000000:00000000 00:00000000 00000000   109        0 33821658 1 000000006143438a 74 4 30 10 -1
  42: 0100870A:BD48 29FB870A:022A 06 00000000:00000000 03:00000613 00000000     0        0 0 3 0000000051241899
  43: 0100870A:E6CC 86F9870A:022A 01 00000000:00000000 02:00000527 00000000     0        0 38186984 2 000000005f170a32 26 4 30 10 -1
  44: 0100870A:E462 E0F8870A:022A 01 00000000:00000000 02:000004FC 00000000     0        0 38194182 2 000000003e158930 23 4 30 10 -1
  45: 4C3AF957:006F 3245AF55:8C31 01 00000000:00000000 00:00000000 00000000   109        0 14360573 1 0000000064fa0e40 24 0 0 10 -1
  46: 4C3AF957:006F 3567DF4D:98C4 01 00000000:00000000 00:00000000 00000000   109        0 13061049 1 000000000688ca7c 22 0 0 10 -1
  47: 4C3AF957:006F 469EC0D4:C94E 01 00000000:00000000 00:00000000 00000000   109        0 18071464 1 000000007cac9947 22 0 0 10 -1
  48: 4C3AF957:006F 469EC0D4:C950 01 00000000:00000000 00:00000000 00000000   109        0 18067296 1 0000000046968467 21 0 0 10 -1
  49: 4C3AF957:006F 489EC0D4:9BE5 01 00000000:00000000 00:00000000 00000000   109        0 35447380 1 000000006742d16b 22 0 0 10 -1
  50: 4C3AF957:006F ED18EBC6:CA43 01 00000000:00000000 00:00000000 00000000   109        0 35086218 1 0000000037b066ad 196 0 0 10 -1
  51: 4C3AF957:006F 7243D0B0:DC80 01 00000000:00000000 00:00000000 00000000   109        0 15198505 1 0000000096170087 52 0 0 10 -1
  52: 4C3AF957:006F 3567DF4D:E015 01 00000000:00000000 00:00000000 00000000   109        0 380612 1 00000000ca55d5bb 22 0 0 10 -1
  53: 4C3AF957:006F 3245AF55:8C30 01 00000000:00000000 00:00000000 00000000   109        0 14360576 1 00000000da2422a3 24 0 0 10 -1
  54: 4C3AF957:006F 4C9EC0D4:C640 01 00000000:00000000 00:00000000 00000000   109        0 18028279 1 00000000fcf7f23c 22 0 0 10 -1
  55: 4C3AF957:280B F6E7525F:A644 06 00000000:00000000 03:000003C1 00000000     0        0 0 3 00000000109eab74
  56: 4C3AF957:0016 06D7F957:CF10 01 00000000:00000000 02:00051398 00000000     0        0 29690887 2 00000000ee5080be 24 4 28 10 30
  57: 0100870A:A2EE 5FFB870A:022A 01 00000000:00000000 02:00000054 00000000     0        0 38174553 2 00000000f5453004 23 4 30 2 7
  58: 4C3AF957:006F 459EC0D4:E9A3 01 00000000:00000000 00:00000000 00000000   109        0 14523621 1 0000000071b100f7 22 0 0 10 -1
  59: 0100870A:D212 ECFE870A:022A 01 00000000:00000000 02:00000195 00000000     0        1 38190695 2 00000000924aea4c 24 4 30 10 -1
  60: 0100870A:DC12 94FC870A:022A 01 00000000:00000000 02:0000002E 00000000     0        0 38163830 2 000000003b58f934 24 4 30 10 -1
  61: 4C3AF957:006F ACA84F2D:EB80 01 00000000:00000000 00:00000000 00000000   109        0 14738165 1 0000000097946988 50 4 30 10 -1
  62: 0100870A:DA12 9CFC870A:022A 01 00000000:00000000 02:000002C8 00000000     0        0 38190246 2 00000000f36379b6 23 4 30 10 -1
  63: 4C3AF957:006F 489EC0D4:B828 01 00000000:00000000 00:00000000 00000000   109        0 16668714 1 0000000071500100 24 0 0 10 -1
  64: 0100870A:AD96 D1F9870A:022A 01 00000000:00000000 02:00000050 00000000     0        0 38180718 2 000000001380f901 25 4 30 10 -1
  65: 4C3AF957:006F 3567DF4D:98C6 01 00000000:00000000 00:00000000 00000000   109        0 13061048 1 00000000fcfbbbb6 22 0 0 10 -1
  66: 4C3AF957:006F 2E384AC6:B721 01 00000000:00000000 00:00000000 00000000   109        0 14741764 1 000000002c9e18a5 51 4 30 10 -1
  67: 0100870A:C8C4 1DFC870A:022A 06 00000000:00000000 03:00000549 00000000     0        0 0 3 00000000b91ceb89
  68: 0100870A:B5AC E0FC870A:022A 01 00000000:00000000 02:000004E2 00000000     0        0 38191134 2 000000007776c622 24 4 30 10 -1
  69: 4C3AF957:006F 4C9EC0D4:C642 01 00000000:00000000 00:00000000 00000000   109        0 18028278 1 00000000dc73abfc 21 0 0 10 -1
  70: 4C3AF957:006F 499EC0D4:B22F 01 00000000:00000000 00:00000000 00000000   109        0 15103546 1 00000000286b873b 21 0 0 10 -1
  71: 0100870A:E7D8 97FA870A:022A 01 00000000:00000000 02:00000462 00000000     0        0 38190827 2 000000003ec57d4d 23 4 24 10 -1
  72: 0100007F:13AE 0100007F:D29A 06 00000000:00000000 03:00000000 00000000     0        0 0 3 00000000e3a44d77
  73: 0100870A:ECB6 0AFA870A:022A 01 00000000:00000000 02:00000114 00000000     0        0 38189965 2 000000003fb29efc 24 4 30 10 -1
  74: 4C3AF957:006F 3245AF55:8C2F 01 00000000:00000000 00:00000000 00000000   109        0 14360575 1 0000000039730c93 24 0 0 10 -1
  75: 4C3AF957:006F 3567DF4D:D511 01 00000000:00000000 00:00000000 00000000   109        0 364517 1 00000000e9894b00 22 0 0 10 -1
  76: 4C3AF957:006F ACA84F2D:EB84 01 00000000:00000000 00:00000000 00000000   109        0 14743620 1 00000000233e1d93 49 4 30 10 -1
  77: 4C3AF957:006F 4A9EC0D4:986B 01 00000000:00000000 00:00000000 00000000   109        0 14548243 1 000000004d11b661 22 0 0 10 -1
  78: 4C3AF957:006F 086D212D:B2B5 01 00000000:00000000 00:00000000 00000000   109        0 33830030 1 00000000be415995 58 4 30 10 -1
  79: 0100870A:A7D0 45FC870A:022A 06 00000000:00000000 03:00000501 00000000     0        0 0 3 00000000389e7889
  80: 4C3AF957:006F 946886B7:BD3B 01 00000000:00000000 00:00000000 00000000   109        0 2282471 1 0000000028b46fcc 76 4 31 10 -1
  81: 4C3AF957:006F 7A44D0B0:C186 01 00000000:00000000 00:00000000 00000000   109        0 15257654 1 0000000051874008 46 0 0 10 -1
  82: 4C3AF957:006F 479EC0D4:9BBD 01 00000000:00000000 00:00000000 00000000   109        0 14405379 1 000000007dca56f0 22 0 0 10 -1
  83: 4C3AF957:006F 489EC0D4:9BE7 01 00000000:00000000 00:00000000 00000000   109        0 35447379 1 000000009402d2ef 22 0 0 10 -1
  84: 0100870A:8DB0 D5F9870A:022A 01 00000000:00000000 02:000000E2 00000000     0        0 38167355 2 00000000b84540c7 24 4 30 2 7

from mediamtx.

wolverin-a avatar wolverin-a commented on June 11, 2024

iptraf on an interface that deals only with video proxies
image

from mediamtx.

neilyoung avatar neilyoung commented on June 11, 2024

Also very helpful:

https://medium.com/@CameronSparr/increase-os-udp-buffers-to-improve-performance-51d167bb1360

from mediamtx.

wolverin-a avatar wolverin-a commented on June 11, 2024

@neilyoung it doesn't help, I've reopened the new issue, where I specified all the current kernel parameters.

from mediamtx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.