read in video file into Bitmap class

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • manontheedge
    New Member
    • Oct 2006
    • 175

    read in video file into Bitmap class

    I've used the C# Bitmap class to manipulate images before, so I tried to do this with videos. It's not working. Is it possible to do a "Bitmap bm = new Bitmap("...\som eVideo.MOV")"? When I try, it crashes when getting to that line, giving the error that the parameter is not valid. So, apparently it doesn't like the ".mov".

    I'm trying specifically to read in a video file recorded on a digital camera, and it's a .mov file. How can I read in this video file? Can I do it using Bitmap or do I need to use something else?
  • GaryTexmo
    Recognized Expert Top Contributor
    • Jul 2009
    • 1501

    #2
    I think you'll need to use something else. A bitmap is a single image, a video file is something else entirely.

    What do you want to do with this movie file once you've loaded it? Do you just want to play it, or do you wan to work with the data in some fashion?

    Comment

    • manontheedge
      New Member
      • Oct 2006
      • 175

      #3
      Once I've loaded all of the frames, I'm going to manipulate particular frames, and leave them as images.

      I understand what your saying about a video not being like an image. But, I've used the Bitmap class to go through "video dumps", where a video is broken up into a huge file of bytes, and you have to read the headers and basically work with it, and break it out to one frame at a time. I thought the same could be done with a .mov file. And, by the way, I did replay the videos after messing with each frame. I think I only had it playing back at 28 frames/second, but that was close enough.

      Comment

      • GaryTexmo
        Recognized Expert Top Contributor
        • Jul 2009
        • 1501

        #4
        Ah, so the trouble is you just don't know how to read a MOV file and get the frames out of it? I'm afraid I don't know the answer, I've never done it my self.

        I'm not sure if there's any way built into the .NET framework. I googled around and didn't see anything immediately pop out (it may still be there, I'm just not seeing it). I think you might have to process the file yourself, which might mean looking at the file format of a MOV file and learning how to extract data from it.

        I did come across this article on CodeProject which says it loads and extracts images from a MOV file. http://www.codeproject.com/KB/direct...frommovie.aspx -- Unfortunately it looks like the code for the actual loading is hidden in a dll that the source isn't included for, which is unfortunate. Still, it might be worth looking into.

        You might also check this out..

        Comment

        • manontheedge
          New Member
          • Oct 2006
          • 175

          #5
          Thank you for the links. I will take a look at both of them.

          I find it hard to believe that this hasn't been done plenty of times by others, but apparantly if it has, it's difficult to find just searching around.

          If I get it figured out, I'll post back here. When I searched Google, I actually found a post I made 2 or 3 years ago with a similar question, that I never did get answered. Anyway, I'll look at those links, and try to get it figured out.

          Again, I appreciate the help.

          Comment

          Working...