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.

  • Live preview whilst recording

    Hi,

    Thanks for providing this data, we have been able to start integrating the camera for a large project we are developing for as a result. First impressions are really good, image quality is great in the live preview considering it is only standard definition and the GPS is rock solid (as always). However, there is one major show-stopper for us...which is that it doesn't seem to be possible to view the Live Preview whilst the camera is recording! This seems strange as presumably anyone viewing the camera remotely would want to view what they were recording...isn't that the point of it?? Is there some way to view the live stream whilst the camera is recording?

    Also, a minor problem is the lack of an audio stream in the live preview. Is there anything that can be done about that also?

    Bonus: is there some way to get a live still image from the camera?

    If we are able to solve these problems then the Virb Elite could be the ideal live camera we have been searching for.

    Thanks in advance!

    Ross
  • Ross,

    we are definitely investigating all of the items you mention, but I cannot share any details at this point.
  • I added a link to Garmin Developer where you can find some source code that might be beneficial.
  • Hi Falagar,

    Has there been any developments in regards to the Virb streaming? Or anything we can do to get the Virb over the line with this project we are currently specifying for?

    Regards,

    Ross
  • Ross,

    unfortunately there is nothing I can share at this point.
  • Former Member
    0 Former Member over 10 years ago
    Maybe of your interest:
    Today I've tried the Genymotion emulator with a patched "Galaxy Nexus - 4.1.1 - with Google Apps - API 16 - 720x1280"
    I needed the patched one as the original didn't had Google's play store and I couldn't download the App.
    Than I used the "Oracle VM VirtualBox Manager"
    Next I added a wireless USB adapter to my PC.
    I found out that to use the WiFi adapter you just set the networkadapter, don't select the USB device from within the VirtualBox.
    I was able to connect to my VIRB Elite and change some settings.
    I did not get the viewfinder to work.
    As I set the slider on the Virtual Nexus to "Record", it took a long time for the VIRB to react.
    After a while the VIRB just went into recording mode and stopped almost immediately.
    The connection was too slow and not stable.
    The distance between VIRB and WiFi adapter was about 40cm.
    The adapter a ASUS WL-160N for USB2.0 for 802.11b/g and n Draft 2.0
    Also tried the Eminent EM4454 with the same result.
    So conclusion: nice try but no joy..
  • Hi I agree with this completely! "However, there is one major show-stopper for us...which is that it doesn't seem to be possible to view the Live Preview whilst the camera is recording! This seems strange as presumably anyone viewing the camera remotely would want to view what they were recording...isn't that the point of it?? Is there some way to view the live stream whilst the camera is recording?"

    One of the coolest and most exciting things to do with video and photography is attach it to a helicopter or drone and have video from the air! Garmin is close with the Wi-Fi connectivity, you have the beginnings of the perfect camera. But, the key is being able to see what is being recorded while it is being recorded. I was really surprised when I realized the VIRB doesn't do that, I was all set to buy one, but will definitely hold off until that changes. I would suggest looking at what the company DJI has developed, a Drone with a built-in camera that streams live onto a smart phone. http://www.dji.com/product/phantom-2-vision Also, there is the Parrot Drone, which is cool because it has the same live video, but it is more limited for flight distance. There is a huge group of people that are building these drones themselves to fit specific cameras and recorders. The marketability of the VIRB to all of the the custom drone makers would go way up if you developed it for live streaming.

    I really hope Garmin is working on this! Thanks!
  • Hi Falagar,

    Have there been any developments on the Virb Elite API (in terms of streaming whilst recording, or audio in stream)?
    We have tried to contact Garmin technical department with this requirement on 4 occasions but have received no response beyond an initial phone conversation!

    Regards,

    Ross