udp multicast to tcp unicast proxy YAPS revisited…and bugfixed


Yesterday I had an idea how I could fix the last remaining problem in my udp multicast to tcp unicast proxy server (YAPS).

The last time I had to report this:

“There are some glitches I am afraid to say: one known bug is that there are 12 bytes to much in the outgoing data stream which corrupts the picture. If anyone here can fix it: Do it please 😉 I tried one day and I could not find a solution for the problem.”

My idea was now, that those glitches are possibly there because some bytes of the header remain in each packet and therefore the movie stream itself is destroyed. MPlayer was able to display something, but as I said…glitches.

So I made a method that actually calculates the size of the header of each RTP packet and then removes this header:

   1:  public byte[] killRTPheader(byte[] b,ref int inlength)
   2:  {
   3:  byte[] outbytes = new byte[1600];
   4:  int headersize = 12+4*((b[0] >> 0) & 0x0f);
   5:    Array.ConstrainedCopy(b, headersize, outbytes, 0, inlength - headersize);
   6:    inlength = inlength - headersize;
   7:  return outbytes;
   8:  }

The results speak for themselves: A perfect sound and picture.

Beside that I added some additional features. Read the source and you’ll find out.

You can grab the source and binaries here: YAPS.zip (24,74 KB)

  1. #1 by Marcus on August 18, 2006 - 19:58

    Hi Daniel,
    please, is it possible to add some kind of ini file t onext version of YAPS to have adding option? My provider is broadcasting on port 2314 in ip range 239.2.3.100-121

    I do not know how to compile your sourcecode, therefore I cannot make any changes andy “try”. But I bellieve that your proxy can help me getting providers multicast to our LAN.

    You think you can add this feature?
    Thanx alot!

  2. #2 by bietiekay on August 20, 2006 - 19:17

    Of course. A configfile is definitly planned to be added very soon. I am redoing the complete interface at the moment. Expect your requested feature added within the next few days…

Comments are closed.