How does one parse generic-byte-data packets

Heyo, super new to the MIP. I am successfully retrieving the live data along with livepackage statuses alright, but I dont know what to do with the application/x-genericbytedata-octet-stream, how would I go about retrieving pictures from that because I have a really hard time understanding the manual?

PS I did set the yes

Here is portion of what I am receiving

<?xml version="1.0" encoding="utf-8"?><livepackage><status><statustime>1504810560578</statustime><statusitem id="1" value="1" /><statusitem id="2" value="0" /><statusitem id="3" value="0" /><statusitem id="5" value="0" /></status></livepackage>
 
ImageResponse
RequestId: 1
Prev: 0
Current: 1504810560436
Next: 0
Content-length: 1612
Content-type: application/x-genericbytedata-octet-stream
 
   L 
Aø    ^]²ë“  ^]²ë´       Aš Ÿh Q^ÚÞ%n*¸ÃE=ápñf)|­rîcrJ‚8Œ$U4DkPƒjÜ#ìH‹ï˦ññLø²êêl:—&к§]”-õ’^E<à2"ËßÙŸ¹žÞ~p©*ôrW@{‹UÀV;
WbUIn:˜*Ë4I}It:ž¢\J‹çšÓLÙzwƒhÍÓGBkf`ÈÜ
(
	,ݾX…ee%AVÚߎ›õñ?®G¡|‚YIaÚØ°( Ó"ú8 À–Vœ {i°¸a ²L
n¢ˆmTÙî%$­ŒŒ´‘ã¾_
&òfßH¦k÷sâ�ËMzÙsi]Þû?=cû×yÊȧô#3�³KØ€|¾Nì§®~éË¢] å žr`áÙëqj­SP_"¨‘£…<¬QÐ6‚[^.àzuaÕðÊ" ·9ÉÅ/e¹™\2]…Fû‘Z¹ë²(ÓWF0Pr[@“<. Ùw‡8ßËý&ük d	!e©´¦´Ì|BË8úxaìÂxÀ÷ö³"¦q
îâçuÐÖH¶«×3¹BUì åe°g¶þыǨ•׉ú<c0ºøiZ\oB¦òÅ
O[UILº¯:Â\d–eÄIÎZr î‹ä‘­Íµôõ¦q &)‚Yü˜X>› Z¢™£’�J˜%X€�²ÞÓ«·L$‡ãò¹þEý¿øF UY¶¹¨Gñ8¯Ô:„/_sy^*35põÂuêÍ¡L8é�éøû‰Ã(ÿ´„×Äqaïƒ>)-”·³ô\ 3íû_V¯¶73Îpþ-̪/YQMª�¡@S"YbZ“vkÉ-­hmM Øg«eïøÅ̲‰ÅqÉ¡šV°DuZ晑îÌY¿búȲJR2Ý=M§Zrˆâ¡j*7鱑÷¥(Ì¡W‰­,ך¤˜DÕ†hZÿ2’ŸÏŒ¼â!ºâ6(†öìëü™Ñç"uŒûmGvë�\GWËb,Ä:ô¿nneȬBwNW}›z&˜¡w
ß‹`-`Šò­ª$P!ìÌ÷æ_ à�g�	»Îg8IDvSÚ¦Ïq§ãdwÆ*|©þw†UXF7œñÖÉÁáI‹¹´¾�6›Ô�$êf]¶*�#Ľ“ôŸ£5Kìë:;„N÷û‹h}ÃÁžáFÀx«'ô59å—J�Œñ¼%÷x7_y±Ã`7D8£yÄÅÃ�$1[x¨±ÝœG:?†‚rÃ)1-Ñ~ïɨRq°r]Á©j“ölÓX»…ÐÃ(Ê`FãÒ Ô7›Q˜õ×ø½Q—¹pA°'S†@.´æãt6«ìMËÓ<ªOM©BøXZ’NítÞÖ@ØÜÌŠ€ñÑ8È�CèèFxb…ØnpÅ y¼hy"ÃJk¤
¥eŠä*øQàp-.€Û`ÏËv]e¾¾Úo3ù�LšÆ¥0�DÊéQM  ÃK2Îé¤R+Š Yr×ÞÜ>ɦ"AS{Sf¬cEök!“3.²±bL}÷bôõ@’Ÿ^Û±F~–`ÏÚ÷
#7C;¿ˆ¦v í<ò©*‡ßTO•LÁ�BRUäd¤ëÂr®EëþÜÑ0øã‰dº‹vÏ[=§B°y%Nä¶:r½SÓÎE�@å
£Ä�
�dÍ›eFöþM¿W(H>ùk.Ò<,Gò+™ÇÐÒÅ3Œ•0Ž, Þñ—œ,ßȼˆ ‡G<€Ý ‡;@²îêP:—Â}Í£<!¥š'g^Æ^l³5-~sÁÎÞ>¯J+F¿Q÷ÁN+k4Ù¢2<xßâÉ_# Þ³,0Qý¶pØxP}&Q¨EINŸZ‘e$Ãcšo“ÅÜÁ�»KkÓžÑÙÌŠÓELOÒFFaFêlŸ×¤ž³ÇéeFˆª÷Ñçåþ‡–¬o(þÉK=IÎc¢ ÕO©q�ð@$¹õY׆-¿«Ä±„íoßHdÆ‹§OÒ\íêÌLú¸ÍG´HÝù‚0¥ì2K|¼�ÉŒ c9œk5ÄR‡@BṄÍ=ƒ¨á™iÞÓ2³õ§öþú–ÆÎ�ß¾Çã�€

