title: Why there is high divergence between packets captured by python vs wireshark
body: <p>Basing on multicast receiver from:
  <a href="https://stackoverflow.com/questions/603852/how-do-you-udp-multicast-in-python">How do you UDP multicast in Python?</a></p>
  
  <p>I adjusted it to my needs considering the fact I wanted to stream 10,5 MB test file video using VLC and analyse packets sent by it. 
  Here is configuration of VLC:
  <a href="https://imgur.com/lAJIbTx" rel="nofollow noreferrer">https://imgur.com/lAJIbTx</a></p>
  
  <p>The problem is that I see on wireshark 769 captured packets where python prints out that he received a little bit above 600. What may be cause? I believe my method of calculating packets may be wrong in python. Do you have any solutions?
  Here is python vs wireshark packets shown:</p>
  
  <p><a href="https://imgur.com/n3NmKhg" rel="nofollow noreferrer">https://imgur.com/n3NmKhg</a></p>
  
  <pre><code>import socket
  import struct
  
  MCAST_GRP = '239.200.200.1'
  MCAST_PORT = 5252
  IS_ALL_GROUPS = True
  
  sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
  sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
  if IS_ALL_GROUPS:
      # on this port, receives ALL multicast groups
      sock.bind(('', MCAST_PORT))
  else:
      # on this port, listen ONLY to MCAST_GRP
      sock.bind((MCAST_GRP, MCAST_PORT))
  
  mreq = struct.pack("4sl", socket.inet_aton(MCAST_GRP), socket.INADDR_ANY)
  
  sock.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq)
  counter = 0
  print("Entering while loop")
  while True:
      datagram = sock.recv(1328)
      counter +=1
      print(counter)
  </code></pre>
  
  <p>I would like to calculate bitrate by knowing amount of captured packets sent by multicast streamer and dividing this number by time of observation. But the thing is I want to be sure if amount of captured packets by python is correct, but so big divergence between wireshark and python looks like it is not correct.</p>
  
  <p>The interesting thing is that if I'm understanding it correctly, even 769 packets are not enough. 769 * 1328 = 1.021.232 bytes which is about 1MB where video is 10.5MB. Am I thinking correctly?</p>