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

Ask A Question

Stats

  • Questions 112k
  • Answers 112k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You want to override the included() or extended() method on… May 11, 2026 at 9:57 pm
  • Editorial Team
    Editorial Team added an answer For a straight combine, (?:[0-9]{2}[-][0-9]{3}[-][0-9]{4}|[0-9]{9}) or to merge the logic… May 11, 2026 at 9:57 pm
  • Editorial Team
    Editorial Team added an answer document.getElementById('<%= yourDropdown.ClientID %>').onchange(); This should work, if you are still… May 11, 2026 at 9:57 pm

Related Questions

I have a small program to order and sort email messages, outputting to a
I'm trying to implement a stateful web service in PHP using the SOAP extension.
(EDIT: This question is now outdated for my particular issue, as Google Code supports
I would like to ask you which automated build environment you consider better, based

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.