Click here to Skip to main content
15,884,007 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I'm creating a windows application that collects still images from an IP camera and I want to create a video file from theses still images.

I'm flexible about the format of the video file to be used as long as it is recognized by the standards video players.

Can you point me to any piece of code that create this video container from scratch?

Please read carefully these basic requirements.

- Program is written in c/c++.

- We don't want to use any Microsoft windows library that is specific to video encoding.

- We do not want anything that wraps the windows "avifil32.dll", we do not want to use DirectShow to create the file.

- The video compression rate is not important, so we are very flexible on this point. No compression is also acceptable.

- We are flexible in in the video file format.

- Please do not suggest to create an array of images and then externalise it as this will not be recognizable by other video players other than our application.

- The key point is that we need to be able to manipulate every single byte that is going to be written into the video file. We do not want to invoke any other program by command line to delegate this.

Can any one point to any piece of code that does this?

Kind regards and thanks in advance.
Posted

From what I know, I would first look at open-source FFmpeg:
http://en.wikipedia.org/wiki/FFmpeg[^],
http://ffmpeg.org/[^].

Sorry, written in C, but you can use it in C++ project. :-)

Another alternative is VideoLAN:
http://en.wikipedia.org/wiki/VideoLAN[^],
http://en.wikipedia.org/wiki/VLC_media_player[^],
http://www.videolan.org/vlc/[^].

This thing is written in C, C++ and Objective C, but I hope pure codec parts are written in C or C++. One problem of this project for you is this: too much code is not related to codecs. Hope you would be able to extract only what you need. The specific if this program is that does not use system-level codec system but implements all standards inside its own library.

Both projects are multi-platform, and that guarantees that no platform-specific video libraries are involved. Something you really wanted, huh?

—SA
 
Share this answer
 
v2
Comments
LostSpider 25-Nov-11 6:00am    
Thanks a lot , I will check this.
LostSpider 25-Nov-11 9:39am    
Hi SA,

I have checked it, I think it is far too dense and complicated for what we need, have you seen anything simpler?
Sergey Alexandrovich Kryukov 25-Nov-11 11:03am    
Simpler? Write your own codec implementing existing container and/or compression formats. :-)
No, I don't. Of course it is dense. What did you expect? Please, do the following: find out formal description of just one of the video compression format and algorithm, read it thoroughly, realize how complex it is and imagine how much work would it take to implement it.

Video compression algorithms are quite complex, and don't forget audio compression and its synchronization with video. Perhaps they are more complex than you expected? Be realistic.

If this sounds convincing, please consider formally accepting this solution (green button) -- thanks.
You can probably find something else, but simpler..? well, good luck...
--SA
LostSpider 1-Dec-11 5:23am    
Challenge accepted:

I'm writting a simple RIFF container in visual c++ that just hold JPEG images in a list (which becomes a M-JPEG), it seems to be quite simple, I may post it in codeproject if it works.

Kind regards
This is the updated useful information on the VLC component binding for.NET:
http://sourceforge.net/projects/libvlcnet/[^],
https://wiki.videolan.org/C_Sharp/[^],
https://wiki.videolan.org/.Net_Interface_to_VLC/[^].

Notably, you can find material for using the component for both WPF and System.Windows.Forms.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900