Click here to Skip to main content
15,906,335 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Please any one help me to how to convert images to any video format by directshow or WMEncoder or other
Posted
Updated 21-Mar-17 7:17am
Comments
Sergey Alexandrovich Kryukov 18-Feb-13 13:29pm    
Please stop re-posting the same question. This is spamming.
You asked 3 times before; if you have question, use "Improve questions", ask follow-up questions in comments.
—SA

1 solution

The best code I know is FFmpeg or libavcodec: http://en.wikipedia.org/wiki/Ffmpeg[^],
http://ffmpeg.org/[^],
http://en.wikipedia.org/wiki/Libavcodec[^],
http://libav.org/[^].

In both cases, you can get free open-source utilities which can make nearly everything, including assembling your video from frame pictures.

Now, how to use it programmatically in a .NET application? First, you can use the available utility by running it using System.Diagnostics.Process.Start:
http://msdn.microsoft.com/en-us/library/system.diagnostics.process.start.aspx[^].

If this is not good enough, you can wrap the library in a .NET assembly by yourself or find appropriate wrapper. Please see:
http://www.ffmpeg-csharp.com/[^],
http://sourceforge.net/projects/sharpffmpeg/[^],
http://vbffmpegwrapper.codeplex.com/[^].

After all, try to find some more: http://bit.ly/VpboUJ[^].

If you wish to work at such wrapper by yourself but don't know how, ask a question, I'll give you the basic ideas (using P/Invoke or C++/CLI "mixed-mode" project).

Good luck,
—SA
 
Share this answer
 
v2
Comments
liaoyuandeyehuo 6-Apr-13 23:36pm    
I think DirectX is faster than GDI or other way.My language is VC;OS is windows 7.I'm trying to writing a project to capture a window,add something to it,convert to video,then push it to the internet for real time.But I don't konw how to convert the buffers to video,coule show me a way?
Sergey Alexandrovich Kryukov 6-Apr-13 23:39pm    
OK, thank you can simply and directly use the library I recommend in your code. Or simply execute the FFmpeg utility. See its documentation.
—SA
dharanidharan17 7-Nov-13 2:29am    
How you captured the window ? am also need to do the same what you did. So, assist me
Sergey Alexandrovich Kryukov 7-Nov-13 2:32am    
Sorry, I don't understand. What window did I capture? What to do you mean?
—SA
Member 13074683 21-Mar-17 13:45pm    
is there a way to specify the number of frames i want ?
For example if i want to cut a vide into 59frames but the duration of the video is variable due to fpsdrop, is this possible to specify that i want the video to be equally cut into 59 images?
Thanks

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