Does someone knows how can I capture my computer screen to a video file? I need the file to be as small as possible. I'm using C#. Third party components also welcome.
TY
I think you are referring to creating a screen cast, if so this is the best I have used.
http://www.techsmith.com/camtasia.asp
It can produce many formats including FLV which can be configured to small file size.
You could take a look at ScapLib, and see if that suits your needs.
Directly capturing video from the desktop in .net does not seem to be a simple task. Here's an article from c-sharpcorner that might help you out: Link.
Related
I have a desktop application (mfc) in which now I have to implement split and merge of MP4 videos. I have searched a lot and found almost nothing online. Please help me with some hints on how to proceed and what to use. Splitting and merging should be done on timeline basis and not based on size. Code is in VC++
Can I achieve this with Windows Video Encoder? If yes, how to know about the exposed methods in WME?
DirectShow (now part of Windows SDK) provides editing services (EDS) but I would suggest ffmpeg (http://ffmpeg.zeranoe.com/builds/) as a better choice since it would support wider range of formats (e.g. H.264 - http://msdn.microsoft.com/en-us/library/windows/desktop/dd390353(v=vs.85).aspx).
I want to make a program which takes video and audio and merges them. Video type or audio type is not important for me. How can I make this? Does any library exist for this? I know there are many programs about this topic but I want to learn how to implement such a program.
The technical term for what you are trying to do is 'multiplexing', and commonly referred to as 'muxing'.
FFmpeg is a multiplatform command line tool that does this, and arguable the industry standard. Many projects wrap FFmpeg into libraries and GUIs.
FFmpeg is also open source, so you can download the code and see how they have done it. That siad, it is very big and complex.
If you are interested in the actual mechanics of muxing separate audio and video files together into a destination file, then you will need to learn much about container formats and Codecs.
Look at some sort of FFMPEG wrapper in C#.
An easy way to multiplex audio and video on linux is to use gstreamer. Here's a A/V pipeline that you can create using gst-launch on a shell prompt.
filesrc location=file1.vid ! queue ! mux. filesrc location=file2.aud ! queue ! mux. avimux name=mux ! filesink location=output.avi
Replace file1.vid with the name of your encoded video file and file2.aud with the name of your encoded audio file. output.avi is the container file that you need.
I have been doing a lot of searching today for C# libraries which will allow me to create H.264 encoded video files. Does anyone know if any such libraries or 3rd party components exist?
Use ffmpeg. I suggest to run a ffmpeg process directly, like in this sample: http://jasonjano.wordpress.com/2010/02/09/a-simple-c-wrapper-for-ffmpeg/
While the sample doesn't deal with the operation you need, I suggest to adapt it to your needs.
ffmpeg-sharp is probably a good starting point.
I would like to emulate video input from a webcam for testing purposes.
So I need to be able to emulate a software video capture device in Windows and be able to dynamically generate its output.
How can I achieve this?
I would prefer a solution in C# or C++.
You can use a Virtual Webcam (old link, but there are others) it will take a video/images file and will display it in a webcam device. Your system will think that its a normal device.
Then you will need to create something that will generate the video/images, if you need static image then its pretty easy to generate a bmp.
Old (no selected answer) question.... actually probably one of the oldest I've ever seen... but I came across this looking for an answer myself, I remembered the day when "Virtual Webcam" still existed (now just a chinese ad site).
Fear not! There are new sources to solve your decade long quest:
First of all, checkout OBS, open source does a LOT with video streams:
https://obsproject.com/
Second, checkout this virtual webcam plugin for it. Does exactly what you're talking about, and does use #qbeuek's suggestion of DirectDraw:
https://obsproject.com/forum/resources/obs-virtualcam.949/
It is written in C++, so grabbing the bits you need and rewriting to C# is left as an exercise to the reader, but the capability is there.
As far as I know, there is a set of COM interfaces that govern the recording and playback of audio and video in Windows. It used to be called DirectShow, but maybe in the meantime the name has been changed. Those interfaces are used to construct a graph of audio and video filters, to encode / decode the data stream.
The way to go:
- read about the Microsoft DirectShow API,
- implement a COM object that implements the video source interface,
A project I am currently working on at work requires the ability to convert videos from other formats to the WMV format. We need to be able to convert virtually any video format that is commonly used to a WMV format. I am looking for a solution allot like On2's flix engine converts other video types to .flv videos. I am aware of the encoder that windows offers, but it has a very limited list of video types that it can convert from. Please let me know if you have any suggestions or opinions, or recommendation of software I can use to do this. I need to be able to do the conversions in batch and I need to be able to do them programmatically with C#.
Have you had a look at ffmpeg?
It seems to be at the core of many open source video conversion utilities, so I imagine you could use it in the scenario you describe.
SUPER, the name is really covering the load!
Well, first you have to be able to decode the file format. You need to set this up with directshow, which is very hard to work with. You can take a look at the mediaportal project for a directshow file player written in C#. Instead of using the video renderer at the end of the directshow graph, you would reencode the video and audio and mux them into a .wmv file. This is a very involved project to get right. You essentially have to mimic a player's ability to play any format and handle failure.
I've been very satisfied using Quick Media Converter.