Socket help unity webcamtexture

I am currently trying to do live stream of my android camera to my pc.

I have a java socket server and in my unity I do a tcp client to that server. In my unity, I am using webcamtexture to get image, after that I use getPixels32 and convert the color32 array to byte array. I will then send the byte array through socket, however I have no idea why when I try to reconstruct the image on my java server side, the colors and image looks distorted.

If someone is still looking for solution, you may try FMETP STREAM | Forum

It provides Streaming Demo with TCP solution, and Web browser demo with Socket.IO.

Supported: Android/iOS/Mac/PC