Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 36739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T14:26:26+00:00 2026-05-10T14:26:26+00:00

I would like to open a small video file and map every frames in

  • 0

I would like to open a small video file and map every frames in memory (to apply some custom filter). I don’t want to handle the video codec, I would rather let the library handle that for me.

I’ve tried to use Direct Show with the SampleGrabber filter (using this sample http://msdn.microsoft.com/en-us/library/ms787867(VS.85).aspx), but I only managed to grab some frames (not every frames!). I’m quite new in video software programming, maybe I’m not using the best library, or I’m doing it wrong.

I’ve pasted a part of my code (mainly a modified copy/paste from the msdn example), unfortunately it doesn’t grabb the 25 first frames as expected…

[...]  hr = pGrabber->SetOneShot(TRUE); hr = pGrabber->SetBufferSamples(TRUE);  pControl->Run(); // Run the graph. pEvent->WaitForCompletion(INFINITE, &evCode); // Wait till it's done.  // Find the required buffer size. long cbBuffer = 0; hr = pGrabber->GetCurrentBuffer(&cbBuffer, NULL);  for( int i = 0 ; i < 25 ; ++i ) {     pControl->Run(); // Run the graph.     pEvent->WaitForCompletion(INFINITE, &evCode); // Wait till it's done.      char *pBuffer = new char[cbBuffer];     hr = pGrabber->GetCurrentBuffer(&cbBuffer, (long*)pBuffer);      AM_MEDIA_TYPE mt;     hr = pGrabber->GetConnectedMediaType(&mt);     VIDEOINFOHEADER *pVih;     pVih = (VIDEOINFOHEADER*)mt.pbFormat;      [...] }  [...] 

Is there somebody, with video software experience, who can advise me about code or other simpler library?

Thanks

Edit: Msdn links seems not to work (see the bug)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T14:26:26+00:00Added an answer on May 10, 2026 at 2:26 pm

    Currently these are the most popular video frameworks available on Win32 platforms:

    1. Video for Windows: old windows framework coming from the age of Win95 but still widely used because it is very simple to use. Unfortunately it supports only AVI files for which the proper VFW codec has been installed.

    2. DirectShow: standard WinXP framework, it can basically load all formats you can play with Windows Media Player. Rather difficult to use.

    3. Ffmpeg: more precisely libavcodec and libavformat that comes with Ffmpeg open- source multimedia utility. It is extremely powerful and can read a lot of formats (almost everything you can play with VLC) even if you don’t have the codec installed on the system. It’s quite complicated to use but you can always get inspired by the code of ffplay that comes shipped with it or by other implementations in open-source software. Anyway I think it’s still much easier to use than DS (and much faster). It needs to be comipled by MinGW on Windows, but all the steps are explained very well here (in this moment the link is down, hope not dead).

    4. QuickTime: the Apple framework is not the best solution for Windows platform, since it needs QuickTime app to be installed and also the proper QuickTime codec for every format; it does not support many formats, but its quite common in professional field (so some codec are actually only for QuickTime). Shouldn’t be too difficult to implement.

    5. Gstreamer: latest open source framework. I don’t know much about it, I guess it wraps over some of the other systems (but I’m not sure).

    All of this frameworks have been implemented as backend in OpenCv Highgui, except for DirectShow. The default framework for Win32 OpenCV is using VFW (and thus able only to open some AVI files), if you want to use the others you must download the CVS instead of the official release and still do some hacking on the code and it’s anyway not too complete, for example FFMPEG backend doesn’t allow to seek in the stream. If you want to use QuickTime with OpenCV this can help you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to open an OleDbConnection to an Excel file that's in memory
i dont have microsoft access but would like to open an mdb file, is
I have an WinMo app and I would like to open a file from
I need some asp.net pagination code samples. I would like suggestions on open source
I'm new to working with video. I would like to put some tiny video
i have a code generator project i would like to offer like open source,
I would like to open a document after my ASP.NET page loads in a
I would like to open up the compose page for gmail in an iframe
I would like to open a popup window using javascript in my c#.net app.
Our SEO team would like to open up our main dynamic search results page

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.