Mixedrealitytoolkit-unity: Very long SyncStrings are truncated when sent over sharing service

Created on 30 Jun 2017  路  3Comments  路  Source: microsoft/MixedRealityToolkit-Unity

Hi,
I am attempting to transmit image data (e.g. a photo taken at runtime) from one device to another using the sharing service. My current approach is to take the Texture2D, encode it into a JPG byte array, then base64-encode it and set it up as a SyncString as part of a SyncObject model.

However, it appears that very large SyncStrings are not being completely transmitted to other clients. For example, after encoding one particular image in this way, I get a string of size 1057988 characters, but when the other device receives the updated SyncString, it contains only the first 9412 characters. (When loading the data into a Texture2D I see the first couple pixel-rows of the image, a sign of truncated JPG data).

Is there anything I can do to allow for larger sizes of this kind of data when using the sharing service? For specific implementation reasons I would prefer not to have to upload the images to an external site and transmit just a URL via the sharing service.

Question

Most helpful comment

@StephenHodgson Yeah, seems like a fileserver would fit nicely into this.

  1. take picture
  2. upload to file server
  3. get url of the picture
  4. share this url
  5. receiving hololenses can then fetch this image from URL

Can probably be done more RESTful by just sharing some image id which the receiving HoloLens uses to fetch the image from fileserver/object storage/ or whatever means you chose to store the image. If video data is meant to be transmitted then using a separate streaming service could also work. Would not recommend sending files / video streams over the HoloLens sharing service.

All 3 comments

This issue probably belongs on the main HoloToolkit. In either case, sending the image data over the sharing service as a SyncString probably isn't the best method.

@StephenHodgson Yeah, seems like a fileserver would fit nicely into this.

  1. take picture
  2. upload to file server
  3. get url of the picture
  4. share this url
  5. receiving hololenses can then fetch this image from URL

Can probably be done more RESTful by just sharing some image id which the receiving HoloLens uses to fetch the image from fileserver/object storage/ or whatever means you chose to store the image. If video data is meant to be transmitted then using a separate streaming service could also work. Would not recommend sending files / video streams over the HoloLens sharing service.

Going to close this. It's probably been archived by google by now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

markgrossnickle picture markgrossnickle  路  3Comments

brean picture brean  路  3Comments

StephenHodgson picture StephenHodgson  路  3Comments

StephenHodgson picture StephenHodgson  路  3Comments

provencher picture provencher  路  3Comments