Jump to: navigation, search

GoPro VR Player - UDP Communication



Introduction


GoPro VR Player can stream UDP messages. It contains informations about 360 video playback like camera orientation, video url, playback state, playback position.

These messages can be used in two ways :

  • Synchronized views of GoPro VR Player.
  • Third-party application synchronized with GoPro VR Player.






Synchronized views


UDP communication is disabled by default. You have to choose the communication mode : primary or secondary in the Preferences, PRIMARY / SECONDARY:

The idea is to have a primary instance of GoPro VR Player which stream informations about his 360 video playback and one or more other instances which made exactly the same 360 video playback.

You can also have a GoPro VR Player running on Windows platform and another running on Mac platform for example. But to do this you will have to take care about URL decoding configuration (see below).




Primary

Primary

The primary mode allows GoPro VR Player to send UDP messages. You just have to configure the following parameters :

  • IP Address: defines where the messages are sended, there is 3 possibilites.
    • Broadcast : messages are broadcasted on the local network.
    • Localhost : messages are sended locally on the computer.
    • Custom: define the ip address that will receive messages.
  • Port : set the port on which messages are sended (port 7755 by default).
  • Refresh rate : message sending frequency in milliseconds (20ms by default).
  • Packet format:
    • JSON: packets are UTF-8 encoded with JSON format, recommended when using a third party to handle UDP messages.
    • Qt: packets are encoded with Qt format which is very efficient and fast but Qt is needed to decode packets.



Secondary

Secondary

The secondary mode allows GoPro VR Player to read UDP messages. You just have to configure the following parameters:

  • Port: set the port on which messages are received (port 7755 by default).
  • URL decoding: defines how the video URL is processed by GoPro VR Player, there is 4 possibilites.
    • Absolute: URL is used without process (no warranty to work in cross-platform way).
    • Movies: the file name is extracted from URL and prefixed with common path of Movies directory (warranty to work in cross-platform way).
    • Desktop: the file name is extracted from URL and prefixed with common path of Desktop directory (warranty to work in cross-platform way).
    • Off : URL is not used at all.
  • Camera orientation: defines if the camera orientation (yaw, pitch, roll) is processed by GoPro VR Player, there is 2 possibilites.
    • Absolute: the camera orientation will be the same as the primary.
    • Offset:
    • Off: the camera orientation is not used.
  • Packet format:
    • JSON: packets are UTF-8 encoded with JSON format, recommended when using a third party to handle UDP messages.
    • Qt: packets are encoded with Qt format which is very efficient and fast but Qt is needed to decode packets.






Third-party

UDP messages can be used by any other application. For example, a 3D audio engine can use these informations to produce 3D sound in accordance with video playback made by GoPro VR Player.

UDP messages are encoded in UTF-8 and JSON format (http://www.json.org/). So you have to use a JSON parser to decode the message. You can also change the encodage format to Qt in settings, but you will need Qt framework to decode UDP messages.

Here is the current structure of UDP message :

  • "id": "ked" --- message identifier
  • "yaw": float --- yaw in radians
  • "pitch": float --- pitch in radians
  • "roll": float --- roll in radians
  • "fov": float --- field of view in degrees
  • "url": string --- current video url. For local files, ensure to respect this scheme according to OS :
    • Windows : "url":"file:///C:/Users/kolor/Videos/FullHD_25fps.mp4"
    • Mac : "url":"file:///Users/loic/Movies/FullHD_25fps.mp4"
  • "state": enum --- playback state, integer possible values are : 0 (StoppedState), 1 (PlayingState), 2 (PausedState)
  • "position": int --- current video playback position in milliseconds
  • "stereoMode" : enum --- stereoscopic mode, integer possible values are : 0 (no stereo), 1 (over under), 2 (side by side), 3 (over under inverted), 4 (side by side inverted)







Back to GoPro VR Documentation