The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on PUN.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

Live Video Stream

shftd
2016-07-01 12:07:49

Hello everyone,
I want to make a live video stream (projected on a texture) through the Photon Network. To do that, I created a function that calls GetPixels32 on my WebCamTexture (160x120 to limit the data size) which sends me an pixel array. I serialize it and send it with an RPC.

The problem is that I can't call my function too often (at most each 0.5s so we are far away from the 30 or 60fps) otherwise my clients are disconnected (likely because of the number of messages incoming: with my current configuration, I only get QueueIncomingReliableWarning: this client buffers many incoming messages. This is OK temporarily, etc LogMessages).

  • Am I doing it right or is there another solution that is more efficient ?
  • If not, what about a lossless compression ?

Thanks

Comments

shftd
2016-07-04 07:30:22

I tested with a LZF compression, it's better but not enough.
Any suggestion ?

Thanks

jeanfabre
2016-07-04 11:59:07

Hi,

Doing video streaming is very hard, I am not aware of any built in way for Photon. I would recommend studying this solution ( never worked with it myself, but the only solution I know for Unity)

https://www.assetstore.unity3d.com/en/#!/content/7447

it comes at a price, but maybe this is because indeed, it solves major headaches :) Maybe the compression system is open source and you could try to feed the compression inside the photon streaming system.

Bye,

jean

shftd
2016-07-04 16:06:42

Hi @jeanfabre
Thank you for the reply

Indeed it comes at a price ;-)
About the compression, I see that we used the same compression algorithm so I don't think I'll gain more there.

I am going to test with a self-hosted server, what do you think ?

jeanfabre
2016-07-05 10:49:23

Hi,

What do you think you'll gain by using a self hosted server?

Bye,

Jean

shftd
2016-07-05 12:05:25

Server settings can be set like the message max size or the queue size for example.
I tested with a local server and I'm at 20 fps against 2

jeanfabre
2016-07-05 12:07:55

Hi,

I see. But then, the cost of hosting could be an issue down the road.

Bye,

Jean

shftd
2016-07-05 12:57:29

Sure, I'm working on that.

Thank you for having taken your time

jeanfabre
2016-07-05 12:59:00

Hi,

No problem, I am interested in this topic actually :)

Bye,

Jean

AlaaEltayeb
2017-02-26 00:54:21

Hello man,

can you tell me how you sent the colors through the network??

best regards

Back to top