1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Possible bug: latency in setImage via ProtoBuffer

Discussion in 'Bug Reports' started by Flovie, 9 March 2017.

  1. Flovie

    Flovie New Member

    Messages:
    3
    Hardware:
    RPi3
    Hi,

    recently, I started to develop a tool for music visualization via Hyperion. The calculations are performed by a Java program on a windows computer. I will present a first alpha of this a little later.

    Anyways, I use Protobuffer for transferring the images to Hyperion. I basically took the provided Protobuffer[1] example without changing it. I experienced a considerably high latency for sending an image and receiving the reply via this program(~40ms). Suprisingly, when I increased the amount of data to be sent (by artificially increasing the image resolution), the latency decreased significantly (~4ms). I am not sure if this is some buffering problem of my windows system, network device, or protobuffer protocol or if it is really a bug of Hyperion. However, I wanted to start this thread for providing a possible solution for other developers facing the same problem.

    So if it is no real bug, nevermind ;) For everybody else experiencing considerably high latencies, try to increase the amount of data - maybe it helps.



    [1] https://hyperion-project.org/wiki/Protobuffer-Java-client-example
     
  2. TPmodding

    TPmodding Administrator Staff Member Administrator

    Messages:
    1,296
    Hardware:
    RPi1/Zero, RPi2, RPi3, +Arduino, +nodeMCU/ESP8266
  3. Flovie

    Flovie New Member

    Messages:
    3
    Hardware:
    RPi3
    Yes, I did, but thank you for the link. So far this very similar piece of software is limited to Linux because it uses gstreamer. Since I have no Linux computer around for that, I want to handle a simple audio stream coming in via lineIn or even microphone. This should be more platform independent (however you have to get the audio source from somewhere). Despite of that, the idea is the same.
     
  4. TPmodding

    TPmodding Administrator Staff Member Administrator

    Messages:
    1,296
    Hardware:
    RPi1/Zero, RPi2, RPi3, +Arduino, +nodeMCU/ESP8266
    there is a second one, which works on windows only and is writen in java, but i didnt find it, thought maybe it can help you :/
     
  5. Flovie

    Flovie New Member

    Messages:
    3
    Hardware:
    RPi3
    Thank you, if you stumble across that again, I would appreciate if you can send me the link :) I haven't seen it although I searched for possible solutions quite a while.

    However, it is not too hard to write it by my own because the Protobuffer java class is already available and I use the Minim library for audio processing (it took me only 5 hours to set both up without any previous knowledge and I learned a lot, so the time was well spent). Therefore, the whole challenge reduces to being creative in building an own visualization.
     
  6. Brindosch

    Brindosch Active Member

    Messages:
    678
    Hardware:
    RPi1/Zero, RPi2, RPi3, +nodeMCU/ESP8266
    Greetings,
    sounds promising! Will wait for a first test version :)