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.

  • 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... Is this likely to happen?


    I don't call $35 "more money". It's a drop in the bucket, and it's a solution NOW. And the device I mentioned also is an emergency phone battery booster so if you're traveling light, and want to be safe, then it's a no brainer. It weighs 3.5 ounces (100g) so weight is hardly worth complaining about.

    Yes, it would be nice if the Virb could stream video through WiFi but it can't and likely wouldn't perform acceptably even if it could be forced to.

    So we adapt.
  • Former Member
    0 Former Member over 10 years ago
    GPS, Compass, Accelerometer and Gyro API

    Hi FALAGAR,

    I'm not able to get the GPS and other metrics with the command status. Can you explain how to retrieve this data.

    Command Status doesn't include the GPS attributes.

    Thank you.
  • Former Member
    0 Former Member over 10 years ago
    What do you get from the {"command": "status"} command? Does your VIRB have a GPS connection when you run this?

    I get something like this from mine:

    {
    "batteryLevel": "64",
    "totalSpace": 30123456,
    "availableSpace": 25987654,
    "gpsAccuracy": "38",
    "gpsLatitude": "33.311922",
    "gpsLongitude": "-111.917895",
    "recordingTimeRemaining": 7201,
    "photoCount": "0",
    "recordingTime": "0",
    "state": "idle",
    "result": 1
    }
  • 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.



    Garmin just released a Windows Phone 8.1 remote control app for VIRB: http://www.windowsphone.com/en-us/store/app/virb/86c586e7-a16d-4f2d-a783-682156b2a945.
  • Former Member
    0 Former Member over 10 years ago
    Hi Falagar,

    Can you confirm that the new Virb XE offers the same or similar API and addresses any of the issues with live streaming (whilst recording and/or with audio)?

    Regards,

    Ross
  • Former Member
    0 Former Member over 10 years ago
    VIRB X/XE does support live streaming (while recording and with audio). The API is very similar, I'll try to get this post updated once VIRB X/XE ships.
  • Former Member
    0 Former Member over 10 years ago
    Great News!

    VIRB X/XE does support live streaming (while recording and with audio). The API is very similar, I'll try to get this post updated once VIRB X/XE ships.


    I am so pleased to hear about this! The VIRB XE Is on my list to purchase.
  • Former Member
    0 Former Member over 9 years ago
    There is now an official (much more detailed) API documentation at http://developer.garmin.com/virb.
  • Play video on my android Phone or Tablet

    This is a pretty old post but the only one I could find more or less matching my issue.
    I purchased a Virb XE recently. And had experience with a drift Ghost before.

    I have been using the Cam during Motorbike instruction and during Instruction I want to be able to show some of the footage to my students.
    With the Drift I could simply access the content on the cam and play it over Wifi in full resolution.
    But with my Garmin Virb App I gat a very low resolution view of the video and the display jumps from shot to shot.
    The only way to play the video properly is by downloading the video to my device. Obviously this takes a huge amount of time.

    I have been searching forums and net on the topic but apparently there are no other people having problems with this.

    Any Suggestion.
    Is there a way to acces the content in a different way then the Virb App?
    So I can play it with an other player for example?

    Hope you can help