Reading raw avi video data

This is a discussion on Reading raw avi video data within the Tech Board forums, part of the Community Boards category; Hey guys I need to do some image processing on an uncompressed (raw) avi video on a DSP, so I'm ...

  1. #1
    Registered User
    Join Date
    Jun 2011
    Posts
    14

    Reading raw avi video data

    Hey guys

    I need to do some image processing on an uncompressed (raw) avi video on a DSP, so I'm trying to get to the actual images that constitute the video; it's a greyscale video at 15fps. I was just wondering if anyone knows where the actual image data will start to save some time going through all the LISTS and CHUNKS? Any help is greatly appreciated.

    Cheers

    David

  2. #2
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    1,616
    Can you clarify your question? I don't understand what you're asking.

    ( Note to Moderators: this thread should be moved to the tech board )
    Devoted my life to programming...

  3. #3
    Registered User
    Join Date
    Jun 2011
    Posts
    14
    Sorry. I'm wondering if anyone knows off-hand where the data for the frames will reside? I know that for normal images you can skip the preamble and just read values if you want. So I was wondering if that is also possible with this avi? I've read that uncompressed avi's are the simplest so they don't need any more processing with codecs and the like.

  4. #4
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    1,616
    Here, I found a document that might interest you.
    Devoted my life to programming...

  5. #5
    Just a pushpin. bernt's Avatar
    Join Date
    May 2009
    Posts
    426
    I'm wondering if anyone knows off-hand where the data for the frames will reside?
    I'm assuming you mean, where the data in the AVI is? You can read up on the specs if you want to read directly from file: (RIFF) and (AVI). The actual image data is in sub-chunks under the "movi" list.

    Also, from what I read, a lot of people working with video use OpenCV to help with processing, it might be worth looking into. (Though I admit this is definitely not my area of expertise )
    Consider this post signed

  6. #6
    Registered User
    Join Date
    Jun 2011
    Posts
    14
    Movi list! Cheers! I've been going through the specs and they all detail the layout, but none simply state where the actual data is. I'm not looking for anything fancy to read the videos and I've customised the actual videos in Matlab to ensure a simple format. I have my own processing algorithms already written, so I might use OpenCV later on when the processing gets a little more intense :P

    P.S. I had a look at that link Reaper. Not quite what I'm looking for just now but I've bookmarked it in case I need it at a later point

  7. #7
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,431
    Quote Originally Posted by dawatson View Post
    Movi list! Cheers! I've been going through the specs and they all detail the layout, but none simply state where the actual data is.
    Yes, they do:
    Quote Originally Posted by MSDN
    Following the header information is a 'movi' list that contains the actual data in the streams that is, the video frames and audio samples.
    They are not simply spread out contiguous after each other. They are separated into chunks that are preceded with a header.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  8. #8
    Registered User
    Join Date
    Jun 2011
    Posts
    14
    Hey guys, I've got the image data I need, and the locations where they reside. I was just wondering if anyone knows how to use the RGB masks to interpret the pixel values? The images are actually greyscale so I'm a little confused as to how the RGB (and possibly A) masks are used to convert this. Here is a snippet of the masks:

    30306462 //"00db"
    A011C0CC //BGRA masks

    Thanks for your help

    David

  9. #9
    Registered User
    Join Date
    Jun 2011
    Posts
    14
    The masks I'm referring to might actually be the DIB file header, ma bad!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Video problems (data rate?)
    By Mario F. in forum Tech Board
    Replies: 0
    Last Post: 07-11-2008, 03:47 PM
  2. Read size of data array when reading .txt data
    By Taquito in forum C Programming
    Replies: 13
    Last Post: 04-29-2007, 01:52 AM
  3. Replies: 3
    Last Post: 06-16-2006, 04:52 PM
  4. Replies: 1
    Last Post: 10-22-2005, 05:28 AM
  5. Replies: 2
    Last Post: 06-16-2005, 10:03 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21