473,385 Members | 1,973 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

read in video file into Bitmap class

175 100+
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("...\someVideo.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?
May 14 '11 #1
4 7257
GaryTexmo
1,501 Expert 1GB
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?
May 16 '11 #2
manontheedge
175 100+
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.
May 17 '11 #3
GaryTexmo
1,501 Expert 1GB
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..
http://www.codeproject.com/KB/direct...diaplayer.aspx
May 18 '11 #4
manontheedge
175 100+
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.
May 20 '11 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Dafna m | last post by:
Can I present a video file as picture file? (By built-in class) Thanks, Dafna *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded...
2
by: TCR | last post by:
Hi, I'm using the Image.FromImage() function to load a jpg file into a bitmap class and then convert it to a lower resolution. The problem I'm having is that if I check the resolution of the...
2
by: TCR | last post by:
Hi, I posted this earlier and got a suggestion that didn't pan out. I am trying to determine if there is a known bug related to the resolution value returned when opening a .jpg file by passing...
2
by: Mamatha | last post by:
Hi I have an application to capture a live video in C#.NET,Now i want to bradcast that captured file,how can i broadcast? If you know any related sites or any source code to broadcast please let...
0
by: Jason Ho | last post by:
Hi, Any API we can call to extract a frame from a video file (e.g. avi) as Bitmap format? I want to have a file browser to show thumbnail for video files. I think the .NET framework should...
2
by: Anand Ganesh | last post by:
Hi All, I am trying to load 23 MB PNG file using the Bitmap Class, but I am getting an out of memory exception. My computer has 1 GB RAM and 1.5 GB Virtual Memory but still I am getting this...
3
by: aratimane | last post by:
Hi, I have received the video file in chunk and want to join/merge these chunks into one video file. I have used cat command in unix for joining video, but while played that video file it...
0
by: D2 | last post by:
Hi All, I want to read metadata like height, width, length of video file formats like .mov, avi, .mpg etc and possibly one frame as bitmap. Could anyone pl suggest what are the options in...
5
by: sonu | last post by:
hey good morning ...... how to convert a video file in .flv format in php for linux hosting......is there any package whis provide this facility . Can i use ffmpeg for linux hosting...
1
by: manontheedge | last post by:
I'm looking for a way to read in a video file ( such as an mpeg file ) using C++ ... basically the idea is to "read in the video" frame by frame, so I can do some manipulation on each frame, search...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.