VIRB Elite Wireless API

Note: this post is obsolete. Please use the official API at http://developer.garmin.com/virb.

It is possible to communicate to your VIRB Elite wirelessly (the Garmin VIRB iOS and Android app make use of that feature).

A few people here an the forums asked how to do this, so I asked around and got permission to publish this post.

Disclaimer: This is a somewhat advanced topic and you probably won't want to do this unless you have some programming experience. I'll try to answer questions about the API as best as I can, but don't expect regular support for this.

Prerequisites

You need a VIRB Elite, this won't work with a VIRB Basic.
You need a computer that can connect to a Wireless network.
Turn on your VIRB Elite's Wifi functionality (check owner's manual on how to do this).
Connect your computer to the VIRB Elite's wireless network. (This will most likely disable your internet access.)

Communicating with a VIRB Elite

Communication is done via HTTP POST requests, the requests themselves use Json.

The easiest way to test this that I found is by using Chrome's Dev HTTP Client extension. Install Chrome if you don't have it yet, install the extension and launch Dev HTTP Client.

Now send a request to http://192.168.0.1/virb. Put the following text into the body of your request:

{"command":"features"}

and send the request. Make sure you have POST selected as the method.

You should see something like this:



The camera responded with a list of features it supports.

Commands

This is a list of commands the camera understands:

{"command":"features"} Will list the features.
{"command":"updateFeature","feature":"<feature name>","value":"<new value>"} Will set a feature (things like video mode, etc.) . You can find out what values the camera accepts by looking at the response of the 'features' command.
{"command":"startRecording"} Starts recording video.
{"command":"stopRecording"} Stops recording video.
{"command":"status"} Gets status info about the camera. (Stuff like battery level, space remaining, etc.)
{"command":"deviceInfo"} Receives information about the camera (stuff like firmware version, device id, etc.)
{"command":"livePreview","streamType":"rtp"} Returns the url for streaming live video from the camera.
{"command":"snapPicture","selfTimer": 0} Tells the camera to take a photo.

Response format

Responses will look like this:

{"result":1}

with additional stuff in there for some commands. 1 means success, 0 is failure.

Streaming format

The VIRB uses RTSP to stream the video over Wifi. The video data compressed using H264.

You should be able to use VLC Media player to display the live stream.

Using this in other applications

There is currently no SDK available for the VIRB API. So you are on your own if you want to implement this in your own applications. Pretty much any platform has some sort of HTTP Client and some Json library that should make this fairly simple. For .NET you could use HttpClient and Json.NET.

The trickiest part is probably displaying the video. The Garmin mobile apps use FFmpeg to display the video. If you are planning to develop an iOS or Android app, there is some source code on http://developer.garmin.com/open-source-software/virb/ that might help get you started.

  • As far as I am aware there is no good Wi-Fi solution.

    Options:

    1. Export the video with the App (will take time).
    2. Connect it to a screen: http://www8.garmin.com/manuals/webhelp/virbx-xe/EN-US/GUID-15023F6D-0FBC-4719-ADCE-FFDE94B470D2.html
    3. Connect to a PC/Tablet (or take out the SD card and connect it) and play it there.

    Someone correct me if I missed an option.
  • Play video on my android Phone or Tablet

    Ok, thanks.

    Just strikes me as odd that a proper play back is not available.
    This device is much later generation then my Drift Ghost.
    Also in relation to to the rest of this post. Live streaming does work apparently.
    Is there a way to access the content wireless?

    Kind
    Regards
  • Sorry to dredge this old one up! Now the Virb Ultra is on the market, I haven't found any information on the API being compatible, even the documentation from Garmin hasn't been updated since December 2015.

    I'm interested in the streaming the live preview, has anyone had success with the Ultra?

    Thanks in advance.
  • Hi Stooie,
    I?d suggest that it still works. The Virb mobile App uses the same API and is compatible to Elite, XE, Ultra and 360.
    The API is quite open and the camera gives you all information about its possible settings. If a new setting comes via update, it will appear automatically in the json.

    With my XE I?ve never got live preview running. But anything else was working fine*.
    After an FW update, I wasn?t able to login into my WiFi anymore and I stopped developing for it.

    *in the meaning of technical communication.


    [Offtopic]
    From my experience, I can not recommend to expect that the API works intuitive and with all development languages.
    Like the Connect IQ Apps (Garmin is very strinct in that, all over their devices), they dont care about camelCase or PascalCase. Methods are sometimes capitalized, sometimes not.
    The enumerations are pure horror! Beside the capitalization, they start with numbers or contain special chars. Everything has to be interpreted by hand, because no serializer will work with that.
    Also, like my experience with other Garmin APIs or development languages, you will end up very frustrated.
    Maybe there is a relation between the missing code guidelines and the amount of bugs in all their products/apps/sites/forum/SDK/API, etc....
  • Hi Stooie,
    I?d suggest that it still works. The Virb mobile App uses the same API and is compatible to Elite, XE, Ultra and 360.
    The API is quite open and the camera gives you all information about its possible settings. If a new setting comes via update, it will appear automatically in the json.

    With my XE I?ve never got live preview running. But anything else was working fine*.
    After an FW update, I wasn?t able to login into my WiFi anymore and I stopped developing for it.


    Brilliant HerrRiebmann, thanks for your answer, my suspicion was just this. I'm working with hardware that already works with the XE, but as this unit is now getting on, I didn't want to go with the Ultra if they had changed it all!