CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2009
    Posts
    2

    Problem with VFW / Capturing Video / Sony DV Camcorder

    I am facing a problem when trying to record video using VFW library and Sony DV Camcorder.

    Below given is the simple code and it works well. I have tested it with 2 web cams - Logitech and Intel.

    When I use my Sony DV Camcorder - I see a blank/black window (of the size WIDTH/HEIGHT as mentioned in the code). I find that all the functions - capDriverConnect, capPreviewRate and capPreview - return TRUE even when I get the blank/black window in the name of preview area.

    What surprises me more is that the same code and the Sony DV Camcorder were working fine when tested almost a month back using my colleague's machine. The only difference is that I connected the camera using an external Firewire card to his PC. My laptop has a Firewire port so I connect the camera using the same. When I try to use Windows Movie Maker or Windows Explorer to see if the camera/cable is working fine, everything works well.

    I was curious to see the results of capGetVideoFormat. I have attached a snapshot which shows the state of BITMAPINFO. The values look strange to me. Never seen this value for biCompression.

    Please guide.



    capture_window = capCreateCaptureWindow (TEXT ("Capture Window"),
    WS_CHILD | WS_VISIBLE, 5,5, WIDTH, HEIGHT, hwnd, 0);

    capDriverConnect (capture_window, 0);
    capPreviewRate (capture_window, 66);
    capPreview (capture_window, TRUE);
    Attached Images Attached Images

  2. #2
    Join Date
    Aug 1999
    Location
    <Classified>
    Posts
    6,882

    Re: Problem with VFW / Capturing Video / Sony DV Camcorder

    Are you able to capture using any existing tool ? I think there could be some setting sort of problem on sony camera.
    Regards,
    Ramkrishna Pawar

  3. #3
    Join Date
    Jul 2009
    Posts
    2

    Re: Problem with VFW / Capturing Video / Sony DV Camcorder

    Krishna,

    As I have mentioned in the original post - everything works well when recording through Windows Movie Maker or going through control panel and so on.

    Ankur

  4. #4
    Join Date
    Jan 2010
    Posts
    7

    Re: Problem with VFW / Capturing Video / Sony DV Camcorder

    I don't think that biCompression is the problem; it's just the codec used by de camera to translate the raw data internally. If you ever have to handle this data yourself, you will need biCompression to decompress it (via sequence ICOpen() / IcImageDecompress() / ICClose())

    Perhaps the problem is in the last parameter of capDriverConnect (capture_window, 0);
    0 stands for autodetection, the system will choose automatically the driver. So if you have 2 or more drivers, are you sure it will choose the one you want?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured