I have been trying to get the live video overlay to work and have a couple problems. I am running win7 home with a dell xps laptop. If I use the built in web cam, the mission planner will slooooow down so much it is unuseable. The video will work but it has like a 6 sec delay and also slows down all displayed data. I have to click stop and wait like 2 minutes before it will catch up. Once the camera has stopped, everything works normal again. Looking at the system manager I am only using a fraction of the processor.

I also have a Avermedia tv card with composit in and it dosnt work at all. I get an error message "Camera Fail: there is no match for the specified key in the index"

Any ideas?



Views: 1277

Reply to This

Replies to This Discussion

I am running the planner on XP with a Diamond TVW750U USB dongle - this has both analog video and TV antenna inputs. Up until version 14 of the planner I got the "camera fail" error. With version 16 I don't get the error, but only get video noise, and the noise pattern changes if I touch the antenna input (no, I haven't attached a real antenna). If I then start AMCap, which I have configured to work with the video input of the Diamond, the picture comes through properly in APM planner. I can then close AMCAP and everything is fine. If I have to restart APM planner  I have to start up AmCap also to get the picture back.


I have made sure that I have the latest drivers for the Diamond.


I suspect that there is something missing in the APM planner initialization code that leaves it in a default TV antenna input mode.


The behavior is identical to what I get with HK GCS.




p.s. This is a great piece of code. I will be working on a sunshield to allow me to use it on my laptop at the field for my next flight.

I downloaded the source this morning and have got it to build in VC2010 so if there are any changes you would like me to try please let me know.


The only issue I had with the build was that planetracker.png was missing from the repository so I had to create a temporary file to substitute.

O.K. after an afternoon in google learning (as little as I could get away with) about DirectShow it appears that a video crossbar is required in the filter graph. The following works for me - it checks to see if a video crossbar was created by the CaptureGraphBuilder2 constructor, and if so it tries to connect a composite video input pin to the video decoder output pin.

This replaces the routine SetConfigParms in capture.cs

I don't have any way of checking if it properly handles the case where there was no crossbar detected so that will need to be verified. I hope this helps.

// Set the Framerate, and video size
private void SetConfigParms(ICaptureGraphBuilder2 capGraph, IBaseFilter capFilter, int iFrameRate, int iWidth, int iHeight)
int hr;
object o;
AMMediaType media;

IAMCrossbar crossbar = null;

hr = capGraph.FindInterface(PinCategory.Capture, MediaType.Video, capFilter, typeof(IAMCrossbar).GUID, out o);
if (hr >= 0)
crossbar = (IAMCrossbar)o;
int oPin, iPin;
int ovLink, ivLink;
ovLink = ivLink = 0;

crossbar.get_PinCounts(out oPin, out iPin);
int pIdxRel;
PhysicalConnectorType tp;
for (int i = 0; i < iPin; i++)
crossbar.get_CrossbarPinInfo(true, i, out pIdxRel, out tp);
if (tp == PhysicalConnectorType.Video_Composite) ivLink = i;

for (int i = 0; i < oPin; i++)
crossbar.get_CrossbarPinInfo(false, i, out pIdxRel, out tp);
if (tp == PhysicalConnectorType.Video_VideoDecoder) ovLink = i;

crossbar.Route(ovLink, ivLink);
o = null;

throw new Exception("Failed to get IAMCrossbar");
throw new Exception("Failed to get IAMCrossbar");


// Find the stream config interface
hr = capGraph.FindInterface(
PinCategory.Capture, MediaType.Video, capFilter, typeof(IAMStreamConfig).GUID, out o);

IAMStreamConfig videoStreamConfig = o as IAMStreamConfig;
if (videoStreamConfig == null)
throw new Exception("Failed to get IAMStreamConfig");

// Get the existing format block
hr = videoStreamConfig.GetFormat( out media);
DsError.ThrowExceptionForHR( hr );

// copy out the videoinfoheader
VideoInfoHeader v = new VideoInfoHeader();
Marshal.PtrToStructure( media.formatPtr, v );

// if overriding the framerate, set the frame rate
if (iFrameRate > 0)
v.AvgTimePerFrame = 10000000 / iFrameRate;

// if overriding the width, set the width
if (iWidth > 0)
v.BmiHeader.Width = iWidth;

// if overriding the Height, set the Height
if (iHeight > 0)
v.BmiHeader.Height = iHeight;

// Copy the media structure back
Marshal.StructureToPtr( v, media.formatPtr, false );

// Set the new format
hr = videoStreamConfig.SetFormat( media );
DsError.ThrowExceptionForHR( hr );

media = null;

My other computer has a standard webcam so I managed to try the case that does not need a crossbar. Silly mistake - please delete the final "else" statement.

     throw new Exception("Failed to get IAMCrossbar");

Andrew and others, i will add this code today, and upload a new exe later on.

Just downloaded 1.0.18 and it works fine with my video capture device.


Thank you,



downloaded 1.0.18, but still getting the same msg with lifeview.




you will need to give me a screen shot of graphview i think

you will need to add your capture device and then click on one of the pins and click render. and give me a screen shot.
thats about the only way i can think of doing it.



i may have found an answer to this one. i got a easycap for myself, and odly enough it did not work. so the next planner version should work with those other devices that are not working currently.


Transmitting via gopro hd cam and 1.3ghz tx/rx. Rx plugged into the usb grabber (Easycap) to pc. 1 second delay on video stream, and if the receiver looses signal for more than a few seconds, an error message reads ''problem with capture device, grabbing frame took longer than 5 secs" , then I have to go into the config / planner tab to restart the video. Is this because this is a cheap grabber ?


DIY Drones Monthly


Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2016   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service