Read a video frame by frame through a c program

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • princess
    New Member
    • May 2012
    • 4

    Read a video frame by frame through a c program

    I m trying to read a video frame by frame through a c program for which i need to know the format of .wmv (native video file for windows) file,can i get it??
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    Most likely you will need the Windows Media Format SDK to read the file. It's more complicated than a simple sequential read.

    Comment

    • princess
      New Member
      • May 2012
      • 4

      #3
      yes i knwo its complicated,i just need to knw the structure of .wmv file or asf container (by microsoft),so that i can judge where a frame starts or ends in a sequentially stored video in memory(file).
      i already know the basic structure of bitmap file ,ie native img frmat fr windows.
      I also need to knwo what is the exact format(native one) of a frame of a video??

      Comment

      • weaknessforcats
        Recognized Expert Expert
        • Mar 2007
        • 9214

        #4
        Format Description for WMV -- File format based on ASF (Advanced Systems Format) that wraps a video bitstream. Developed by Microsoft.


        There you go. Ultimately, you need the ASF spec.

        I stll think you have a better shot by using the SDK. No telling what MS has actually done.

        Comment

        • princess
          New Member
          • May 2012
          • 4

          #5
          i guess u r getting me wrong
          consider
          typedef struct
          {
          char signature[2];
          unsigned int fileSize;
          unsigned int reserved;
          unsigned int offset;
          }BmpHeader;

          typedef struct
          {
          unsigned int headerSize;
          unsigned int width;
          unsigned int height;
          unsigned short planeCount;
          unsigned short bitDepth;
          unsigned int compression;
          unsigned int compressedImage Size;
          unsigned int horizontalResol ution;
          unsigned int verticalResolut ion;
          unsigned int numColors;
          unsigned int importantColors ;

          }BmpImageInfo;
          the above are structures of a header n image info of a bitmap file,
          can i have something similar for .wmv file??

          Comment

          • weaknessforcats
            Recognized Expert Expert
            • Mar 2007
            • 9214

            #6
            .wmv files are .asf files so you should get the file format from the asf file specification.

            I don't think the wmv file format conveniently coded in C for Windows is available other than in the MS Media Format SDK.

            Comment

            • princess
              New Member
              • May 2012
              • 4

              #7
              ok thanks a ton!mya problem is solved..:)

              Comment

              • Kasanda
                New Member
                • Apr 2019
                • 1

                #8
                how did it get solved?
                I have the same problem as you did, and didn't get the true solution among your conversations yet.
                Please let me know too

                Comment

                Working...