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.