I have two ideas.

In the MIP Documentation the The GenericByteData format and related pages should explain the format, perhaps it is a help.

The TCPVideoViewer sample does this, so perhaps you can get an understanding from looking into the code of that sample.

Hi @Yuriy Zborovskiy​ ,

I am facing same issue,Did you get to find out the solution for this?

Hey, I have yes.

I originally approached it from a wrong stance. My implementation is for browsers using javascript here is a render code:

( I am sorry for shit formatting, this forum did it, I copied it from my gitlab repo)

So I have this event called “NewFrame”

window.addEventListener("NewFrame", (e) => this.on_newFrame(e));
 

Which fires up in this function:

  requestImage() {
    this.requestLock = true;
    console.log('Frame Request!');
 
    var ajaxRequest = new XMLHttpRequest();
    ajaxRequest.open('POST', milestoneVideoChannel + this.videoId + '/');
    ajaxRequest.responseType = "arraybuffer";
    ajaxRequest.setRequestHeader("Content-type", "text/xml; charset=utf-8");
 
    ajaxRequest.onreadystatechange = (response) => {
 
      if (ajaxRequest.readyState == 4) {
        if (ajaxRequest.status == 200) {
 
          if (ajaxRequest.response) {
            // modern browsers
            var response = ajaxRequest.response;
          } else if ('responseBody' in ajaxRequest) {
            // InternetExplorer - use jDataView lib to parse the response
            var response = convertResponseBodyToText(ajaxRequest.responseBody);
          }
 
          if (!response || response.length === 0 || response.byteLength === 0) {
            if (!this.paused) {
              this.requestImage();
            }
            return;
          }
 
          var frame = new VideoConnectionFrame(response);
          console.log('Frame READY', frame);
          this.frameData = frame;
          window.dispatchEvent(this.newFrameEvent());
          if (!this.paused) {
            this.requestImage();
          }
          return;
        } else {
          console.log('Something went wrong with the request.', ajaxRequest);
          console.log("ERROR: " + ajaxRequest.status);
          if (ajaxRequest.status == 410) {
            requestPlaybackStream(this.guid, new Date(), function(res) {
              this.videoId = res;
              sendFrameRequest()
            });
          }
        }
      }
    };
 
    ajaxRequest.send();
  }

Then I just process it:

 on_newFrame(e) {
 
  console.log(e.detail);
 
  let frameDetail = e.detail;
 
  if ((frameDetail.guid === this.guid) && (frameDetail.frameData && 
   frameDetail.frameData.imageURL)) {
 
   let img = new Image();
 
   img.src = frameDetail.frameData.imageURL;
 
 
 
   let ctx = this.player.canvas.getContext("2d");
 
 
 
   img.onload = () => {
 
   // Do what you need and paint on canvas
 
   }
 
  }
 
 
 
}

This is a very old project, took me a second to catch up