VIRB Elite Wireless API

Former Member
Former Member

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.

  • Former Member
    0 Former Member over 10 years ago
    Yes, you can!

    Request:

    {"command":"status"}


    Response:

    {"result":
    1,"batteryLevel":"80","totalSpace":5120000,"availableSpace":4198400,"recordingTimeRemaining":7200,"gpsAccuracy":10,"gpsLatitude":38.856863,"gpsLongitude":-94.800131,"state":"idle","recordingTime":<elapsedRecordingTime>,"photoCount":<photo count>}
  • Former Member
    0 Former Member over 10 years ago
    A few Questions:
    1) is there a POST request to initiate a still photograph
    2) is there a mechanism (maybe ftp) for downloading Videos or Photos that are on the Virb unit
    3) have you noticed the Photo count entry of the status seems to always be 0 (have taken pictures using buttons on Virb)

    thanks
  • Former Member
    0 Former Member over 10 years ago
    1) Yes

    {
    "command": "snapPicture",
    "selfTimer": 0
    }

    2) Not currently, sorry.

    3) I don't believe that field is currently properly populated.
  • Former Member
    0 Former Member over 10 years ago
    Many thanks for the quick response.
    It would be really good to be able to download recorded movies wirelessly.
    I was expecting that was the main reason for the WIFI. As then I could download recorded movies to my phone whilst out.

    But the Wireless api to control & configure it is good, very useful.
    I've got a Windows phone app working, though currently without the preview option.

  • Former Member
    0 Former Member over 10 years ago
    Routing around things i found another command {"command":"mediaList"}
    Can you advise what this does or if its not implemented yet?

    thanks again.
  • Former Member
    0 Former Member over 10 years ago
    That is not implemented yet, unfortunately.

    Very cool app! The preview part is the tricky one. :)
  • Hey,
    Was wondering..... Why is there no feature to use say a Nexus 7 tablet as viewer for footage already recorded? Am I really ment to take my 17" MBP on a 3 week hike just so I can view Virb Elite footage????? Also why can I not offload footage via WIFI to say a Nexus 7???

    Virb is fine but in practice its a pig to use.
  • Carry one of these Kingston WiFi Card Reader and you can put your uSD card into it at the end of the day, and see the footage on your Nexus or your iPhone.

  • Yes, I know that there are solutions that involve spending more money, having more gadgets and carrying more weight not to mention being slow and fiddly but thought that as you can already stream a live view through the app then adding the functionality to view recorded clips wouldn't be that difficult yet would have mass appeal .
    Is this likely to happen?
  • Former Member
    0 Former Member over 10 years ago
    For complaints about the VIRB (Elite) firmware use the link in FALAGA's signature.

    If you don't want to carry much stuff around, ask yourself the question why you're carrying around a computer with an as large as possible touchscreen, a complete soundsystem, at least one camera, running all sorts of programs while in the end it's just a phone.

    WiFi offloading... 64Giga Bite via 100 kilo bit / second... that would be a nice time to wait.