Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video Feed Not Changing, Video Not Saving #23

Open
zarrro45 opened this issue Jun 24, 2011 · 6 comments
Open

Video Feed Not Changing, Video Not Saving #23

zarrro45 opened this issue Jun 24, 2011 · 6 comments

Comments

@zarrro45
Copy link

Hello,
I just started working with your setup for the AR drone yesterday, downloading the newest version. The controls all work, and the video feed from the front camera shows up in the window. However, when I click the "change camera" button, nothing changes, and when I use the save video option, the file either shows up broken, or if I click "compress file" and then don't actually compress it, the file saves as a trippy, psychedelically purple version of the video. Also, if I leave the video capture program on for more than about 6 seconds, the program crashes. The snapshot program, however, seems to work fine. Any help would be appreciated, thank you.

@zarrro45
Copy link
Author

By the way, here is the exception and the line at which it occurs:

    public void AddFrame(Bitmap image)
    {
        if (stream != null)
        {
            stream.AddFrame(image); // The error is here, Line 108 in VideoRecorder.cs
        }
    }

Access Violation Unhandled: Attempted to read or write protected Memory. This often is an indication that other memory is corrupt.

Thanks again

@gallouglas
Copy link

Good Times :-)

The file "ARDroneControlLibrary \ Utils \ VideoUtils.cs" lines 329 and 338 of the rules I have to this form:
internalImageSource = new WriteableBitmap (width, height, 96, 96, PixelFormats.Bgr565, null);
The file "ARDroneControlLibrary \ Utils \ BitmapUtils.cs" function "public System.Drawing.Bitmap BitmapSourceToBitmap (BitmapSource imageSource)" was changed to a form:
"
System.Drawing.Bitmap bitmap;
using (MemoryStream outStream = new MemoryStream ())
{
/ / From System.Media.BitmapImage to System.Drawing.Bitmap
BitmapEncoder enc = new BmpBitmapEncoder ();
enc.Frames.Add (BitmapFrame.Create (bitmapsource));
enc.Save (outStream);
bitmap = new System.Drawing.Bitmap (outStream);
}
return bitmap;
"

in the file "ARDroneUI_WPF_full \ MainWindow.xaml.cs" line 652 still looks like this: videoRecorder.StartVideo (videoFilePath, averageFrameRate, size.Width, size.Height, System.Drawing.Imaging.PixelFormat.Format16bppRgb565, 2, false);

Regards, Victor.

@shtejv
Copy link
Owner

shtejv commented Jul 5, 2011

Yeah, one of the things I forgot to test was the image and video recording which is still unchanged since version 1.0.3. This will be fixed in the next version.

The camera change is probably due to your firmware version. In the options, try out another firmware version. This should help.

@njoi
Copy link

njoi commented Oct 11, 2011

When will this be updated, do you think?

I swapped over to Ander's version of this SDK and it also does not record video correctly and I was wondering if this will be implemented any time soon.

@shtejv
Copy link
Owner

shtejv commented Dec 3, 2011

There is currently no deadline for this topic - and I don't really know when. Currently, I'm still totally out of time.

@shtejv
Copy link
Owner

shtejv commented Jan 2, 2012

Try the new version. Video output should work fine now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants